Add MappyBot to Claude Code (MCP route planner)
Claude Code connects to MappyBot as a remote HTTP MCP server, with your MappyBot account token in the Authorization header.
1. Create a token
- Choose a plan on the pricing page, verify your email and sign in on the account page.
- Under MCP connector, enter a connection name and select Create connection.
- Copy the token. It starts with
mappy_, is shown once and lasts 30 days. You can revoke it on the account page.
2. Add MappyBot to Claude Code
Put the token in an environment variable, then add the server:
export MAPPY_TOKEN="mappy_…"
claude mcp add --transport http --scope user mappybot https://api.mappybot.com/mcp \
--header "Authorization: Bearer $MAPPY_TOKEN"
Your shell fills in the token, and Claude Code saves the header in ~/.claude.json on your computer. Leave out --scope user to add MappyBot to the current project only.
To keep the token out of configuration files, add MappyBot to a project’s .mcp.json instead. Claude Code reads MAPPY_TOKEN from your environment each time it connects:
{
"mcpServers": {
"mappybot": {
"type": "http",
"url": "https://api.mappybot.com/mcp",
"headers": { "Authorization": "Bearer ${MAPPY_TOKEN}" }
}
}
}
Never paste the token into a chat, a job list or a file you commit.
3. Check the connection
Run claude mcp get mappybot, or /mcp inside Claude Code. MappyBot should show as connected with its tools: get_capabilities, preview_route, plan_route, get_route_plan and preview_route_change.
4. Plan a route
Try a prompt like this, with your own addresses:
Use MappyBot to plan tomorrow's route for one driver. Start and end at
our shop (address). Shift 9:00-17:00, time zone America/New_York.
Visit these 8 jobs, 30 minutes each; job 3 must be visited between
10:00 and 12:00. Show the stop order, arrival times, navigation links
and any unassigned jobs.
Claude should call get_capabilities, then preview_route, then plan_route, and read the result with get_route_plan. Results show the Google Maps attribution. The job-list guide and the CSV template help you prepare the stops. SKILL.md describes the same steps for agents; Claude Code can load it as a skill from ~/.claude/skills/mappybot/SKILL.md.
Troubleshooting
- Failed to connect, 401: the token expired (after 30 days) or was revoked. Create a new token, then run
claude mcp remove mappybotand add it again, or updateMAPPY_TOKEN. Claude Code reports a rejected Authorization header as a failed connection; it does not switch to browser sign-in. - Optimization unavailable:
get_capabilitiesreports whether route optimization is available for your account. Calls made while it is unavailable return an error and use no stops. - Too many stops: each plan has a per-route limit (Personal 10, Business 50, Fleet 100, Enterprise 100 stops). Split the day or see pricing.
Claude Code also supports MCP sign-in with OAuth. We’ll add those steps after testing them with MappyBot; until then, use the token.
Claude Code’s --header option and .mcp.json variable expansion are described in Anthropic’s Claude Code MCP documentation (checked October 30, 2026).