MCP.so
ログイン

MCP Server Python

@jongkwang

基本情報

カテゴリ

その他

ライセンス

MIT license

トランスポート

stdio

作者

jongkwang

MCP Server Python について

概要はまだありません

MCP Server Python の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

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

MCP Server Python のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

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

よくある質問

1

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).

2

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`).

3

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.

4

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).

5

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.

コメント

「その他」の他のコンテンツ