custodyops-mcp-python
custodyops-mcp-python
Un servidor MCP mínimo en Python sobre HTTP transmisible usando FastAPI + fastmcp, listo para desplegar en Render con HTTPS. Expone una herramienta ping más dos herramientas de demostración (get_positions, list_upcoming_corporate_actions) que puedes reemplazar con adaptadores de solo lectura para tus datos de custodia.
¿Por qué HTTP transmisible? Es el transporte recomendado para servidores MCP remotos/alojados, simplificando la transmisión bidireccional a un único endpoint
POST /mcpy facilitando el despliegue en la nube. Consulta la guía de inicio rápido de MCP HTTP y la documentación del SDK para los patrones canónicos.
Características
Endpoint HTTP transmisible en
POST /mcpAutenticación Bearer mediante
AUTH_TOKENEndpoint
/healthpara comprobaciones de disponibilidadHuella de código mínima, fácil de extender con más herramientas MCP
Despliegue con un clic en Render mediante
render.yaml
Related MCP server: MCP Ping-Pong Server
Inicio rápido (local)
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scriptsctivate
pip install -r requirements.txt
export AUTH_TOKEN=devtoken123
export PORT=3000
uvicorn app:app --host 0.0.0.0 --port $PORTPrueba con cURL:
# tools/list
curl -s -X POST http://localhost:3000/mcp -H "Content-Type: application/json" -H "Authorization: Bearer devtoken123" -d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}' | jq
# tools/call ping
curl -s -X POST http://localhost:3000/mcp -H "Content-Type: application/json" -H "Authorization: Bearer devtoken123" -d '{"jsonrpc":"2.0","id":"2","method":"tools/call","params":{"name":"ping","arguments":{}}}' | jqO ejecuta el script auxiliar:
chmod +x scripts/test_locally.sh
AUTH_TOKEN=devtoken123 PORT=3000 ./scripts/test_locally.shDesplegar en Render (HTTPS)
Haz fork o push de este repositorio a tu GitHub.
En Render: Nuevo → Web Service → Conectar repositorio.
Revisa la configuración de
render.yaml(entorno Python, plan gratuito). Render aprovisiona automáticamente HTTPS.Establece
AUTH_TOKENen el Entorno de Render (se genera automáticamente si usas el blueprint).Despliega → tu endpoint MCP público es:
https://<your-app>.onrender.com/mcp.
Prueba remota:
APP_URL=https://<your-app>.onrender.com AUTH_TOKEN=<token> ./scripts/test_remote.shUso desde Claude Desktop (MCP remoto)
Añade una entrada de relay a claude_desktop_config.json:
{
"mcpServers": {
"custodyops-mcp": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://<your-app>.onrender.com/mcp"],
"env": { "AUTH_TOKEN": "<same-token>" }
}
}
}Reinicia la aplicación, luego pide a Claude que liste las herramientas disponibles.
Extender con datos reales de custodia
Reemplaza las herramientas de demostración con adaptadores de solo lectura a tu data mart o API. Mantén las respuestas pequeñas y tipadas, y añade procedencia de campos cuando sea posible.
Ejemplo de esqueleto:
@mcp_tool
def get_positions(account_id: str) -> str:
rows = query_positions(account_id) # your adapter
return json.dumps(rows)Notas de seguridad
Mantén
AUTH_TOKENen secreto; rota regularmente. Para uso empresarial, migra a OAuth/JWT y añade autorización por cuenta.Con transporte HTTP, el registro normal está bien, pero redacta datos sensibles y añade IDs de solicitud.
Licencia
MIT
This server cannot be installed
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
- Flicense-qualityDmaintenanceA minimal Model Context Protocol server built with FastAPI that provides a basic "Hello World" resource and tool. Serves as a starting point for building and validating MCP client integrations with richer resources and tools.
- Alicense-qualityDmaintenanceAn experimental MCP server demonstrating remote calls via FastAPI, supporting ping-pong commands through API endpoints and SSE transport.2MIT
- Flicense-qualityDmaintenanceEnables building and running MCP servers over streamable HTTP, exposing tools to AI assistants like Cursor, with examples of mounting multiple servers in FastAPI.
- Flicense-qualityDmaintenanceA Python-based MCP server that exposes tools over streamable HTTP using FastAPI, enabling connection to AI assistants like Cursor. Supports multiple servers mounted in a single FastAPI app.
Related MCP Connectors
Multi-tenant FastMCP server for Charles Schwab brokerage data, monetized via DPYC Tollbooth
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for verifying EUDI/Talao wallet data via OIDC4VP (pull) for AI agents.
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/TheCodeWulf/custodyops-mcp-python'
If you have feedback or need assistance with the MCP directory API, please join our Discord server