MCP Python Server – API Wrapper
Dieses Projekt erstellt einen MCP-Server in Python, der ein Tool zum Abfragen einer externen API bereitstellt. Kompatibel mit Claude Desktop oder ChatGPT Desktop, die das Model Context Protocol (MCP) unterstützen.
✨ Funktionen
- Verfügbarmachen eines Tools über MCP
- HTTP-Abfrage an eine externe API
- Direkte Integration mit Claude/Desktop über claude.json
🚀 Voraussetzungen
- Python 3.9+
- mcp[cli] (installierbar über pip oder uv)
- Claude oder ChatGPT Desktop (mit MCP-Unterstützung)
📁 Projektstruktur
⚙️ Installation
Mit Pip
Mit UV (empfohlen)
Installation des MCP
Installation mit .env
Installation von Abhängigkeiten
Umgebungsvariablen
Erstellen Sie eine .env
Datei im Projektstamm, um optionale Umgebungsvariablen zu definieren:
👷 Schnellstart (Schnellstart)
Erstellen Sie den Server server.py
Lokal im Entwicklermodus ausführen
Im Produktionsmodus ausführen
Oder mit UV:
🚀 Integration mit Claude/Desktop
Suchen Sie claude.json im Konfigurationsordner Claude/Desktop:
- Unter Windows: %APPDATA%\Claude\claude.json
- Unter Linux/macOS: ~/.claude/claude.json
Beispiel:
🤖 Verwendung innerhalb von Claude/Desktop
Sie können das Modell fragen:
Verwenden Sie das Tool consult_api mit dem Parameter „ping“
Und das Modell verwendet Ihren MCP-Server, um einen HTTP-Aufruf in Echtzeit zu tätigen.
🎁 Bonus: Tools-Erweiterung
🔍 Ressourcen
- Offizielle MCP-Dokumentation: https://docs.mcp.run/
- Python SDK-Repository: https://github.com/modelcontextprotocol/mcp
✅ Mit Liebe gemacht und 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.
Ein Python-Server, der das Model Context Protocol implementiert und Tools zum Abfragen externer APIs bereitstellt, die mit Claude Desktop und ChatGPT Desktop kompatibel sind.
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