Skip to main content
Glama
OpenStreetMap Tagging Schema MCP Server

OpenStreetMap Tagging Schema MCP Server

by gander-mcp

OpenStreetMap Tagging Schema MCP Server

Test Fuzzing Release Docker

npm downloads GitHub Release

TypeScript MCP SDK OSM Schema

Code Quality NPM Provenance SLSA 3

License: GPL-3.0 Last Commit GitHub Issues GitHub PRs

What is this?

This is a Model Context Protocol (MCP) server designed specifically for AI agents and LLM applications. It acts as a bridge between artificial intelligence systems and the comprehensive OpenStreetMap tagging knowledge base provided by the official @openstreetmap/id-tagging-schema library.

Related MCP server: SkyFi MCP Server

Project status

This project is a Proof of Concept. It gives real value in some areas and has known gaps in others, both described honestly below.

  • It works with the latest tagging schema, @openstreetmap/id-tagging-schema v7.

  • A better replacement tool is being worked on. It will arrive later than originally planned, and no date is promised.

Bug reports and ideas: open an issue or start a discussion.

How it works

The server runs over stdio (default) or HTTP and exposes the tagging schema as MCP tools. Every tool reads the schema data shipped in @openstreetmap/id-tagging-schema (presets, fields, deprecated tags, translations) and answers from it deterministically. There is no network access to OSM and no AI inside the server: the AI agent calls the tools and interprets the results.

Validation checks a tag against the schema: known key, value allowed by the matching field, deprecated key/value with a suggested replacement.

What works and what doesn't

The tool has limitations. Know what to expect before relying on it: it answers from the schema data only, and a part of the tags that exist in the wild or on the OSM wiki is not covered.

Tool

Works

Limitations

validate_tag

Popular tags accepted (100%), almost no false deprecated alarms (99.2%)

Detects only ~20% of wiki-deprecated tags; typos and foreign values are accepted as valid (custom tags are allowed); railway=platform and railway=station are wrongly flagged as deprecated

validate_tag_collection

Consistent with validate_tag (100%)

Same gaps as validate_tag; control characters are not reported

suggest_improvements

Preset matched for 92% of popular tags

Typos and foreign values usually yield suggestions, not a problem report

get_tag_values

97% of taginfo values present; bad keys and limits rejected

A few taginfo values are missing from the lists

search_tags

Finds 60% of keys by name

No typo tolerance despite the fuzzy-matching description; keys with a colon (addr:street) are often missed; limit of 0 or negative not always rejected; access returns a keyMatches item without key

search_presets

Preset found for 69% of popular tags (56% in top 3)

Multi-word queries (bicycle parking) can return nothing; weak ranking; limit of 0 or negative not always rejected

get_preset_details

Preset exists for 93% of popular tags; unknown ids always rejected

Some popular tags (e.g. historic=*, craft=grinding_mill, railway=stop) have no preset

compare_tags

Matches local computation (100%); text and JSON input give identical output

Compares any tag sets, so it never says a tag is wrong; only malformed input is rejected

flat_to_json

Lossless, including ;, spaces, =, Unicode, : and /

Duplicate keys and control characters are accepted silently

json_to_flat

Lossless round-trip (100%); bad input rejected

Keys are not sorted alphabetically, input order is kept

Across all tools, invalid input never crashed the server: errors are readable or the result is an empty list.

Summary

Useful where deterministic logic is enough: format conversion, comparing tag sets, reading presets and values, validating popular tags. Weakest areas: deprecated tag detection and search (typos, multiple words, colon keys).

What this is NOT

⚠️ Important clarifications:

  • Not a standalone application: This server requires integration with AI systems (like Claude Code or Claude Desktop) to be useful. It has no user interface or web frontend.

  • Not for direct human use: Without an AI agent as an intermediary, this tool provides no value to end users. It's designed exclusively for programmatic access by LLM applications.

If you're looking for a user-facing OSM tagging tool, consider iD editor or JOSM instead.

Installation

Add the server to Claude Code (stdio):

