Back to MCP directory
publicPublicdnsLocal runtime

uk-science-museum-group-mcp

一个为英国科学博物馆集团API设计的Python MCP服务器,允许LLM获取博物馆数据,支持Claude Desktop集成

article

README

🚀 科技博物馆集团API的模型上下文协议(MCP)服务器

本项目是一个基于Python的MCP(https://modelcontextprotocol.io/introduction)服务器,可让您的大型语言模型(LLM)从英国科技博物馆集团获取数据。相关信息请访问https://github.com/TheScienceMuseum/collectionsonline/wiki/Collections-Online-API#get-search。目前,该项目支持Claude Desktop在MacOS和Windows系统上使用。

🚀 快速开始

集成到Claude Desktop

您只需安装UV(一个用于管理Python包/项目的工具),然后更改Claude Desktop的设置以添加此MCP即可。

安装UV

  • MacOS系统
brew install uv
  • Windows系统
    • 使用PowerShell安装:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- 或者使用winget安装:
winget install --id=astral-sh.uv  -e

其他安装选项请访问https://docs.astral.sh/uv/getting-started/installation。

配置Claude Desktop

前往Claude Desktop的设置 -> 开发者,编辑配置文件。此操作将在以下位置创建配置文件:

  • macOS系统~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows系统%APPDATA%\Claude\claude_desktop_config.json

打开该文件并将其内容更改为:

{
  "mcpServers": {
    "scienceMuseum": {
      "command": "uvx",
      "args": [
        "science-museum-mcp"
      ]
    }
  }
}

打开Claude Desktop后,MCP服务器将启动,您就可以对Claude进行查询。例如: 截图

Anthropic为此步骤提供的官方说明请访问:https://modelcontextprotocol.info/docs/quickstart/user/。

🛠️ 开发

本节适用于希望为代码库做出贡献的开发者。

设置和安装依赖项

  1. 克隆仓库。
  2. 该项目使用uv(安装链接:https://docs.astral.sh/uv/#installation)进行依赖管理和构建,使用npx(安装链接:https://www.npmjs.com/package/npx)来运行MCP检查器。
  3. 创建虚拟环境:
uv venv
  1. 安装依赖项:
uv pip install -r pyproject.toml
  1. 运行检查器:
./inspector.sh

检查器会输出localhost的URL,用于访问其UI。

运行单元测试

source .venv/bin/activate
pytest

发布

目前发布过程是手动完成的。若项目今后有开发活动,将更改为使用Github操作。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client