英国地形测量局 - MCP 服务器
基于 Python 的 MCP 服务器,提供对 Ordnance Survey API 的访问。
概述
该服务在 MCP 客户端和 OS API 之间建立了一座桥梁,使得通过标准化协议查询地理数据变得容易。
该服务处理身份验证、(基本)速率限制,并为复杂的操作系统 API 提供简化的接口。
项目结构
- api_service - OS API 的异步 HTTP 客户端实现
- 处理身份验证、请求格式化和响应处理
- 管理速率限制和错误处理
- 为外部 API 端点提供干净的接口
- mcp_service - 将 OS API 功能公开为 MCP 工具
- 将 API 响应转换为 MCP 兼容格式
- 实现功能操作的业务逻辑
- 为其他服务提供标准化接口
特征
- 收藏管理(列出和查询收藏)
- 使用空间和属性过滤器进行特征搜索
- 通过 ID 检索单个特征
- 链接标识符操作
- 批量特征操作
要求
- Python 3.11+
- OS API 密钥(设置为环境变量
OS_API_KEY
) - 您需要注册一个 OS Data Hub 帐户才能获取 API 密钥
- 依赖项:aiohttp、mcp[cli]
用法
在您的 MCP 主机配置文件中配置(例如 Claude Desktop):
Claude 桌面集成
该 MCP 服务仅通过 Claude Desktop 进行测试。
目的是使该服务与各种 MCP 主机/客户端协同工作,但尚未经过测试。
与 Claude Desktop 一起使用时:
- 确保 Claude Desktop 配置为访问本地工具
- 该服务一旦运行,即可作为工具使用
- 无需额外的网络配置
可用工具
所有这些工作仍在进行中,但以下工具可用:
hello_world
- 测试连接check_api_key
- 验证 API 密钥配置list_collections
- 列出可用的特征集合get_collection_info
- 获取有关特定集合的详细信息get_collection_queryables
- 获取集合的可过滤属性search_features
- 根据各种条件搜索功能get_feature
- 通过 ID 检索特定特征get_linked_identifiers
- 查找相关标识符get_bulk_features
- 一次调用即可检索多个特征get_bulk_linked_features
- 批量获取链接功能get_prompt_templates
- 获取常见操作的标准提示模板
使用提示模板
该服务提供预先配置的提示模板来帮助您入门。
要访问这些模板,请询问 Claude“向我显示可用的提示模板”
贡献
欢迎贡献!请打开一个问题或提交一个拉取请求。
执照
该项目已获得 MIT 许可。
该项目未获得英国地形测量局的认可。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
基于 Python 的 MCP 服务器,提供对 Ordnance Survey API 的访问,允许通过标准化协议查询地理数据,具有集合管理、特征搜索和空间过滤等功能。
Related MCP Servers
- -securityAlicense-qualityA Python-based MCP server that integrates OpenAPI-described REST APIs into MCP workflows, enabling dynamic exposure of API endpoints as MCP tools.Last updated -239PythonMIT License
- -securityFlicense-qualityThis is an MCP server that facilitates building tools for interacting with various APIs and workflows, supporting Python-based development with potential for customizable prompts and user configurations.Last updated -Python
- AsecurityAlicenseAqualityThis Serper MCP Server supports search and webpage scraping, and all the most recent parameters introduced by the Serper API, like location.Last updated -2732TypeScriptMIT License
- AsecurityAlicenseAqualityAn open-source MCP server that connects to various data sources (SQL databases, CSV, Parquet files), allowing AI models to execute SQL queries and generate data visualizations for analytics and business intelligence.Last updated -1044PythonMIT License