Crossref MCP サーバー
Crossref API と対話するためのモデル コンテキスト プロトコル (MCP) サーバー。
特徴
タイトルで作品を検索
著者による作品検索
DOIで作品の詳細を取得
Related MCP server: ArXiv-MCP
インストール
{
"mcpServers": {
"crossref": {
"command": "npx",
"args": [
"-y",
"@botanicastudios/crossref-mcp"
]
}
}
}使用法
サーバーは 3 つの主なツールを提供します。
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レスポンス
空の結果セット
エラー処理とネットワーク障害
テストの拡張
テストケースを追加するには:
必要に応じてテストファイルに新しいモックデータを追加します
関連する記述ブロックに追加のテストケースを作成する
mockFetchResponse()ヘルパーを使用して API レスポンスをシミュレートします
例:
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
