Skip to main content
Glama
logistics-mcp-server

logistics-mcp-server

by JPLopez23

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

traffic_factor

zone (int), hour (0-23)

multiplicador de tiempo de viaje (>= 1.0) para una zona a esa hora

holiday_calendar

country (ej. GT), date (YYYY-MM-DD)

is_holiday, holiday_name, is_weekend, restriccion de circulacion

fuel_price

country, date?

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.

Related MCP server: bus-scheduling-mcp

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/mcp

Prueba 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-unauthenticated

Cloud 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-server

Integridad

Repositorio publico, desarrollo individual para CC3067. Solo datos ficticios. Uso de IA generativa conforme al reglamento de la UVG.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      AI-powered route optimization MCP server for heavy vehicles and logistics. Calculate truck-optimized routes, predict traffic congestion with LSTM neural networks, compute toll costs, fuel costs and CO2 emissions, find truck stops and check weather along any European route.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to read and write Brazilian carrier transportation management data, including fiscal documents (CT-e, MDF-e, NF-e), financial records, fleet and maintenance, trip control, and people registries via MCP over HTTP.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables desktop agents and clients to access geospatial services via a hosted MCP server, including OpenStreetMap queries, address and business search, POI discovery, routing, matrices, isochrones, map matching, optimization, elevation and terrain, basemap styling, spatial analysis, rendering, usage, and service status.
      32 npm
      MIT