logistics-mcp-server
logistics-mcp-server
Servidor MCP remoto para CC3067 Redes — Proyecto 1, punto 7. Corre en la nube y el chatbot lo usa por HTTPS igual que a un servidor local.
Transporte: Streamable HTTP (un solo endpoint
/mcp). No es stdio.Protocolo: JSON-RPC 2.0 a mano — sin SDK de MCP.
Framework: Starlette + Uvicorn.
Sin base de datos, sin secretos: datos mock deterministas, seguro de exponer.
Herramientas
Herramienta | Parametros | Devuelve |
|
| multiplicador de tiempo de viaje (>= 1.0) para una zona a esa hora |
|
|
|
|
| precio de referencia del diesel por galon + moneda |
Alimentan al optimizador de rutas: traffic_factor se pasa como argumento
traffic_factor al planificador; holiday_calendar y fuel_price sirven para
decisiones de despacho y costeo de rutas.
API
POST /mcp cuerpo = request JSON-RPC 2.0 -> 200, respuesta JSON-RPC (application/json)
POST /mcp cuerpo = notificacion JSON-RPC 2.0 -> 202, vacio
GET /mcp -> 405
GET /healthz -> 200 "ok"initialize devuelve el header Mcp-Session-Id; el cliente lo reenvia en las
siguientes peticiones (aceptado pero no obligatorio).
Metodos: initialize, notifications/initialized, tools/list, tools/call,
ping. Version de protocolo 2025-06-18.
Correr localmente
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8080
# -> http://localhost:8080/mcpPrueba rapida:
curl -s localhost:8080/mcp -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"t","version":"0"}}}'
curl -s localhost:8080/mcp -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"traffic_factor","arguments":{"zone":10,"hour":18}}}'Despliegue
Google Cloud Run
gcloud run deploy logistics-mcp-server \
--source . \
--region us-central1 \
--allow-unauthenticatedCloud Run inyecta $PORT y el Dockerfile ya lo respeta. El deploy imprime una
URL HTTPS; usar <url>/mcp en el config/servers.json del chatbot:
{ "name": "logistics-remote", "transport": "http", "url": "https://logistics-mcp-server-xxxx.run.app/mcp" }Cualquier host con Docker
docker build -t logistics-mcp-server .
docker run -p 8080:8080 logistics-mcp-serverIntegridad
Repositorio publico, desarrollo individual para CC3067. Solo datos ficticios. Uso de IA generativa conforme al reglamento de la UVG.
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/JPLopez23/logistics-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server