dora_mcp 翻译成中文可以是“朵拉_mcp”或者根据具体语境,如果“dora”是人名“多拉”的音译,“mcp”可能代表某个特定的含义或缩写,但在此没有具体上下文,所以直接音译为“朵拉_mcp”
用于访问Empa的lib4ri仓库中的DORA(学术数字对象存储库)出版物的MCP(模型上下文协议)服务器。
概述
这个MCP服务器提供了访问DORA数据库中科学出版物的途径,网址为https://www.dora.lib4ri.ch/empa。它允许您通过作者姓名、标题、摘要以及其他元数据字段来搜索出版物。
特点/特性
- 搜索DORA出版物数据库
- 跨多个字段(标题、摘要、作者、贡献者)进行查询
- 返回JSON格式的出版物数据
- 在Docker容器中可运行
安装
先决条件
- Python 3.10+
- 紫外线 包管理器(推荐使用,因为某种原因 pip 会导致错误)
安装 uv:
# On macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"本地安装
# Install dependencies using uv
uv sync
# Activate the virtual environment
source .venv/bin/activate # On Linux/macOS
# or
.venv\Scripts\activate # On WindowsDocker 安装
使用 Docker Compose 构建并启动:
# Build and start
./docker.sh build
./docker.sh start
# Or manually
docker-compose up -d用法
本地运行(标准I/O模式)
用于Claude Desktop或其他MCP客户端:
# Using uv
uv run python -m dora_mcp
# Or with activated venv
python -m dora_mcp使用 Docker 运行(HTTP 模式)
Docker 部署以 HTTP/SSE 模式运行,以便通过网页访问:
# Start the server
./docker.sh start
# Access at http://localhost:8000
# SSE endpoint: http://localhost:8000/sse
# Messages endpoint: http://localhost:8000/messages
# View logs
./docker.sh logs
# Run tests
./docker.sh test
# Stop the server
./docker.sh stop看 详细的Docker部署指南。
MCP 工具
服务器提供以下工具:
search_publications
在DORA数据库中搜索科学出版物。
参数:
search_string(必填):用于查询的搜索词。可以是作者姓名、标题关键词或任何搜索词。
示例:
{
"search_string": "manfred heuberger"
}API详情
服务器使用以下端点模式查询DORA API:
https://www.dora.lib4ri.ch/empa/islandora/search/json_cit_a/[query]?search_string=[term]&extension=false搜索查询包括跨多个字段的加权搜索:
- 标题(权重:5)
- 摘要(权重:2)
- 创作者(权重:2)
- 原始作者列表(权重:2)
- 贡献者(权重:1)
- 类型(权重:1)
- 通用的MODS字段(权重:1)
发展
要求
- Python 3.10及以上版本
- UV包管理器
- 列出的依赖项
pyproject.toml
测试
# Install dev dependencies
uv sync --all-extras
# Run all tests
uv run python -m pytest tests/ -v
# Run specific test suites
uv run python -m pytest tests/test_server.py -v # Unit tests
uv run python -m pytest tests/test_with_metrics.py -v # Metrics tests
uv run python -m pytest tests/test_docker.py -v # Docker tests
# Run manual tests
uv run python examples/test_search.py运输方式
服务器支持两种传输模式:
- stdio(在中文中通常不直接翻译,但可理解为“标准输入输出库”或保持原样,因为它是编程术语) (默认):适用于本地MCP客户端,如Claude Desktop
- http(超文本传输协议)用于带有SSE(服务器发送事件)的网页部署
通过环境变量设置模式:
# stdio mode (default)
uv run python -m dora_mcp
# HTTP mode
MCP_TRANSPORT=http MCP_PORT=8000 uv run python -m dora_mcp许可证
详见LICENSE文件。
