Enables AI agents to integrate maps, geocoding, and time zone data into applications using OpenStreetMap and MapLibre.
Also known as maprouter-dev/maprouter-mcp, maprouter-mcp
- Stars
- 0
- Tools
- 8
- Downloads, 30 days
- —
- Latest version
- 0.1.1
- Last commit
- Nov 1, 2026
- License
- MIT
What is MapRouter MCP?
MapRouter enables AI agents to integrate maps, geocoding, and time zone data into applications using OpenStreetMap and MapLibre. It exposes 8 tools, such as setup_project, geocode, reverse_geocode.
Summary generated from the project's README
About MapRouter MCP server
MapRouter provides developers and AI agents with tools to integrate mapping, geocoding, and time zone data into web applications. It works with OpenStreetMap and MapLibre to generate functional code snippets for frameworks like React, Vue, Svelte, or plain HTML. Users can connect via a hosted HTTP transport using GitHub authentication or run it locally using Node 22.18 or later with a secret key.
The server includes specific tools for geocoding addresses, performing reverse geocoding, and providing search-as-you-type autocomplete suggestions. It also retrieves IANA time zone information and UTC offsets for specific coordinates. A unique feature is the prepaid credit system that allows an agent to monitor usage and lower budget caps through the check_usage and set_key_budget tools, though it cannot increase spending limits.
Developers can implement this as a standalone MCP server or integrate it as a library within web-standard environments like Deno, Bun, or Workers. The setup process includes generating origin-locked publishable keys and secret keys to manage different application needs.
What you can do with it
- 1Generate interactive map codeAsk the agent to write MapLibre code including markers for a specific web framework.
Written from the project's README. Every use case is checked against a quote from it.
How to install MapRouter MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall MapRouter MCP in Claude Code
$ claude mcp add --env 'MAPROUTER_SECRET_KEY=<YOUR_MAPROUTER_SECRET_KEY>' maprouter-mcp -- npx -y maprouter-mcpInstall MapRouter MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"maprouter-mcp": {
"command": "npx",
"args": [
"-y",
"maprouter-mcp"
],
"env": {
"MAPROUTER_SECRET_KEY": "<YOUR_MAPROUTER_SECRET_KEY>"
}
}
}
}Install MapRouter MCP in VS Code
.vscode/mcp.json
{
"servers": {
"maprouter-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"maprouter-mcp"
],
"env": {
"MAPROUTER_SECRET_KEY": "<YOUR_MAPROUTER_SECRET_KEY>"
}
}
}
}Install MapRouter MCP in VS Code CLI
$ code --add-mcp '{"name":"maprouter-mcp","type":"stdio","command":"npx","args":["-y","maprouter-mcp"],"env":{"MAPROUTER_SECRET_KEY":"<YOUR_MAPROUTER_SECRET_KEY>"}}'Install MapRouter MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"maprouter-mcp": {
"command": "npx",
"args": [
"-y",
"maprouter-mcp"
],
"env": {
"MAPROUTER_SECRET_KEY": "<YOUR_MAPROUTER_SECRET_KEY>"
}
}
}
}Install MapRouter MCP in Codex
$ codex mcp add maprouter-mcp --env 'MAPROUTER_SECRET_KEY=<YOUR_MAPROUTER_SECRET_KEY>' -- npx -y maprouter-mcpInstall MapRouter MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.maprouter-mcp] command = "npx" args = ["-y", "maprouter-mcp"] [mcp_servers.maprouter-mcp.env] MAPROUTER_SECRET_KEY = "<YOUR_MAPROUTER_SECRET_KEY>"
Install MapRouter MCP in Gemini CLI
$ gemini mcp add -s user -e 'MAPROUTER_SECRET_KEY=<YOUR_MAPROUTER_SECRET_KEY>' maprouter-mcp npx -- -y maprouter-mcpInstall MapRouter MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"maprouter-mcp": {
"command": "npx",
"args": [
"-y",
"maprouter-mcp"
],
"env": {
"MAPROUTER_SECRET_KEY": "<YOUR_MAPROUTER_SECRET_KEY>"
}
}
}
}MapRouter MCP tools 8
Detected from the READMEsetup_projectgeocodereverse_geocodeautocompletetimezoneget_map_snippetcheck_usageset_key_budget
| setup_project | — | |
| geocode | — | |
| reverse_geocode | — | |
| autocomplete | — | |
| timezone | — | |
| get_map_snippet | — | |
| check_usage | — | |
| set_key_budget | — |
Configuration
MAPROUTER_SECRET_KEYRequiredSecretA secret key (mr_sk_...) from app.maprouter.dev
| Name | Description | |
|---|---|---|
| MAPROUTER_SECRET_KEY | A secret key (mr_sk_...) from app.maprouter.dev | RequiredSecret |
Automated checks
Ran Nov 12, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSPass
- Destructive tools are labelledPass
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHubMapRouter MCP server
Maps your agent can set up, and a bill that can't run away.
This MCP server lets a coding agent add a working map to an app: it creates MapRouter keys, geocodes addresses, and writes MapLibre code for HTML, React, Vue or Svelte. MapRouter is prepaid, so the agent can read usage and lower budgets but can never add credits or raise a budget.
Use the hosted server (recommended)
No key to copy: it signs you in with GitHub.
claude mcp add --transport http maprouter https://mcp.maprouter.dev/mcp
Claude Code plugin
This repo is also a Claude Code plugin marketplace. The plugin adds the hosted server and an
add-a-map skill:
/plugin marketplace add maprouter-dev/maprouter-mcp
/plugin install maprouter@maprouter
Run it locally
For clients that only run local servers. (The npm package is not published yet; until then,
clone this repo and point your client at node src/stdio.ts.) Create a secret key at https://app.maprouter.dev.
{
"mcpServers": {
"maprouter": {
"command": "npx",
"args": ["-y", "maprouter-mcp"],
"env": { "MAPROUTER_SECRET_KEY": "mr_sk_..." }
}
}
}
Requires Node 22.18 or later.
Tools
| Tool | What it does | Cost |
|---|---|---|
setup_project |
Creates a publishable key (browser, origin-locked) and a secret key, returns env lines | Free |
geocode |
Address or place to coordinates | 10 credits |
reverse_geocode |
Coordinates to address | 10 credits |
autocomplete |
Search-as-you-type suggestions | 2 credits |
timezone |
IANA zone, UTC offset and DST at a point | 1 credit |
get_map_snippet |
Working MapLibre code with markers | Free |
check_usage |
Balance, free quota and key caps | Free |
set_key_budget |
Lowers a key's daily or monthly cap (never raises) | Free |
Map data © OpenStreetMap contributors.
Use it as a library
import { MapRouterClient, createServer, handleMcpRequest } from 'maprouter-mcp';
const client = new MapRouterClient({ key: process.env.MAPROUTER_SECRET_KEY! });
// Any web-standard server: Workers, Deno, Bun, Node 22+.
export default { fetch: (request: Request) => handleMcpRequest(request, client) };
Licence
MIT
MapRouter MCP questions
How do I add MapRouter MCP to Claude Code?
Run claude mcp add --env 'MAPROUTER_SECRET_KEY=<YOUR_MAPROUTER_SECRET_KEY>' maprouter-mcp -- npx -y maprouter-mcp in your terminal. Add --scope user to make it available in every project.
How do I add MapRouter MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does MapRouter MCP provide?
It exposes 8 tools, including setup_project, geocode, reverse_geocode, autocomplete, timezone.
How can I prevent unexpected costs when using MapRouter?
MapRouter is a prepaid service where agents can read usage and lower budgets, but they can never add credits or raise a budget.
What programming frameworks can I use to generate map code?
The server can write MapLibre code specifically for HTML, React, Vue, or Svelte.
How do I connect to the hosted version of the server?
You can add the hosted server via Claude using the HTTP transport and the provided URL.