Crossref MCP 서버
Crossref API와 상호작용하기 위한 MCP(모델 컨텍스트 프로토콜) 서버입니다.
특징
제목으로 작품 검색
작가별 작품 검색
DOI로 작업 세부 정보 가져오기
Related MCP server: ArXiv-MCP
설치
지엑스피1
용법
서버는 세 가지 주요 도구를 제공합니다.
1. 제목으로 검색
제목으로 Crossref에서 작품 검색:
// Example: Search for works containing "quantum computing" in the title
{
"title": "quantum computing",
"rows": 5 // Optional, defaults to 5
}2. 작성자로 검색
저자별로 Crossref에서 작품 검색:
// Example: Search for works by "Einstein"
{
"author": "Einstein",
"rows": 5 // Optional, defaults to 5
}3. DOI로 작업 가져오기
DOI를 사용하여 특정 작품을 검색합니다.
// Example: Get work with DOI "10.1088/1742-6596/1398/1/012023"
{
"doi": "10.1088/1742-6596/1398/1/012023"
}응답 형식
모든 응답은 다음 형식의 구조화된 JSON 객체로 반환됩니다.
성공적인 검색을 위해:
{
"status": "success",
"query": {
/* the original query parameters */
},
"count": 5,
"results": [
{
"title": "Work title",
"authors": [
{
"given": "First name",
"family": "Last name",
"name": "First name Last name"
}
],
"published": {
"dateParts": [2023, 1, 15],
"dateString": "2023-1-15"
},
"type": "journal-article",
"doi": "10.xxxx/xxxxx",
"url": "https://doi.org/10.xxxx/xxxxx",
"container": "Journal Name",
"publisher": "Publisher Name",
"issue": "1",
"volume": "42",
"abstract": "This is the abstract of the work, if available."
}
// additional results...
]
}단일 DOI 조회의 경우:
{
"status": "success",
"query": { "doi": "10.xxxx/xxxxx" },
"result": {
// work details as shown above
}
}오류가 있거나 결과가 없는 경우:
{
"status": "error" | "no_results" | "not_found",
"message": "Error message" | null,
"query": { /* the original query parameters */ }
}테스트
이 서버에는 Vitest를 활용한 포괄적인 테스트 도구가 포함되어 있습니다. 테스트는 사용 가능한 모든 도구를 다루며, 성공적인 응답, 빈 결과, 오류 처리 등 다양한 시나리오를 포함합니다.
테스트 실행
npm test테스트 구조
이 테스트는 Vitest의 모의 기능을 사용하여 실제 네트워크 요청을 하지 않고 Crossref API 응답을 시뮬레이션합니다. 테스트 구조는 다음과 같습니다.
모의 데이터 : 제목 검색, 저자 검색 및 DOI 조회에 대한 샘플 응답
모의 핸들러 :
mcp-server-test-handlers.js의 핸들러 함수 테스트 버전테스트 사례 : 다음을 포함하는 모든 도구에 대한 테스트:
성공적인 API 응답
빈 결과 세트
오류 처리 및 네트워크 장애
테스트 확장
테스트 사례를 더 추가하려면:
필요한 경우 테스트 파일에 새로운 모의 데이터를 추가합니다.
관련 설명 블록에 추가 테스트 케이스를 만듭니다.
API 응답을 시뮬레이션하려면
mockFetchResponse()도우미를 사용하세요.
예:
it("should handle a new edge case", async () => {
// Mock the response
mockFetchResponse({
// Your sample response data
});
// Call the handler
const result = await handlers.searchByTitle({ title: "example" });
// Assert the expected results
expect(result).toMatchObject({
// Expected response structure
});
});Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/botanicastudios/crossref-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
