Osm Tagging Schema Mcp

io.github.gander-tools由 GitHub 账号 gander-tools 发布v3.0.1更新于 Oct 24, 2026

MCP server for querying and validating OpenStreetMap tags

已验证STDIO仅桌面位置与生活开发者工具

概览

AI 生成的概览

一个本地 MCP 服务器,让助手离线、确定性地查询 OpenStreetMap 标签,并依据官方 iD 标注 schema 进行校验。

可以做什么
校验单个标签或标签集合,包括识别已弃用的键值并给出替换建议,以及为匹配预设的标签提供改进建议。查询某个键允许的取值,按名称搜索标签和预设,按 id 读取预设详情。比较两组标签,并在扁平标签字符串与 JSON 之间转换。所有结果均来自内置 schema 数据,服务器不访问 OSM 网络,也不含 AI。
适用场景
适合助手需要确定性的 OSM 标注帮助时:检查常见标签是否有效、转换标签格式、比较标签集合,或读取预设与允许取值。项目自称概念验证,因此不宜依赖它做弃用标签检测或模糊搜索。
运行要求
通过 npx(Node.js)或 Docker 作为本地进程运行,默认使用 stdio。设置 TRANSPORT=http 可启用可选 HTTP 模式,另有 PORT、HOST、CORS_ORIGINS 和 LOG_LEVEL 配置。无需账号、API 密钥,也不访问 OSM 网络。
安装前请注意
README 说明这是概念验证,存在已知缺陷:只能识别约 20% 的 wiki 弃用标签,会把拼写错误和外来取值判为有效,搜索会漏掉带冒号的键和多词查询。它只依据 schema 数据作答,schema 未覆盖的标签无法判断。它面向 AI 代理,不适合直接供人使用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Osm Tagging Schema Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

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.

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.

ToolWorksLimitations
validate_tagPopular 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_collectionConsistent with validate_tag (100%)Same gaps as validate_tag; control characters are not reported
suggest_improvementsPreset matched for 92% of popular tagsTypos and foreign values usually yield suggestions, not a problem report
get_tag_values97% of taginfo values present; bad keys and limits rejectedA few taginfo values are missing from the lists
search_tagsFinds 60% of keys by nameNo 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_presetsPreset 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_detailsPreset exists for 93% of popular tags; unknown ids always rejectedSome popular tags (e.g. historic=*, craft=grinding_mill, railway=stop) have no preset
compare_tagsMatches local computation (100%); text and JSON input give identical outputCompares any tag sets, so it never says a tag is wrong; only malformed input is rejected
flat_to_jsonLossless, including ;, spaces, =, Unicode, : and /Duplicate keys and control characters are accepted silently
json_to_flatLossless round-trip (100%); bad input rejectedKeys 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):

bash
# npxclaude mcp add --transport stdio osm-tagging-schema -- npx -y @gander-tools/osm-tagging-schema-mcp
# Dockerclaude 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):

VariableDefaultMeaning
TRANSPORTstdiostdio or http
PORT3000HTTP port
HOST0.0.0.0HTTP bind address
CORS_ORIGINShttp://localhost:6274,https://mcp.ziziyi.comComma-separated allowed CORS origins
LOG_LEVELINFOSILENT, ERROR, WARN, INFO, DEBUG
bash
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.

来源:README.md,提交 bb2e493

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v3.0.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分