Purpose: To provide Castlemap atlas query capabilities for clients that support the Model Context Protocol (MCP), with data sourced from Wikidata, summaries from Wikipedia, and images from Wikimedia Commons.
Main capabilities: Covering approximately 7,700+ castles, fortresses, palaces, and ruins across 141 countries, with fields including coordinates, construction date, category, prominence ranking, and Wikipedia summaries. The atlas is curated to include only castles with historical records, real photographs, and precise coordinates, and is not an exhaustive collection of all earthworks and ruins.
Usage: The hosted service is already running, with no installation, registration, or API key required. Point the client to https://thecastlemap.com/mcp and it is ready. The transport method is Streamable HTTP, stateless, accepting only POST (GET returning 405 is normal), and supports protocol versions 2025-06-18 and 2025-03-26. The registry entry is com.thecastlemap/castles.
Self-hosting: server.mjs has zero dependencies, requires no SDK or node_modules, and needs Node 18+ and a castles.geojson file (downloadable from /data). By default it binds to 127.0.0.1:8891, which can be overridden with HOST, PORT, and CASTLES_GEOJSON; the file is re-read when its mtime changes (rate-limited to 60 seconds), so data can be updated without restarting. The repository also includes a production systemd unit, castlemap-mcp.service, which uses loopback binding, DynamicUser, and ProtectSystem=strict, with nginx terminating TLS at the front end.
Data and licensing: Factual records are released under CC0 and can be downloaded as GeoJSON and CSV from thecastlemap.com/data, and are mirrored on GitHub, Hugging Face, Kaggle, and Zenodo (concept DOI 10.5281/zenodo.21322359, which always resolves to the latest version). The code is MIT licensed, and Wikipedia summary text remains CC BY-SA with attribution per record. The author states that the concept, direction, and review were done by himself, that much of the implementation was written with the help of Claude, and that the underlying data is not generated; every record can be traced to its corresponding Wikidata entry.