Castles

com.thecastlemap由 thecastlemap.com 發布官方發布者v1.0.3更新於 Oct 24, 2026

Castles, fortresses, palaces and ruins worldwide: search, nearby, fame ranking, statistics. CC0.

已驗證Streamable HTTP可網頁執行位置與生活知識與記憶

概覽

AI 產生的概覽

Castlemap 城堡地圖集的遠端 MCP 伺服器,讓助理搜尋、查詢、依知名度排序城堡、要塞、宮殿與遺跡,並找出某座標附近的建築。

可以做什麼
  • 依名稱、國家或類別搜尋地標,結果依符合度排序
  • 依 slug 或精確名稱取得單一地標的完整紀錄,含座標、始建年代、知名度排名、照片署名與維基百科連結
  • 依座標與半徑列出附近地標,由近到遠
  • 列出全球或某國最著名的地標
  • 列出各國及其地標數量,並取得依類型、國家、世紀等即時統計
  • 隨機回傳一個地標,用於探索或問答遊戲
適用情境
當助理需要關於歷史城堡、宮殿與遺跡的事實性回答時適用,例如某國有哪些城堡、哪些最著名、某座標附近有什麼,或地圖集的整體統計。它是唯讀參考資料,而非行程規劃或訂房工具。
執行需求
無需安裝:這是託管的 streamable HTTP 端點,免註冊、免 API 金鑰。用戶端需支援 streamable HTTP(僅 POST、無狀態)。自行架設為選項,需 Node 18+ 與一份城堡 GeoJSON 資料檔。
安裝前請注意
所有工具皆為唯讀查詢,不涉及寫入、帳號或付費。附近搜尋不會自動解析地名,助理須自行提供座標。地圖集經過篩選而非窮盡收錄,資料來自 Wikidata、維基百科與維基共享資源,重複使用照片時應保留署名與授權資訊。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Castles,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.thecastlemap%2Fcastles/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

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

README

Castlemap MCP server

A Model Context Protocol server for the Castlemap atlas: 7,786 castles, fortresses, palaces and ruins across 141 countries, with coordinates, founding dates, categories, fame ranking and Wikipedia summaries.

It is already running. Point a client at the hosted endpoint — there is no install, no signup and no API key:

https://thecastlemap.com/mcp

Streamable HTTP, stateless, POST-only (a GET returning 405 is correct). Protocol revisions 2025-06-18 and 2025-03-26 are accepted.

Client configuration

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

Registry entry: com.thecastlemap/castles.

Tools

ToolWhat it does
search_castlesFind castles by name, country or category
get_castleFull record for one castle
castles_nearNearest castles to a coordinate (haversine); geocode first
top_castlesBest-known castles, by fame rank
list_countriesThe 141 countries, with counts
get_statisticsLive aggregates — totals, per-country, per-century
random_castleOne castle at random

Data

Derived from Wikidata, with summaries from Wikipedia and images from Wikimedia Commons. The atlas is curated rather than exhaustive: it covers castles with a documented history, a real photo and exact coordinates, not every earthwork and ruin.

The factual records are released as CC0 and downloadable as GeoJSON and CSV from thecastlemap.com/data — also mirrored on GitHub, Hugging Face, Kaggle and Zenodo (concept DOI 10.5281/zenodo.21322359, which always resolves to the newest version).

Running it yourself

server.mjs has zero dependencies — no SDK, no node_modules. It needs Node 18+ and a castles.geojson to read (download one from /data):

sh
CASTLES_GEOJSON=/path/to/castles.geojson PORT=8891 node server.mjs

It binds 127.0.0.1:8891 by default; HOST, PORT and CASTLES_GEOJSON override that. The file is re-read when its mtime changes (throttled to 60s), so updating the data needs no restart.

castlemap-mcp.service is the systemd unit used in production — loopback-bound, DynamicUser, ProtectSystem=strict, with nginx terminating TLS in front. Set ExecStart to your own node path and ReadOnlyPaths/CASTLES_GEOJSON to wherever the data lives.

Provenance

Built by flightmussy with AI assistance: the concept, direction and review are mine; much of the implementation was written with Claude. The underlying data is not generated — it comes from Wikidata, and every record is traceable to its Wikidata item.

License

Code: MIT (see LICENSE). Data: CC0. Wikipedia summary text remains CC BY-SA and is attributed per record.

來源:README.md,提交 c428e57

工具

7

search_castles

Search castles by name

Search the atlas’s 9,035 castles, fortresses, palaces and ruins by name (accent- and case-insensitive substring match). Optionally filter by country (name or ISO code) and category. Results come best-match-first, then by fame; each has coordinates, founding century, fame rank and links to its atlas page and Wikipedia. If nothing matches, retry with a shorter fragment of the name.

輸入參數limitquery必填countrycategory

get_castle

Get one castle in full

Fetch one landmark’s full record by slug (preferred, e.g. "palace-of-versailles") or exact name: coordinates, founding year and century, worldwide fame rank, photo URL with photographer credit and licence, Wikipedia link and its readership signals (Wikidata sitelinks, Wikipedia pageviews over the last 60 days summed across its largest language editions). Unsure of the slug? Call search_castles first.

輸入參數castle必填

castles_near

Find castles near a point

List landmarks within a radius of a WGS84 coordinate, nearest first, each with distance_km. Radius defaults to 100 km (max 2,000). For "castles near <place>", geocode the place yourself, then call this with its latitude/longitude.

輸入參數limitcategorylatitude必填longitude必填radius_km

top_castles

Most famous castles

The most famous landmarks worldwide or in one country, ordered by Castlemap fame rank — a blend of Wikipedia coverage and readership; rank 1 is the most famous (Great Wall of China). The direct answer to "most famous castles in <country>"; filter by country and/or category.

輸入參數limitcountrycategory

list_countries

Countries with castle counts

Every country in the atlas with its landmark count, most first — answers "which country has the most castles" (France leads). Returns country name and ISO code per row; country pages are browsable from the countries_index URL.

無需輸入參數。

get_statistics

Atlas statistics

Headline statistics computed live from the atlas: totals by type, top countries, busiest founding century, oldest landmarks, geographic extremes and the most famous entry. The source for claims like "which country has the most castles" or "when were castles built"; the full write-up lives at thecastlemap.com/statistics/.

無需輸入參數。

random_castle

A random castle

One random landmark with its full record, optionally limited to a country — for discovery, quizzes and "castle of the day" features.

輸入參數country

版本歷史

1
  1. v1.0.3最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分