delivery-mcp-server
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., "@delivery-mcp-serverPlan optimized routes for today's deliveries"
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.
delivery-mcp-server
A local MCP server (Model Context Protocol) that plans capacitated vehicle routes with time windows (CVRPTW) for a last-mile delivery fleet. Built for CC3067 Redes — Proyecto 1, point 5 (own non-trivial local server).
Transport: stdio, newline-delimited JSON.
Protocol: JSON-RPC 2.0 implemented by hand — no MCP SDK.
Solver: Google OR-Tools (CVRPTW) with an automatic pure-Python Clarke-Wright + 2-opt fallback.
Storage: SQLite, auto-created and seeded on first run.
Why it is not trivial: it respects weight and unit capacity, hard time windows with per-stop service time, driver shift limits, mandatory return to the depot, and it reports infeasible deliveries with a reason instead of failing silently. It also supports what-if analysis (marginal cost of inserting a delivery) and fleet disruptions (vehicle out of service → reassignment).
Tools
Tool | Parameters | Returns |
|
| deliveries with weight, address, time window |
|
| fleet with capacity (kg/units) and shift |
|
| per-vehicle stop sequence, ETA, distance, duration; unassigned + why; persisted plan |
|
| full stop-by-stop detail with cumulative load |
|
| marginal km/min per active route, best position, capacity / time-window feasibility |
|
| inserts and rewrites downstream ETAs |
|
| marks inactive, returns orphaned deliveries |
|
| redistributes among active vehicles; lists what did not fit |
|
| confirms change |
|
| printable route sheet text |
Full request/response examples: examples/usage.md.
Related MCP server: ILP Drone Delivery MCP Server
Installation
git clone https://github.com/JPLopez23/delivery-mcp-server.git
cd delivery-mcp-server
uv sync
# or: python -m venv .venv && source .venv/bin/activate && pip install -e .If OR-Tools does not install on your platform, remove it from
pyproject.toml — the server automatically falls back to the built-in
Clarke-Wright heuristic (capacity-aware; reports, but does not hard-enforce,
time windows).
The SQLite database is created from data/schema.sql + data/seed.sql the
first time the server starts. Delete data/routes.db to reset. Override the
path with the ROUTE_DB environment variable.
Optional: set OSRM_URL to a running OSRM instance to use real road distances
instead of haversine + urban detour factor.
Running
The server speaks MCP on stdin/stdout; a host (our chatbot, or Claude Desktop) launches it. Manual smoke test:
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"t","version":"0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"plan_routes","arguments":{"date":"2026-08-30"}}}' \
| uv run python -m route_optimizer.serverUse from the chatbot host
In the host's config/servers.json:
{
"name": "delivery",
"transport": "stdio",
"command": "uv",
"args": ["run", "--directory", "../delivery-mcp-server", "python", "-m", "route_optimizer.server"],
"env": { "ROUTE_DB": "data/routes.db" }
}Use from Claude Desktop
{
"mcpServers": {
"delivery": {
"command": "uv",
"args": ["run", "--directory", "/abs/path/delivery-mcp-server", "python", "-m", "route_optimizer.server"]
}
}
}Specification
Transport: stdio. One JSON-RPC 2.0 message per line, UTF-8.
Methods:
initialize,notifications/initialized,tools/list,tools/call,ping.Protocol version:
2025-06-18.Errors: standard JSON-RPC codes (
-32700parse,-32600invalid request,-32601method not found,-32602invalid params,-32603internal). Tool failures come back as a normal result withisError: trueand a text message, so the LLM can react.Coordinates: WGS-84 decimal degrees. Times:
HH:MM, 24h, local.
Data model: depots, vehicles, deliveries, routes, route_stops
(see data/schema.sql).
Tests
uv run --with pytest python -m pytest -q18 tests in tests/test_tools.py: every tool, the three
guide scenarios (plan the fleet's day / urgent insertion with marginal cost /
vehicle breakdown + reassignment), and the constraints that make the server
non-trivial — weight and unit capacity, hard time windows with per-stop service
time, driver shifts, depot return, and explicit infeasibility reporting.
License / integrity
Public repository, developed individually for CC3067. OR-Tools usage follows its Apache-2.0 license. Generative AI was used per UVG policy.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
Route optimization for delivery fleets: plan, edit, and re-optimize multi-stop routes by prompt.
Optimize crew and workforce schedules, resource allocation, and routing with linear and mixed-inte…
- mcpOAuthcom.crisphive
Field operations on a deterministic solver — run jobs, crews & fleet from Claude or ChatGPT.
Plan optimal container & truck loads: 3D layouts, utilization, centre of gravity, crush checks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAI-powered delivery dispatch management system with 29 tools for managing orders, drivers, and intelligent route assignments. Uses Gemini 2.0 Flash AI to optimize delivery assignments based on weather, traffic, driver capabilities, and vehicle types.1MIT
- FlicenseAqualityDmaintenanceEnables Large Language Models to interact with the ILP Drone Delivery System to plan deliveries, check drone availability, and generate route visualizations. It allows users to manage logistics tasks like capacity planning and temperature requirement matching through natural language.6-
- AlicenseNot gradedqualityBmaintenanceProvides supply chain and shipping tools including shipment tracking, route optimization, warehouse inventory management, delivery ETA estimation, and customs documentation. Enables logistics operations through natural language interactions with Claude.14MIT
- FlicenseAqualityDmaintenanceEnables AI agents to query orders, manage routes, track drivers, and analyze delivery performance on the FleetSync last-mile delivery platform through natural language.18-
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/delivery-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server