MCP.so
Sign In

MCP Server Python

@jongkwang

About MCP Server Python

No overview available yet

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "hello-mcp-server-python": {
      "command": "python",
      "args": [
        "server.py"
      ]
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MCP Server Python?

MCP Server Python is a Python server example that provides tools to LLMs such as Claude AI using the Model Context Protocol (MCP). It offers BMI calculation and weather information lookup functions.

How to use MCP Server Python?

Install dependencies with pip install mcp httpx, then run the server using python server.py or mcp run server.py. Connect to Cursor by placing an mcp.json file in the project root, or to Claude for Desktop by running the server and adding it in the MCP settings.

Key features of MCP Server Python

  • Provides calculate_bmi tool for BMI calculation
  • Provides fetch_weather tool for city weather lookup
  • Connects to Cursor and Claude for Desktop
  • Built with MCP Python SDK and httpx
  • Requires Python 3.9 or higher

Use cases of MCP Server Python

  • Calculate BMI for health and fitness applications
  • Fetch current weather for travel or planning
  • Demonstrate how to build an MCP server in Python
  • Integrate LLM chatbots with external data via function calling

FAQ from MCP Server Python

What tools does MCP Server Python provide?

It provides two tools: calculate_bmi (calculates BMI from height and weight) and fetch_weather (retrieves weather for a given city, requiring an API key).

What are the prerequisites to run MCP Server Python?

You need Python 3.9 or higher, pip, httpx, and the MCP Python SDK (installed via pip install mcp httpx).

How do I connect MCP Server Python to Cursor?

Create an mcp.json file in the project root with the command mcp run /path/to/server.py. Claude in Cursor will automatically recognize the tools.

How do I connect MCP Server Python to Claude for Desktop?

Run the server with python server.py, then in Claude for Desktop settings go to the MCP server section and add the local server (configure URL/port as needed).

Does MCP Server Python require an API key for weather?

Yes. You must modify server.py to set your API key in the fetch_weather function before the weather tool works.

Frequently asked questions

What tools does MCP Server Python provide?

It provides two tools: `calculate_bmi` (calculates BMI from height and weight) and `fetch_weather` (retrieves weather for a given city, requiring an API key).

What are the prerequisites to run MCP Server Python?

You need Python 3.9 or higher, pip, httpx, and the MCP Python SDK (installed via `pip install mcp httpx`).

How do I connect MCP Server Python to Cursor?

Create an `mcp.json` file in the project root with the command `mcp run /path/to/server.py`. Claude in Cursor will automatically recognize the tools.

How do I connect MCP Server Python to Claude for Desktop?

Run the server with `python server.py`, then in Claude for Desktop settings go to the MCP server section and add the local server (configure URL/port as needed).

Does MCP Server Python require an API key for weather?

Yes. You must modify `server.py` to set your API key in the `fetch_weather` function before the weather tool works.

Comments

Basic information

Category

Other

License

MIT license

Transports

stdio

Author

jongkwang

More Other MCP servers