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 分