# npx
claude mcp add --transport stdio osm-tagging-schema -- npx -y @gander-tools/osm-tagging-schema-mcp

# Docker
claude mcp add --transport stdio osm-tagging-schema -- docker run -i --rm ghcr.io/gander-tools/osm-tagging-schema-mcp:latest

HTTP transport

stdio is the default. Set TRANSPORT=http to serve over HTTP (streamable, port 3000 in the Docker image):

Variable

Default

Meaning

TRANSPORT

stdio

stdio or http

PORT

3000

HTTP port

HOST

0.0.0.0

HTTP bind address

CORS_ORIGINS

http://localhost:6274,https://mcp.ziziyi.com

Comma-separated allowed CORS origins

LOG_LEVEL

INFO

SILENT, ERROR, WARN, INFO, DEBUG

docker run --rm -p 3000:3000 -e TRANSPORT=http ghcr.io/gander-tools/osm-tagging-schema-mcp:latest

Endpoints: GET /health (liveness), GET /ready (schema loaded), GET /version.

License

GNU General Public License v3.0 - See LICENSE file for details.

Available Tools

10 tools
compare_tagsCompare TagsA

Compare two sets of OpenStreetMap tags to identify differences, additions, deletions, and modifications. Performs detailed tag-level comparison showing which tags were added, removed, or changed between two versions. Provides human-readable names for all tags and values using the OSM tagging schema. Use this for reviewing tag changes, understanding feature modifications, analyzing tag history, or validating tag transformations. Returns structured diff with localized names for better readability.

Inputs: newTags (required), oldTags (required), options.

flat_to_jsonConvert Flat Text to JSONA

