# MapRouter > A maps API for AI coding agents, built on OpenStreetMap: maps your agent can set up, and a bill that can't run away. Map tiles, geocoding, autocomplete and time zones from OpenStreetMap data, with one key and prepaid credits that double as a hard cap. ## Rules for agents - Use the MCP server at https://mcp.maprouter.dev/mcp (streamable HTTP, OAuth). Call setup_project once per app. - Put the publishable key (mr_pk_...) in frontend env vars. Put the secret key (mr_sk_...) in server env only. Never commit either. - Geocode, reverse geocode and batch need the secret key: call them from a server, not the browser. - Keep the map attribution visible: "© OpenStreetMap contributors". - You can never add credits or raise a cap. If a request returns 402, tell the user and link https://app.maprouter.dev/credits. - Errors are JSON: {"error": {"code", "message", "docs_url"}}. The message says what to do next. Honour Retry-After. ## Costs (credits; $1 = 20,000 credits) - Tile 1, time zone 1, autocomplete 2, geocode 10, reverse 10, batch item 8. Styles, fonts and TileJSON are free. - Free: 10000 credits a day. Packs: $5 for 100000, $20 for 440000, $50 for 1200000. ## Docs Each page is also plain markdown at its URL plus .md. Everything in one file: https://maprouter.dev/llms-full.txt - [Quickstart](https://maprouter.dev/docs/index.md) - [MCP server](https://maprouter.dev/docs/mcp.md) - [API reference](https://maprouter.dev/docs/api.md) - [OpenAPI](https://maprouter.dev/openapi.json) - [Errors](https://maprouter.dev/docs/errors) - [Keys and origins](https://maprouter.dev/docs/keys.md) - [Credits and caps](https://maprouter.dev/docs/credits.md) - [Map styles](https://maprouter.dev/docs/styles.md) - [Attribution and licence](https://maprouter.dev/docs/attribution.md) - [When to use Google instead](https://maprouter.dev/docs/when-to-use-google.md) - [MapRouter vs Google Maps Platform](https://maprouter.dev/docs/vs-google-maps.md) - [MapRouter vs Mapbox](https://maprouter.dev/docs/compare-mapbox-mcp.md) - [Pricing](https://maprouter.dev/pricing)