overspan-mcp
This MCP server gives metered, read-only access to full-planet OpenStreetMap data through Overspan’s hosted Overpass API, with raw query and helper tools.
Run raw Overpass QL queries against OpenStreetMap data.
Find OSM features matching tag filters near a point within a radius.
Find OSM features matching tag filters inside a bounding box.
Count matching features in an area without returning them, useful for checking result size before pulling data.
Check API key tier, limits, quota usage, and recent request history without consuming quota.
Use bounded helper limits, response truncation, and quota reporting to pace queries.
Provides tools for querying and retrieving OpenStreetMap data via the Overpass API, including raw Overpass QL queries, nearby search, bounding-box search, and feature counting.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@overspan-mcp Count cafes near the Eiffel Tower"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
overspan-mcp
An MCP (Model Context Protocol) server for Overspan, the hosted Overpass API. It gives Claude, Cursor, and any other MCP client direct, metered access to full-planet OpenStreetMap data: raw Overpass QL plus helper tools for nearby search, bounding-box search, counting, and usage checks.
You need an Overspan API key. Try it free for 7 days at overspan.dev/trial: a trial key by email, 2,000 requests, no card. Plans start at $19/month at overspan.dev; the key arrives by email after checkout, no account needed.
Quickstart
Claude Code
claude mcp add overspan --env OVERSPAN_API_KEY=YOUR_KEY -- npx -y overspan-mcpClaude Desktop, Cursor, and other JSON-configured clients
{
"mcpServers": {
"overspan": {
"command": "npx",
"args": ["-y", "overspan-mcp"],
"env": {
"OVERSPAN_API_KEY": "YOUR_KEY"
}
}
}
}The key must be in the server's env block. MCP clients start servers with their own environment, so a variable exported in your shell profile will not reach it. Treat any config file containing the key as a secret; in Claude Code's .mcp.json you can write "OVERSPAN_API_KEY": "${OVERSPAN_KEY}" to keep the key in your environment and out of the file.
Related MCP server: @cyanheads/openstreetmap-mcp-server
Tools
Tool | What it does |
| Run a raw Overpass QL query. The escape hatch when the helpers are too narrow. |
| Features matching tag filters within a radius of a point. |
| Features matching tag filters inside a bounding box. |
| Count matches in an area without returning them. Cheap; use it before pulling data. |
| The key's tier, limits, month-to-date quota, and recent requests. Never consumes quota. |
The server also exposes two resources the model can read (overspan://overpass-ql, a QL cheat sheet, and overspan://differences, how Overspan differs from the public servers) and one prompt (write-bounded-overpass-query).
Behaviour worth knowing
The key is sent as an
Authorization: Bearerheader, never in a URL.Every successful tool result carries a quota line (
[quota] 49998 of 50000 requests remaining, window ends 2026-12-01T00:00:00Z) so an agent can pace itself. A plan's window is the month; a trial's is its 7 days.get_usagegives the full picture and is free to call.Errors come back in plain language with the gateway's error code, what it means, and whether to retry. Rejected requests do not consume quota, and a runaway loop is bounded by the key's own rate and concurrency caps, never by a larger bill. A trial key adds two:
trial_busy(wait and retry: paying customers come first while the servers are busy) andtrial_ended(the 7 days are over; do not retry).Oversized responses are trimmed to fit a model's context: for Overpass JSON the element list is cut and the result says how many elements were dropped. Raise the cap with
OVERSPAN_MAX_RESPONSE_CHARSif you want more.Queries without
[timeout:]get 25 seconds. Set it explicitly for heavy queries, up to your tier's cap.
Environment variables
Variable | Required | Default | Purpose |
| yes | Your Overspan API key | |
| no |
| Override the API endpoint |
| no |
| Truncation threshold for tool results |
Data licence
Results are OpenStreetMap data, licensed under the Open Database License. Anything you publish that shows or derives from this data needs a visible credit reaching openstreetmap.org/copyright. Your Overspan subscription pays for hosting and access, not for the data, and does not change those obligations.
Development
npm install
npm run build
npm testThe test suite covers the query builders, response shaping, error mapping, and a full in-memory MCP client round trip.
Links
Overspan is an independent service, not affiliated with the OpenStreetMap Foundation or the Overpass API project.
MIT licensed.
Available Tools
5 toolscount_featuresCount matching featuresARead-only
Count OpenStreetMap features matching tag filters in an area without returning them. Cheap. Use this before pulling data when the result size is unknown. Give either a point (lat, lon, radius_m) or a bounding box (south, west, north, east).
Inputs: tags (required), lat, lon, east, +4 more.
features_in_bboxFind features in a bounding boxARead-only
Find OpenStreetMap features matching tag filters inside a bounding box (south, west, north, east in decimal degrees). Returns up to 'limit' elements with their tags and a centre coordinate. Keep boxes small; for city-sized areas call count_features first.
Inputs: east (required), tags (required), west (required), north (required), +2 more.
find_nearbyFind features near a pointARead-only
Find OpenStreetMap features matching tag filters within a radius of a point. Returns up to 'limit' elements with their tags and a centre coordinate. Good first tool for questions like 'what cafes are near X'. For larger or unknown result sets, call count_features first.
Inputs: lat (required), lon (required), tags (required), limit, +1 more.
get_usageCheck Overspan usage and limitsARead-only
Check this API key's tier, its limits, month-to-date quota, and recent request history. Does not consume query quota. Use it to pace yourself when running many queries.
Inputs: no named parameters.
overpass_queryRun raw Overpass QLARead-only
Run a raw Overpass QL query against the Overspan hosted Overpass API (full-planet OpenStreetMap data, minutes behind live). Use this when the helper tools are too narrow. Always bound the query to an area and cap the output (for example: out center 25;). Start with [out:json]. Queries without [timeout:] get 25 seconds. Read the overspan://overpass-ql resource for syntax and the overspan://differences resource for how this server differs from the public ones.
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
find_nearby and features_in_bbox both fetch OSM features by location, but their radius-vs-bounding-box distinction is clearly explained and they cover different query shapes. overpass_query, count_features, and get_usage are each clearly separate from the helpers and from each other.
Most names use lowercase snake_case, but the conventions vary: overpass_query and features_in_bbox are noun-like, while find_nearby, count_features, and get_usage are verb-led. None are confusing, but there is no single predictable verb_noun pattern across the set.
Five tools is well-scoped for an Overpass API server: one raw query escape hatch, two standard spatial search helpers, a counting tool for sizing result sets, and a usage-monitoring tool. Each tool has a distinct role and none feel redundant.
The tool surface covers the core workflow well: count before pulling data, query by point or bounding box, and fall back to a raw Overpass query when helpers are too narrow. get_usage also covers the operational side of the hosted API, so there are no obvious dead ends.
Maintenance
Related MCP Connectors
OpenStreetMap Overpass MCP — programmatic queries against the OSM database
Query OpenStreetMap with Overpass QL, find water and food stops along routes, and check weather at arrival time. Free API key: 500 requests/day, including commercial use. [Setup and examples](https://geo.runningcat.dev/mcp?utm_source=glama&utm_medium=referral&utm_campaign=mcp_directory).
Geocoding, static maps and privacy-safe area maps from OpenStreetMap data. Hard caps, no overage.
Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables programmatic queries against the OpenStreetMap database using the Overpass API.72 npmMIT
- AlicenseNot gradedqualityAmaintenanceGeocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data via MCP.518 npm9Apache 2.0
- AlicenseAqualityDmaintenanceMCP server providing structured access to OpenStreetMap data through Overpass and Nominatim APIs, enabling geocoding, nearby place searches, element queries, and tag counting without API keys.7MIT
- AlicenseNot gradedqualityCmaintenanceEnables desktop agents and clients to access geospatial services via a hosted MCP server, including OpenStreetMap queries, address and business search, POI discovery, routing, matrices, isochrones, map matching, optimization, elevation and terrain, basemap styling, spatial analysis, rendering, usage, and service status.32 npmMIT