Smartroutes

io.smartroutes由 smartroutes.io 发布官方发布者v1.0.0更新于 Oct 24, 2026

Route optimisation, orders, booking and fleet management for a SmartRoutes depot.

已验证Streamable HTTP可网页运行效率与工作流商业与电商

概览

AI 生成的概览

SmartRoutes MCP 服务器把 AI 助手连接到实时的 SmartRoutes 仓库账户,用于路线优化、订单、预约和车队管理。

可以做什么
列出并读取订单,可按状态、客户、订单号或最后更新时间筛选,并查看单个订单的完整详情,以及仓库的客户。创建新的取货、配送或货运订单。检查某个时间窗和地址是否可服务。为某一天触发路线优化,并轮询任务状态直到完成。按计划 ID 读取计划汇总和路线概要,以及单条路线的逐站详情。列出车队车辆及其班次、容量和技能,并读取单辆车的完整详情。
适用场景
适合在 SmartRoutes 中规划和调度配送的人:在对话中询问哪些订单尚未排程、查看计划、检查预约可用性、新增订单,或基于实时仓库数据启动优化。
运行要求
位于 mcp.smartroutes.io 的远程 Streamable HTTP 端点,无需本地运行时或软件包。需要已有的 SmartRoutes API 密钥,在账户的 Settings、Integrations、SmartRoutes Open API 中生成,通过 Authorization Bearer 头或 x-access-key 头发送。密钥仅限单个仓库。
安装前请注意
API 密钥是访问账户数据的机密;停用后 MCP 和 REST 访问都会立即被阻断。add_order 会创建真实订单,optimise_plan_for_date 被标记为破坏性操作,因为自动调度会把计划发布给司机并通知客户。将 x-access-scope 设为 read-only 会移除两个写入工具,其他任何值都会被拒绝。以工作区或组织可见性共享的连接器共用一把密钥,审计日志记录的是密钥而非具体人员。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Smartroutes,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

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

ToolTypeDescription
list_ordersReadOrders for the depot (filter by status, customer, order number, or last-updated time; paginated)
get_orderReadFull detail for a single order
add_orderWriteCreate a new order (pickup, delivery, or shipment)
check_booking_availabilityReadWhether a time window + address can be served
optimise_plan_for_dateWriteTrigger route optimisation for a date
get_optimisation_statusReadPoll an optimisation job until it finishes
get_planReadPlan-level totals and route summary, by plan id
get_routeReadPer-stop detail for a single route
list_vehiclesReadFleet vehicles with shifts, capacities, and skills
get_vehicleReadFull detail for a single vehicle
list_customersReadCustomers for the depot

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:

x-access-scope: read-only

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.

json
{  "mcpServers": {    "smartroutes-readonly": {      "type": "http",      "url": "https://mcp.smartroutes.io/mcp",      "headers": {        "x-access-key": "<your-api-key>",        "x-access-scope": "read-only"      }    }  }}

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:

HeaderWhen to use it
Authorization: Bearer <your-api-key>Works everywhere. Use this on hosted platforms whose only credential field is Authorization — Mistral Studio and most connector directories.
x-access-key: <your-api-key>Equally valid and unchanged. Use it wherever you can name the header yourself: Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, your own scripts.

A few things worth knowing:

  • The scheme word is case-insensitive — Bearer, bearer and BEARER all work. The key itself is case-sensitive, so copy it exactly.
  • Basic and Digest are 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>:

json
{  "mcpServers": {    "smartroutes": {      "type": "http",      "url": "https://mcp.smartroutes.io/mcp",      "headers": {        "x-access-key": "<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:

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):

json
{  "mcpServers": {    "smartroutes": {      "url": "https://mcp.smartroutes.io/mcp",      "headers": {        "x-access-key": "<your-api-key>"      }    }  }}
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):

json
{  "mcpServers": {    "smartroutes": {      "serverUrl": "https://mcp.smartroutes.io/mcp",      "headers": {        "x-access-key": "<your-api-key>"      }    }  }}
Any MCP Client (generic)

The server uses Streamable HTTP transport. Either header works:

text
POST https://mcp.smartroutes.io/mcpAuthorization: Bearer <your-api-key>
text
POST https://mcp.smartroutes.io/mcpx-access-key: <your-api-key>

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):

text
http://localhost:3000/mcp-api

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.

ActionDescription
UseThe same key as the REST API, sent as either Authorization: Bearer or x-access-key; scoped to one depot.
DisableDisabling a key in your SmartRoutes account immediately blocks both MCP and REST access.

Troubleshooting

401 UNAUTHORIZED

The server didn't get a usable key. The description in the response body tells you which case you hit:

DescriptionWhat to do
No API key provided…Neither header reached the server. On hosted platforms, check the header was actually saved onto the connector rather than just typed into the form.
Unsupported Authorization scheme…You sent Basic, Digest or something else. Only Bearer is accepted.
Authorization header has no credential after the schemeThe value is Bearer with nothing after it.
Authorization header must carry exactly one credentialTwo credentials ended up in one header value.
Conflicting credentials…Both headers were sent with different values. Remove one.
Invalid API Key providedThe key arrived but doesn't match an account. Re-copy it from Settings > Integrations — a truncated paste is the usual cause.
Attempting to use disabled API keyThe key was disabled in your SmartRoutes account. Generate a new one.
API Key not authorized for expired trial accountThe account's trial has ended.

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:

json
{  "name": "UNAUTHORIZED",  "statusCode": 401,  "description": "…",  "details": {}}

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 the x-access-key header. Basic, Digest and 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:

  1. list_orders / list_vehicles — see what's available
  2. check_booking_availability — confirm a slot (optional)
  3. add_order — enter new work
  4. optimise_plan_for_date — build the plan (confirm before auto-dispatch)
  5. get_optimisation_status — poll until it finishes
  6. get_plan / get_route — read the result

来源:README.md,提交 fb2f4f2

工具

0
该服务器需要 API 密钥等凭据,因此 SourceWeft 无法在没有凭据的情况下读取其工具,也未收录。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分