OpenStreetMap logo OpenStreetMap

Teaching AI to Understand OpenStreetMap Tags

Posted by GanderPL on 24 February 2026 in English. Last updated on 4 March 2026.

Introduction: What is the Model Context Protocol (MCP)?

To make it easier for AI assistants to communicate with databases and various external systems, the Model Context Protocol (MCP) was created – a kind of API for AI that describes how to use a given service.

MCP works a bit like Swagger / OpenAPI for developers: it precisely specifies which “tools” are available, what parameters they accept, and what responses they return, so that an AI assistant knows how to query a given server correctly. The difference is that MCP is designed exclusively for AI, not for humans – it does not provide a traditional user interface, only a contract that a language model can use.

This post is therefore mainly aimed at developers of AI applications and assistants: it describes a new tool they can integrate into their projects to work more effectively with OpenStreetMap tagging data.


A few months ago, I worked on a new project: the OSM Tagging Schema MCP — a Model Context Protocol (MCP) server built for AI assistants and LLM applications that interact with OpenStreetMap tagging data.

It serves as a bridge between AI systems and the official OpenStreetMap tagging schema, allowing agents to validate tags, query values, search presets, and suggest improvements using the structured knowledge from the @openstreetmap/id-tagging-schema library.

The current 3.x release is technically stable — all tools and endpoints work reliably without errors — but it should still be considered experimental. Active development on version 3 has ended; for now, I only maintain it through dependency updates.

The next major step will be version 4, a complete rewrite developed with AI-assisted coding, focusing on a cleaner architecture, long-term maintainability, and deeper MCP integration.

You can try the service live here: mcp.gander.tools/osm-tagging

I invite you to experiment, test, and share feedback — your ideas and suggestions are always appreciated: gander-tools/osm-tagging-schema-mcp discussions

Discussion

Comment from SomeoneElse on 25 February 2026 at 09:19

the official OpenStreetMap tagging schema

Ha, if only such a thing existed :)

There are a few “obvious” cases but lots of exceptiosn. Even a “building” might not be one.

Comment from GanderPL on 25 February 2026 at 11:16

An MCP based on a formal schema produces much better results than the classic approach of creating agents like “You are an OSM expert”.
Instead of guessing from a loose prompt, the model is constrained by a strict structure, context, and rules it must align with.

Handling edge cases will be one of the main themes for versions v4 and v5.
I keep thinking about how to properly express all those situations where a cat is not a cat, a dog is not a dog, and a mouse is not a mouse – cases where the tag looks “obvious”, but the semantics are not obvious at all.

This effectively requires designing a dedicated exception schema, because there is currently no schema that explains these nuances clearly and comprehensively.
As a side effect, this might turn into an engine that can power a range of other use cases – essentially an attempt to translate the OSM wiki into a structured API.

I treat this as an endless playground for self‑improvement: even if I never reach the “ideal” goal, I will learn a lot along the way – from evaluating whether the project makes sense at all, through gaining humility toward complex problems, to better understanding OSM edge cases and how to work with AI.
All of that is a net gain, regardless of the final outcome.

The whole thing was originally created with another tool in mind: something that ingests spaghetti‑like text notes, voice notes, and photos, and still manages to extract something reasonably coherent from them, without blindly combining completely unrelated tags.

Comment from rphyrin on 1 March 2026 at 10:58

https://mcp.gander.tools/osm-tagging/ –> {“jsonrpc”:”2.0”,”error”:{“code”:-32000,”message”:”Not Acceptable: Client must accept text/event-stream”},”id”:null}

Comment from GanderPL on 1 March 2026 at 11:23

MCP, or Model Context Protocol, is a tool designed specifically for AI systems and developers building AI applications. It acts as a backend server that provides structured data access—like querying OpenStreetMap tagging schemas—without any user interface (UI).

No UI Involved

This MCP server has zero graphical interface, web forms, or chat-like frontend; it’s pure API endpoints for programmatic use. AI agents “know” how to connect to it via standardized protocols to fetch, validate, or suggest OSM tags automatically.

Everyday Users Can’t Use It

If you only interact with AI through simple web forms (like asking questions on ChatGPT’s site), you won’t be able to use this at all—no buttons to click or prompts to type will work here. It’s not for casual chatting; only AIs or coders who integrate it into apps can leverage it.

Log in to leave a comment