MCP server
The MapRouter MCP server lets a coding agent set up maps end to end: keys, env lines, geocoding and working map code. It is a client of the public API, so every call it makes is metered and capped exactly like your own app.
Hosted (recommended)
claude mcp add --transport http maprouter https://mcp.maprouter.dev/mcp
On first use your browser opens a MapRouter page that names the client asking for access. Click Allow, sign in with GitHub if you haven’t, and you’re back in your editor. The client gets a secret key made just for it, which you can see and revoke in the dashboard.
Claude Code plugin
The plugin adds the hosted server plus a skill that teaches the agent MapRouter’s conventions:
/plugin marketplace add jbridgepk/maprouter-mcp
/plugin install maprouter@maprouter
Local (stdio)
For clients that only run local servers. Create a secret key in the dashboard, then:
{
"mcpServers": {
"maprouter": {
"command": "npx",
"args": ["-y", "@maprouter/mcp"],
"env": { "MAPROUTER_SECRET_KEY": "mr_sk_..." }
}
}
}
The server and plugin are open source under the MIT licence: github.com/jbridgepk/maprouter-mcp.
Tools
| Tool | What it does | Cost |
|---|---|---|
setup_project |
Creates a publishable key locked to your origins and a secret key, and returns the env lines | Free |
geocode |
Address or place to coordinates | 10 credits |
reverse_geocode |
Coordinates to address | 10 credits |
autocomplete |
Suggestions for partial input | 2 credits |
timezone |
IANA zone, UTC offset and daylight saving at a point | 1 credit |
get_map_snippet |
MapLibre code for HTML, React, Vue or Svelte, with markers | Free |
check_usage |
Balance, today’s free quota and each key’s caps | Free |
set_key_budget |
Lowers a key’s daily or monthly cap | Free |
What an agent can never do
Agents can never add credits, turn on auto top-up or raise a budget. These actions don’t exist
in the API an agent can reach: they are only in the dashboard, behind your GitHub sign-in. If
set_key_budget is asked to raise a cap, the API refuses with raise_not_allowed and the agent
is told to ask you.