Skip to main content
Glama
OpenStreetMap MCP

OpenStreetMap MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OSM_ENVNoEnvironment to target; `dev` targets master.apis.dev.openstreetmap.org.production
OSM_SCOPESNoSpace/comma separated OAuth scopes.read_prefs write_api write_notes
OSM_API_BASENoOverride the API host (default is per environment).
OSM_WEB_BASENoOverride the web host (default is per environment).
OSM_CLIENT_IDNoOAuth 2 client ID (needed for osm_login).
OSM_CONFIG_DIRNoToken storage directory.~/.config/openstreetmap-mcp
OSM_USER_AGENTNoUser agent sent on every request (OSM requires one).openstreetmap-mcp/…
OSM_ACCESS_TOKENNoUse a pre-made token instead of the login flow.
OSM_CLIENT_SECRETNoOnly for confidential apps.
OSM_REDIRECT_PORTNoLoopback port; must match the registered redirect URI.8787

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Read and edit OpenStreetMap via API v0.6 (production: https://api.openstreetmap.org). Reads work without login. Editing flow: osm_login -> osm_create_changeset -> osm_get_element (to get current version) -> osm_update_element / osm_create_element / osm_delete_element / osm_upload_diff -> osm_close_changeset. Edits are public and permanent; confirm intent with the user before writing, and verify facts rather than guessing tags.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
osm_loginA

Start OAuth 2.0 login (authorization code + PKCE). Returns a URL the user must open in a browser and approve; the token is then captured automatically by a temporary local listener (5 minute window). Afterwards call osm_whoami to confirm. Needed before any editing or note-writing tool.

osm_logoutA

Revoke the stored OAuth token and delete it from disk.

osm_whoamiA

Show the server being used and the authenticated user (if any), including permissions.

osm_capabilitiesA

Get API capabilities and limits of the connected OSM server (max bbox area, changeset size, timeouts).

osm_get_elementA

Read a single node, way, or relation (current version, or a specific version).

osm_get_elementsA

Read several elements of one type in a single call (current versions).

osm_get_element_fullA

Read a way or relation together with all the elements it references (nodes of a way; members of a relation).

osm_element_historyB

List all versions of an element, oldest first. Useful to see who changed what.

osm_element_parentsB

Find what uses an element: relations containing any element, or ways containing a node.

osm_get_bboxA

Download all data in a bounding box. The API limits the area (see osm_capabilities, default 0.25 square degrees) and node count; keep boxes small.

osm_get_changesetB

Read a changeset's metadata, optionally with its discussion comments.

osm_get_changeset_diffA

Get the osmChange (XML) describing everything a changeset created, modified, or deleted.

osm_search_changesetsA

Search changesets. All filters are optional and combined with AND. Returns newest first, max 100.

osm_get_userB

Get public profile details of a user by numeric id.

osm_create_changesetA

Open a new changeset. All edits must belong to an open changeset; give it a meaningful comment. Returns the changeset id. Edits are public and attributed to the authenticated OSM user. Follow the OSM editing guidelines; use OSM_ENV=dev to practise on the sandbox server.

osm_close_changesetA

Close a changeset you own. Changesets also close automatically after an hour of inactivity.

osm_update_changeset_tagsA

Replace all tags on an open changeset you own (include existing ones you want to keep).

osm_comment_changesetB

Post a comment on a changeset's discussion (any changeset, not only yours).

osm_create_elementA

Create one node, way, or relation inside an open changeset. Returns the new id (version is 1). Referenced nodes/members must already exist; for many related creations use osm_upload_diff. Edits are public and attributed to the authenticated OSM user. Follow the OSM editing guidelines; use OSM_ENV=dev to practise on the sandbox server.

osm_update_elementA

Replace an element's tags and geometry. This is a full replace, not a patch: first read the element with osm_get_element, change what you need, and send back everything including unchanged tags. Returns the new version. Edits are public and attributed to the authenticated OSM user. Follow the OSM editing guidelines; use OSM_ENV=dev to practise on the sandbox server.

osm_delete_elementA

Delete an element. Fails with 412 if it is still referenced by a way or relation. Nodes need their current lat/lon. Returns the new version. Edits are public and attributed to the authenticated OSM user. Follow the OSM editing guidelines; use OSM_ENV=dev to practise on the sandbox server.

osm_upload_diffA

Apply many creates/modifies/deletes atomically in one request (osmChange). Use negative ids for new elements and reference them from ways/relations in the same diff; the result maps placeholder ids to real ones. Order: creates, then modifies, then deletes. Edits are public and attributed to the authenticated OSM user. Follow the OSM editing guidelines; use OSM_ENV=dev to practise on the sandbox server.

osm_get_notes_in_bboxC

List map notes (user-reported map problems) in a bounding box. Max bbox area is limited by the server.

osm_search_notesC

Full-text search of map notes and their comments.

osm_get_noteA

Read one map note with its full comment thread.

osm_create_noteB

Create a map note at a location. Requires auth with the write_notes scope. Public and visible to everyone.

osm_comment_noteA

Add a comment to an open map note. Requires auth with the write_notes scope.

osm_close_noteA

Close a map note (optionally with a closing comment). Requires auth with the write_notes scope.

osm_reopen_noteA

Reopen a closed map note (optionally with a comment). Requires auth with the write_notes scope.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 29 tools

Disambiguation4/5

Most tools target clearly distinct resources or lifecycle stages: element reads/writes, changeset operations, notes, auth, and capabilities. The main ambiguity is among the element-read family (osm_get_element, osm_get_elements, osm_get_element_full, osm_element_history, osm_element_parents), but their descriptions make the boundaries reasonably clear.

Naming Consistency4/5

The tool set mostly follows a predictable osm_verb_noun pattern such as osm_get_element, osm_create_changeset, and osm_close_note. Minor deviations exist, notably osm_element_history and osm_element_parents missing a get_ prefix and a few noun/command-style names like osm_whoami and osm_capabilities.

Tool Count3/5

At 29 tools this is a heavy surface, exceeding the typical well-scoped range. The OSM domain is broad enough to justify many operations, but some closely related read tools could potentially be consolidated to reduce selection burden.

Completeness5/5

The server covers element CRUD, batch osmChange uploads, history, parent lookup, bounding-box reads, changeset lifecycle/search/diff/comments, note lifecycle/search, authentication, and capabilities. This is a very complete surface for interacting with the OpenStreetMap API.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues