
MCP Server
cdryampi
public
MCP
MCP de mi perfil
Repository Info
0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License
About This Server
MCP de mi perfil
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
# 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
---
## 🚀 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
```bash
pip install "mcp[cli]"
```
### Con uv (recomendado)
```bash
uv init mcp-api-server
cd mcp-api-server
uv add "mcp[cli]"
```
### Instación del MCP
```bash
mcp install mi_script.py
```
### Inatalación con .env
```bash
mcp install mi_script.py -f .env
```
### Instalación de dependencias
```bash
pip install -r requirements.txt
```
### Variables de entorno
Crea un archivo `.env` en la raíz del proyecto para definir variables de entorno opcionales:
```env
# .env
API_KEY=mi_api_key
API_URL=https://miapi.com/consulta
```
---
## 👷 Rápido Inicio (Quickstart)
### Crear el servidor server.py
```python
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.text
```
### Ejecutar localmente en modo dev
```bash
mcp dev server.py
```
### Ejecutar en modo producción
```bash
mcp run server.py
```
O con uv:
```bash
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:
```json
{
"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
```python
@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 🚀
Quick Start
1
Clone the repository
git clone https://github.com/cdryampi/MCP2
Install dependencies
cd MCP
npm install3
Follow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Ownercdryampi
RepoMCP
Language
Python
License-
Last fetched8/8/2025
Recommended MCP Servers
💬
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
integrationsdiscordchat
🔗
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
integrationsautomationsaas
🕷️
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
apifycrawlerdata
🌐
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
testingqabrowsers
⚡
Zapier MCP
A Zapier server that provides automation capabilities for various apps.
zapierautomation