Supports configuration through environment variables for API keys and endpoints, allowing secure storage of authentication credentials
MCP Python Server—API Wrapper
This project creates an MCP server in Python that exposes a tool for querying an external API. It is compatible with Claude Desktop or ChatGPT Desktop that support the Model Context Protocol (MCP).
✨ Features
- Exposing a tool via MCP
- HTTP query to an external API
- Direct integration with Claude/Desktop via claude.json
🚀 Requirements
- Python 3.9+
- mcp[cli] (installable via pip or uv)
- Claude or ChatGPT Desktop (with MCP support)
📁 Project structure
⚙️ Installation
With pip
With UV (recommended)
Installation of the MCP
Installation with .env
Installation of dependencies
Environment variables
Create a .env
file in the project root to define optional environment variables:
👷 Quick Start (Quickstart)
Create the server server.py
Run locally in dev mode
Run in production mode
Or with uv:
🚀 Integration with Claude/Desktop
Locate claude.json in the Claude/Desktop configuration folder:
- On Windows: %APPDATA%\Claude\claude.json
- On Linux/macOS: ~/.claude/claude.json
Example:
🤖 Use within Claude/Desktop
You can ask the model:
Use the consult_api tool with the "ping" parameter
And the model will use your MCP server to make a real-time HTTP call.
🎁 Bonus: Tools Extension
🔍 Resources
- Official MCP documentation: https://docs.mcp.run/
- Python SDK repository: https://github.com/modelcontextprotocol/mcp
✅ Made with love and 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.
A Python server implementing the Model Context Protocol that exposes tools for querying external APIs, compatible with Claude Desktop and ChatGPT Desktop.
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