MCP Python Server — API Wrapper
Supports configuration through environment variables for API keys and endpoints, allowing secure storage of authentication credentials
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Python Server — API Wrapperconsultar_api with parameter 'weather' to get current conditions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Python Server — API Wrapper
Este proyecto crea un servidor MCP en Python que expone una herramienta para consultar una API externa. Compatible con Claude Desktop o ChatGPT Desktop que soporten el Model Context Protocol (MCP).
✨ Características
Exposición de una herramienta (tool) vía MCP
Consulta HTTP a una API externa
Integración directa con Claude/Desktop vía claude.json
Related MCP server: MCP Starter
🚀 Requisitos
Python 3.9+
mcp[cli] (instalable vía pip o uv)
Claude o ChatGPT Desktop (con soporte MCP)
📁 Estructura del proyecto
.
├── servidores/profile.py # Servidor MCP con herramientas para interactuar con mi backend del curriculum.
├── server.py # Servidor MCP con herramienta "consultar_api".
├── .env # Variables opcionales para auth/API.
├── claude.json # Config. MCP para integrarlo directamente.
└── README.md # Este documento.⚙️ Instalación
Con pip
pip install "mcp[cli]"Con uv (recomendado)
uv init mcp-api-server
cd mcp-api-server
uv add "mcp[cli]"Instación del MCP
mcp install mi_script.pyInatalación con .env
mcp install mi_script.py -f .envInstalación de dependencias
pip install -r requirements.txtVariables de entorno
Crea un archivo .env en la raíz del proyecto para definir variables de entorno opcionales:
# .env
API_KEY=mi_api_key
API_URL=https://miapi.com/consulta👷 Rápido Inicio (Quickstart)
Crear el servidor server.py
from mcp.server.fastmcp import FastMCP
import httpx
mcp = FastMCP("API Wrapper")
@mcp.tool(description="Consulta una API externa")
async def consultar_api(param: str) -> str:
"""Consulta una API externa con un parámetro y devuelve la respuesta."""
async with httpx.AsyncClient() as client:
r = await client.get(f"https://miapi.com/consulta?param={param}")
return r.textEjecutar localmente en modo dev
mcp dev server.pyEjecutar en modo producción
mcp run server.pyO con uv:
uv run --with mcp[cli] mcp run server.py🚀 Integración con Claude/Desktop
Ubica claude.json en la carpeta de configuración de Claude/Desktop:
En Windows: %APPDATA%\Claude\claude.json
En Linux/macOS: ~/.claude/claude.json
Ejemplo:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/codigo/backend-curso-inkor/proyectos_memes"
]
},
"Demo": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\codigo\\backend-curso-inkor\\MCP\\server.py"
]
}
}
}🤖 Uso dentro de Claude/Desktop
Puedes pedirle al modelo:
Usa la herramienta consultar_api con el parámetro "ping"
Y el modelo usará tu servidor MCP para hacer una llamada HTTP en tiempo real.
🎁 Bonus: extensión de herramientas
@mcp.tool()
async def traducir(texto: str, lang: str) -> str:
return f"Traducido: {texto} → {lang}"🔍 Recursos
Documentación oficial MCP: https://docs.mcp.run/
Repositorio SDK Python: https://github.com/modelcontextprotocol/mcp
✅ Hecho con amor y httpx 🚀
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA custom Model Context Protocol server that gives Claude Desktop and other LLMs access to file system operations and command execution capabilities through standardized tool interfaces.Last updated23Apache 2.0
- AlicenseDqualityDmaintenanceA foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.Last updated137MIT
- Flicense-qualityDmaintenanceA Model Context Protocol server that allows integration with Claude Desktop by creating and managing custom tools that can be executed through the MCP framework.Last updated98
- Flicense-qualityDmaintenanceA Model Context Protocol (MCP) server built with the mcp-framework for developing and managing custom tools. It provides a structured foundation for building and integrating modular components like data processors and API clients into Claude Desktop.Last updated24
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cdryampi/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server