MCP Server Python
by jongkwang
A Python server example project using the Model Context Protocol. It offers BMI calculation and weather information lookup functions.
Last updated: N/A
What is MCP Server Python?
This project is a server example that provides tools to LLMs such as Claude AI using the Model Context Protocol (MCP).
How to use MCP Server Python?
- Clone the repository. 2. Install the required packages using pip. 3. Configure the Weather API Key in server.py. 4. Run the server using
python server.py
ormcp run server.py
. 5. Connect to Cursor or Claude for Desktop as described in the README.
Key features of MCP Server Python
Provides tools to LLMs using MCP
BMI calculation tool
Weather information lookup tool
Integration with Cursor IDE
Integration with Claude for Desktop
Use cases of MCP Server Python
Using BMI calculation tool in Claude
Using weather information lookup tool in Claude
Extending LLMs with custom tools
Developing MCP-compatible servers
Integrating LLMs with external APIs
FAQ from MCP Server Python
What is Model Context Protocol (MCP)?
What is Model Context Protocol (MCP)?
MCP allows LLMs to access external tools and information.
What are the prerequisites for running this server?
What are the prerequisites for running this server?
Python 3.9+, pip, httpx, and MCP Python SDK are required.
How do I install the required packages?
How do I install the required packages?
Use pip install httpx "mcp[cli]"
.
How do I connect this server to Claude for Desktop?
How do I connect this server to Claude for Desktop?
Add a local MCP server in Claude for Desktop settings and configure the server URL or port.
How do I set up the Weather API?
How do I set up the Weather API?
Obtain an API key and modify the server.py
file to include your API key.