OsmSAFE
Model Context Protocol server for OpenStreetMap data
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
This package provides OpenStreetMap integration for MCP, allowing users to query and visualize map data through an MCP interface.
[](osm-mcp.webp)
Features
- Web-based map viewer using Leaflet and OpenStreetMap
- Server-to-client communication via Server-Sent Events (SSE)
- MCP tools for map control (adding markers, polygons, setting view, getting view)
- PostgreSQL/PostGIS query interface for OpenStreetMap data
Installation
This is my claude_desktop_config.json:
{
"mcpServers": {
"OSM PostgreSQL Server": {
"command": "/Users/wiseman/.local/bin/uv",
"args": [
"run",
"--env-file",
".env",
"--with",
"mcp[cli]",
"--with",
"psycopg2",
"--with-editable",
"/Users/wiseman/src/mcp-osm",
"--directory",
"/Users/wiseman/src/mcp-osm",
"mcp",
"run",
"mcp.py"
]
}
}
}When the MCP server starts it also starts a web server at http://localhost:8889/ that has the map interface.
Environment Variables
The following environment variables can be used to configure the MCP:
FLASK_HOST- Host for the Flask server (default: 127.0.0.1)FLASK_PORT- Port for the Flask server (default: 8889)PGHOST- PostgreSQL host (default: localhost)PGPORT- PostgreSQL port (default: 5432)PGDB- PostgreSQL database name (default: osm)PGUSER- PostgreSQL username (default: postgres)PGPASSWORD- PostgreSQL password (default: postgres)
MCP Tools
The following MCP tools are available:
get_map_view- Get the current map viewset_map_view- Set the map view to specific coordinates or boundsset_map_title- Set the title displayed at the bottom right of the mapadd_map_marker- Add a marker at specific coordinatesadd_map_line- Add a line defined by a set of coordinatesadd_map_polygon- Add a polyg
3b8793eefc33OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mcp-osm --env PGPASSWORD=${PGPASSWORD} -- uvx mcp-osm{
"mcpServers": {
"mcp-osm": {
"command": "uvx",
"args": [
"mcp-osm"
],
"env": {
"PGPASSWORD": "${PGPASSWORD}"
}
}
}
}Exposed tools (8)
3 read · 5 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
add_map_line | write | |
add_map_marker | write | |
add_map_polygon | write | |
geolocate | read | |
get_map_view | read | |
query_osm_postgres | read | |
set_map_title | write | |
set_map_view | write |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (2)
print("Map server started. Open http://127.0.0.1:5000 in your browser.")Gates applied: no_behavioural_pass, no_license.
3b8793eefc33full audit observations/trust-audit/mcp-server/wiseman__osm.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 3b8793eefc33 | SAFE | B | 89 | first audit |
Questions
What is the Osm MCP server?
Model Context Protocol server for OpenStreetMap data
What tools does Osm expose?
8 in total: 3 read-only, 5 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Osm safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Osm need?
It reads PGPASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How current is this page?
The grade is for one exact copy of the source (3b8793eefc33), read on 2026-10-07. The repository is watched and re-audited when it changes.