Convert OpenStreetMap tags from flat text format (key=value per line) to JSON object format. This is an INPUT CONVERTER for AI workflows - use it FIRST when you receive tags in flat text format and need to work with them as a JSON object. Handles various text formats including key=value pairs (one per line), whitespace variations, empty lines, and comments (lines starting with #). Returns a clean JSON object with all parsed tags. Essential for processing OSM data from text exports, iD editor output, or JOSM exports.

Inputs: tags (required).

get_preset_detailsGet Preset DetailsA

Get complete detailed information about a specific OpenStreetMap preset. Presets are feature templates that define standard tagging patterns (e.g., the 'Restaurant' preset defines amenity=restaurant and lists fields like cuisine, outdoor_seating, etc.). Returns comprehensive preset information including: display name, all required and suggested tags, supported geometry types, complete list of fields, field types and options, and parent/child preset relationships. Use this to understand exactly how to tag a specific feature type, learn what fields are available for a preset, or get example values for proper tagging.

Inputs: presetId (required).

get_tag_valuesGet Tag ValuesA

Retrieve all possible values for a specific OpenStreetMap tag key, with localized human-readable names for both the key and each value. This tool searches through the OSM tagging schema (both predefined field options and preset definitions) to find every documented value that can be used with the specified key. Returns four pieces of information: the normalized key name, localized key display name, a simple array of all values, and a detailed array with localized names for each value. Use this to discover what values are available for a tag (e.g., all amenity types), learn the proper terminology for values, or build UI selection lists. Essential for understanding OSM's controlled vocabularies.

Inputs: tagKey (required), options.

json_to_flatConvert JSON to Flat TextA

Convert OpenStreetMap tags from JSON object format to flat text format (key=value per line). This is an OUTPUT CONVERTER for AI workflows - use it LAST when you need to present tags in a human-readable text format or export them for use in other tools. Produces clean, consistent key=value format with one tag per line, sorted alphabetically by key. Use this for generating human-readable tag lists, exporting to OSM editors, or sharing tag collections. The output format is compatible with JOSM, iD editor imports, and other OSM tools that accept flat text tag format.

Inputs: tags (required).

search_presetsSearch PresetsA

Search for OpenStreetMap presets by name, tags, or geometry type. Presets are predefined feature templates that define how specific types of features should be tagged (e.g., 'Restaurant' preset defines standard tags for restaurants). Supports filtering by preset name keywords, specific tag filters, and geometry type (point/line/area/relation). Returns matching presets with their names, primary tags, geometry types, and match scores. Use this to find the correct preset for a feature type, discover how to tag specific features, or explore available feature templates in OSM.

Inputs: keyword (required), limit, options, geometry.

search_tagsSearch TagsA

Search for OpenStreetMap tags by single keyword or pattern. Searches across tag keys, tag values, and localized names to find matching tags. Supports fuzzy matching to find tags even with slight typos or variations. Returns matching tags with their keys, values, and human-readable names. Use this to discover tags related to a topic, find the correct tag when you know part of the name, or explore available tags in a category. For tag pair filtering (e.g., amenity=restaurant), use search_presets instead. Essential for learning OSM tagging vocabulary and discovering lesser-known tags.

Inputs: keyword (required), limit, options.

suggest_improvementsSuggest Tag ImprovementsA

Analyze an OpenStreetMap tag collection and provide intelligent suggestions for improvements. Identifies the feature type from existing tags, finds the matching OSM preset, compares current tags against preset requirements, suggests missing required fields, recommends commonly used optional fields, and provides examples for suggested fields. Returns prioritized improvement suggestions with explanations and example values. Use this to enhance incomplete features, learn best practices for tagging specific feature types, or improve data quality of existing OSM data.

Inputs: tags (required), options.

validate_tagValidate OSM TagA

Validate a single OpenStreetMap tag key-value pair against the OSM tagging schema. Performs comprehensive validation including: deprecation checking (identifies deprecated tags and suggests modern replacements), schema existence validation (verifies the tag key exists in the schema), option validation (checks if the value is in predefined options for that key), and field type checking (distinguishes between strict fields and combo fields that allow custom values). Returns detailed validation results with localized names and actionable messages. Use this for educational purposes, data quality checks, or validating individual tags before bulk operations.

Inputs: key (required), value (required).

validate_tag_collectionValidate Tag CollectionA

Validate a complete collection of OpenStreetMap tags (e.g., all tags for a feature) against the OSM tagging schema. Performs batch validation of multiple tag pairs, checks for deprecated tags across the entire collection, identifies conflicting or incompatible tags, and validates tag combinations. Returns comprehensive validation results for all tags with individual validation status, deprecation warnings, and collection-level issues. Use this to validate complete features before uploading to OSM or for data quality analysis of existing features.

Inputs: tags (required), options.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool targets a clearly distinct operation, and overlaps are explicitly addressed in descriptions (e.g., search_tags vs. search_presets; validate_tag vs. validate_tag_collection). The two conversion tools are directional and unambiguous.

    Naming Consistency4/5

    All names use consistent snake_case, and most follow a verb_noun pattern. The two converters (flat_to_json, json_to_flat) deviate into noun_to_noun naming, but they are internally consistent and readable.

    Tool Count5/5

    Ten tools is well within the ideal 3-15 range for this domain, and each tool contributes a distinct capability for working with OSM tagging schema data.

    Completeness4/5

    The set covers search, lookup, validation, suggestion, comparison, and conversion workflows well. Minor gaps exist, such as no dedicated tag-key metadata/details beyond get_tag_values and no explicit list-all operation, but agents can work around these via search.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      A
      maintenance
      Enables AI assistants to search, validate, and edit OpenStreetMap data through natural language commands and built-in safety protections. It supports discovery of nearby amenities, geographic data exploration, and secure map editing via OAuth authentication.
      36
      27 PyPI
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Integrates SkyFi satellite imagery and OpenStreetMap services with AI applications to enable high-resolution image searching, ordering, and area monitoring. It provides 21 tools for geospatial tasks, including geocoding, tasking quotes, and satellite pass prediction.
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides statistics on OpenStreetMap tags (keys and key=value pairs) via MCP tools, enabling querying of tag usage and metadata.
      292 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants and IDEs to work with the AGNTCY Agent Directory, providing tools for validating, publishing, searching agent records, and navigating OASF taxonomies.
      4
      Apache 2.0