Crossref MCP 服务器
用于与 Crossref API 交互的模型上下文协议 (MCP) 服务器。
特征
按标题搜索作品
按作者搜索作品
通过 DOI 获取工作详细信息
安装
用法
该服务器提供三个主要工具:
1. 按标题搜索
在 Crossref 中按标题搜索作品:
2. 按作者搜索
在 Crossref 中按作者搜索作品:
3. 通过 DOI 获取作品
使用 DOI 检索特定作品:
响应格式
所有响应均以以下格式的结构化 JSON 对象返回:
对于成功的搜索:
对于单个 DOI 查找:
对于错误或无结果:
测试
该服务器附带使用 Vitest 的全面测试套件。测试涵盖所有可用工具,并涵盖各种场景,包括成功响应、空结果和错误处理。
运行测试
测试结构
这些测试使用 Vitest 的模拟功能来模拟 Crossref API 响应,而无需发出实际的网络请求。测试结构包括:
模拟数据:标题搜索、作者搜索和 DOI 查找的示例响应
模拟处理程序:
mcp-server-test-handlers.js
中的处理程序函数的测试版本测试用例:针对所有工具的测试,涵盖:
成功的 API 响应
空结果集
错误处理和网络故障
扩展测试
要添加更多测试用例:
如果需要,将新的模拟数据添加到测试文件
在相关的描述块中创建额外的测试用例
使用
mockFetchResponse()
助手来模拟 API 响应
例子:
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.
模型上下文协议服务器,可查询 Crossref API 以按标题、作者或 DOI 搜索学术出版物,返回有关学术作品的结构化元数据。
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables AI agents to search, retrieve, and analyze academic papers from arXiv, supporting features like keyword search, paper details retrieval, content extraction, and paper analysis.Last updated -MIT License
- -securityFlicense-qualityA comprehensive Model Context Protocol server that provides AI assistants with direct access to Semantic Scholar's academic database, enabling advanced paper discovery, citation analysis, author research, and AI-powered recommendations.Last updated -4
- AsecurityAlicenseAqualityA comprehensive Model Context Protocol server that enables advanced PubMed literature search, citation formatting, and research analysis through natural language interactions.Last updated -126MIT License
- AsecurityFlicenseAqualityA TypeScript implementation of the Model Context Protocol server that enables searching arXiv papers and extracting paper information through standardized client-server communication.Last updated -20