# Flightmussy/castlemap-mcp [Health: Active]

**Category:** 🗺️ Location Services  
**Repository:** https://github.com/Flightmussy/castlemap-mcp  
**GitHub Stars:** 1  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/flightmussy-castlemap-mcp

## Description
Query 2,400 castles, fortresses and palaces across 131 countries (coordinates, founding dates, fame ranking, Wikipedia summaries) from the open CC0 Castlemap dataset built on Wikidata. Hosted endpoint needs no API key; the zero-dependency server can also be self-hosted.

## Tools
Capabilities this server exposes over MCP:

- **search_castles** — Find castles by name, country or category
- **get_castle** — Full record for one castle
- **castles_near** — Nearest castles to a coordinate (haversine); geocode first
- **top_castles** — Best-known castles, by fame rank
- **list_countries** — The 141 countries, with counts
- **get_statistics** — Live aggregates — totals, per-country, per-century
- **random_castle** — One castle at random

## Claude Desktop Quick Installation
Heuristic fallback — verify the package name and runner against the repository README before running it. Uses `npx` (confidence: low):

```json
"mcpServers": {
  "castlemap-mcp": {
    "command": "npx",
    "args": ["-y","flightmussy-castlemap-mcp"],
    "env": {
      "CASTLES_GEOJSON": "",
      "HOST": "",
      "PORT": ""
    }
  }
}
```

**Requires environment variables:** `CASTLES_GEOJSON`, `HOST`, `PORT` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Flightmussy/castlemap-mcp MCP server does

Flightmussy/castlemap-mcp MCP server makes the Castlemap atlas available to MCP clients. The dataset contains 7,786 castles, fortresses, palaces and ruins across 141 countries. Records include geographic coordinates, founding dates, categories, fame rankings and summaries sourced from Wikipedia. The underlying factual records are derived from Wikidata, and each record can be traced to a Wikidata item.

The hosted service is available at `https://thecastlemap.com/mcp`. It uses Streamable HTTP, is stateless and accepts POST requests. A GET request returning HTTP 405 is expected behavior. The endpoint accepts protocol revisions `2025-06-18` and `2025-03-26`.

## How it works

An MCP client sends tool calls to the hosted endpoint or to a local instance of the server. Search operations can filter castles by name, country or category. A record lookup returns the full entry for one castle, while proximity searches calculate nearest results from supplied coordinates using the haversine method.

The server also provides aggregate and selection operations. Clients can request the best-known castles by fame rank, list countries with their castle counts, inspect totals and breakdowns by country or century, or select one random castle. Proximity searches require coordinates; the tool description advises geocoding a place first.

## Setup and configuration

No installation is needed for the hosted service and no API key or account is required. Configure an HTTP MCP client with the endpoint URL, for example:

```json
{
  "mcpServers": {
    "castles": {
      "type": "http",
      "url": "https://thecastlemap.com/mcp"
    }
  }
}
```

Self-hosting requires Node 18 or newer, the repository's `server.mjs`, and a `castles.geojson` file downloaded from the Castlemap data page. The server has no runtime dependencies or required SDK installation. `CASTLES_GEOJSON` identifies the data file. `HOST` and `PORT` can override the bind address and port; the documented defaults are `127.0.0.1` and `8891`.

The local process rereads the GeoJSON file when its modification time changes, with a 60-second throttle, so data updates do not require a restart. The repository also includes a systemd unit used by the production deployment, but configuring it requires adapting paths and the Node executable to the host system.

## Tools and capabilities

Flightmussy/castlemap-mcp MCP server exposes these tools:

- `search_castles`: Find records by name, country or category.
- `get_castle`: Retrieve the complete record for one castle.
- `castles_near`: Find nearby castles from a coordinate using haversine distance.
- `top_castles`: Return well-known castles according to fame rank.
- `list_countries`: List the covered countries and their counts.
- `get_statistics`: Return live totals and country- or century-based aggregates.
- `random_castle`: Select a castle at random.

The data can also be downloaded as GeoJSON or CSV. Copies are published through the Castlemap site and several dataset repositories.

## Limitations and notes

The atlas is curated rather than exhaustive. Its stated coverage emphasizes sites with documented history, an available photograph and exact coordinates, so it does not represent every earthwork or ruin. Wikipedia summary text remains under CC BY-SA and is attributed per record; the factual records are released under CC0. The server code is licensed under MIT.

Flightmussy/castlemap-mcp MCP server provides castle data and query operations, not a general geocoder. Applications that begin with a place name should obtain coordinates separately before calling `castles_near`.

_Full upstream README: https://allmcps.com/mcp/flightmussy-castlemap-mcp/readme_

