MCP Python サーバー - API ラッパー
このプロジェクトでは、外部 API をクエリするためのツールを公開する Python で MCP サーバーを作成します。モデル コンテキスト プロトコル (MCP) をサポートする Claude Desktop または ChatGPT Desktop と互換性があります。
✨ 特徴
- MCP経由でツールを公開する
- 外部 API への HTTP クエリ
- claude.json 経由で Claude/Desktop と直接統合
🚀 要件
- Python 3.9以上
- mcp[cli] (pipまたはuv経由でインストール可能)
- Claude または ChatGPT Desktop(MCP サポート付き)
📁 プロジェクト構造
⚙️ インストール
ピップ付き
UV付き(推奨)
MCPのインストール
.env によるインストール
依存関係のインストール
環境変数
オプションの環境変数を定義するには、プロジェクト ルートに.env
ファイルを作成します。
👷 クイックスタート(クイックスタート)
サーバーを作成する server.py
開発モードでローカルに実行する
本番環境で実行
またはUVの場合:
🚀 Claude/Desktop との統合
Claude/Desktop 構成フォルダで claude.json を見つけます。
- Windowsの場合: %APPDATA%\Claude\claude.json
- Linux/macOSの場合: ~/.claude/claude.json
例:
🤖 Claude/デスクトップ内で使用
モデルに次の質問をすることができます:
「ping」パラメータを指定したconsult_apiツールを使用する
そして、モデルは MCP サーバーを使用してリアルタイムの HTTP 呼び出しを行います。
🎁 ボーナス: ツール拡張機能
🔍 リソース
- 公式 MCP ドキュメント: https://docs.mcp.run/
- Python SDK リポジトリ: https://github.com/modelcontextprotocol/mcp
✅ 愛と httpx で作りました 🚀
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Claude Desktop および ChatGPT Desktop と互換性のある、外部 API をクエリするためのツールを公開するモデル コンテキスト プロトコルを実装する Python サーバー。
Related MCP Servers
- -securityAlicense-qualityA Python-based server that implements the Model Context Protocol to interface with Claude Desktop as an MCP client, supporting interaction through efficient memory management.Last updated -1PythonMIT License
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.Last updated -5Python
- -securityAlicense-qualityA streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.Last updated -15PythonMIT License
- AsecurityFlicenseAqualityA Python-based Model Context Protocol server that integrates with Claude Desktop, allowing users to connect to Hubble API services by configuring the server with their Hubble API key.Last updated -7Python