
Smartroutes
io.smartroutes由 smartroutes.io 發布官方發布者v1.0.0更新於 Oct 24, 2026
Route optimisation, orders, booking and fleet management for a SmartRoutes depot.
概覽
SmartRoutes MCP 伺服器把 AI 助理連接到即時的 SmartRoutes 倉庫帳戶,用於路線最佳化、訂單、預約和車隊管理。
- 可以做什麼
- 列出並讀取訂單,可依狀態、客戶、訂單編號或最後更新時間篩選,並查看單筆訂單的完整詳情,以及倉庫的客戶。建立新的取貨、配送或貨運訂單。檢查某個時間窗和地址是否可服務。為某一天觸發路線最佳化,並輪詢工作狀態直到完成。依計畫 ID 讀取計畫彙總和路線概要,以及單一路線的逐站詳情。列出車隊車輛及其班次、容量和技能,並讀取單一車輛的完整詳情。
- 適用情境
- 適合在 SmartRoutes 中規劃和調度配送的人:在對話中詢問哪些訂單尚未排程、查看計畫、檢查預約可用性、新增訂單,或依即時倉庫資料啟動最佳化。
- 執行需求
- 位於 mcp.smartroutes.io 的遠端 Streamable HTTP 端點,不需要本機執行環境或套件。需要既有的 SmartRoutes API 金鑰,在帳戶的 Settings、Integrations、SmartRoutes Open API 中產生,透過 Authorization Bearer 標頭或 x-access-key 標頭傳送。金鑰僅限單一倉庫。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Smartroutes,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.smartroutes%2Fsmartroutes/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"smartroutes": {
"type": "http",
"url": "https://mcp.smartroutes.io/mcp"
}
}
}README
SmartRoutes MCP Server
Expose your SmartRoutes route-optimisation and dispatch tools to AI assistants like Claude Desktop, Claude Code, Cursor, Windsurf, and any other Model Context Protocol client — working against your live data.
Overview
The MCP server connects an AI tool to your live SmartRoutes account. Ask your AI Assistant which orders are still unscheduled, review a route plan, or kick off an optimisation — all in chat, against your real data.
It exposes the same operations as the SmartRoutes REST API, shaped as clean tools an agent can call directly. Everything is scoped to a single account by your API key.
Available Tools
Every tool is annotated so your AI client can tell reads from writes. The nine read tools are marked read-only; add_order and optimise_plan_for_date are marked as writes, and optimise_plan_for_date is additionally marked destructive because auto-dispatch publishes the plan to drivers and notifies customers. Clients that gate destructive calls will ask you to confirm before running it.
Read-only mode
Those annotations are hints your client chooses to honour. To make writes impossible, add one header:
The server then exposes only the nine read tools. add_order and optimise_plan_for_date are absent from the tool list entirely and cannot be called, so there is nothing for an assistant to invoke by accident — useful while testing, or for people who should only ever look things up.
Omit the header for the full tool set. Any other value is rejected with a 400, rather than being ignored, so a typo can never quietly restore write access.
Register both entries side by side and pick per conversation. Any client that lets you set request headers supports this.
Setup
1. Get your API key
The MCP server uses your existing SmartRoutes API key — the same one you already use for the REST API. There is no separate MCP credential, no sign-in flow, and no token that expires or needs refreshing.
To generate an API Key, login to your SmartRoutes account and go to Settings > Integrations > SmartRoutes Open API and click on the Generate API Key button.
Treat the key as a secret; it grants access to your account's data.
2. Choose how to send it
Two headers are accepted and they are interchangeable — the value is the same API key either way:
A few things worth knowing:
- The scheme word is case-insensitive —
Bearer,bearerandBEARERall work. The key itself is case-sensitive, so copy it exactly. BasicandDigestare not supported. If the tool you're configuring only offers a username/password style credential, get in touch rather than base64-encoding the key yourself — it will be rejected.- Send one of the two. If both are present with different values the request is rejected rather than one being picked, because guessing could point the assistant at the wrong account. Sending both with the same value is fine.
3. Connect your AI tool
Ready-to-copy config files for every client live in
examples/— drop in your key and go.
Quick start (Claude Code)
This repo includes a pre-configured .mcp.json. Just replace <your-api-key>:
Claude Code auto-discovers this file when you open the project.
Claude Desktop
Add a Custom Connector for SmartRoutes by going to: Settings → Connectors → Add custom connector
Here you can add the following details:
- Name: SmartRoutes (or whatever you like)
- URL: https://mcp.smartroutes.io/mcp
Add your authentication header under Advanced settings / Request headers in that same dialog:
- Key: x-access-key
- Value: your actual API key
Alternatively, you can add the following to your Claude Desktop config (claude_desktop_config.json):
Mistral Studio
Register SmartRoutes as a Connector:
- URL:
https://mcp.smartroutes.io/mcp - Header name:
Authorization - Header value:
Bearer <your-api-key>
Mistral's Connectors Debugger lets you validate a server before registering it, and it asks for the credential as an Authorization header — which is exactly what the Bearer form above is for. The Debugger is in public preview, so field labels may move; the URL and the header value are what matter.
Cursor
In Cursor settings, add an MCP server:
- Name: smartroutes
- Type: Streamable HTTP
- URL:
https://mcp.smartroutes.io/mcp - Headers:
x-access-key: <your-api-key>
Windsurf
Add to your Windsurf MCP config (mcp_config.json):
Any MCP Client (generic)
The server uses Streamable HTTP transport. Either header works:
Any MCP client that speaks Streamable HTTP can connect. Legacy SSE clients are handled automatically.
4. Local development
Against a locally-running server the endpoint is (use whatever port your local app listens on):
Note the path is /mcp-api locally — the shorter /mcp on mcp.smartroutes.io is a public alias for the same endpoint. Both headers work locally exactly as they do in production.
Example Conversations
Once connected, you can ask your assistant things like:
- "What orders for tomorrow aren't on a route yet?"
- "Show me available vehicles and their shifts."
- "Can we fit a delivery to 12 Main St between 2–4pm on Friday?"
- "Optimise tomorrow's routes for all open orders — draft only, don't dispatch yet."
- "What's the status of that optimisation?"
- "Show me the plan for 2026-07-01 and the stops on route 3."
- "Add a 10 kg delivery for ACME at 5 King St."
API Key Management
Your MCP key is your SmartRoutes API key.
Troubleshooting
401 UNAUTHORIZED
The server didn't get a usable key. The description in the response body tells you which case you hit:
Every 401 also carries a WWW-Authenticate: Bearer response header. That is just the standard way of saying "a Bearer token is expected here" — it does not mean the server uses OAuth. There is no sign-in flow, no authorisation server to discover, and no /.well-known/ metadata to fetch. The static API key is the whole mechanism. If your client tries to start an OAuth flow after seeing that header, configure it with a static header credential instead.
Error shape
Errors use the same envelope as the REST API, not a JSON-RPC error object — authentication is checked before the JSON-RPC layer is reached:
Rate limits are the exception you're most likely to see mid-conversation: those come back as an MCP tool result with name: "FORBIDDEN" and details.retry_after_seconds, so the assistant can back off and retry rather than dropping the connection.
Security
- Authentication: your API key, sent as either
Authorization: Bearer <key>or thex-access-keyheader.Basic,Digestand other schemes are rejected. - Depot isolation: every key is scoped to a single depot, and all data is filtered by depot.
- Rate limiting: each tool has its own per-key rate limit (shared with the REST API's limits).
- Write confirmation: write tools (
add_order,optimise_plan_for_date) instruct the assistant to explain and confirm before running — especially auto-dispatch. - Shared connectors: a connector registered at workspace or organisation visibility shares one API key across everyone who can see it, and our audit log records the key rather than the individual user. Register it personally if you need per-person attribution.
How it works
The MCP server runs the same engine as the SmartRoutes REST API — each tool calls the same underlying service, so MCP and the API always agree on behaviour and data. Transport is Streamable HTTP; authentication is your API key.
A typical "plan tomorrow's routes" flow:
list_orders/list_vehicles— see what's availablecheck_booking_availability— confirm a slot (optional)add_order— enter new workoptimise_plan_for_date— build the plan (confirm before auto-dispatch)get_optimisation_status— poll until it finishesget_plan/get_route— read the result
來源:README.md,提交 fb2f4f2
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分