PubTator-MCP-Server
PubTator MCP サーバー
🔍 PubTator3 に基づく生物医学文献の注釈および関係マイニング サーバー。MCP インターフェイスを介して便利なアクセスを提供します。
PubTator MCPサーバーは、モデルコンテキストプロトコル(MCP)を介してAIアシスタントにPubTator3生物医学文献アノテーションシステムへのアクセスを提供します。これにより、AIモデルはプログラムによって科学文献を検索し、アノテーション情報を取得し、エンティティ関係を分析できるようになります。
🤝 貢献する • 📝 問題を報告する
✨ コア機能
🔎 文献注釈のエクスポート: PubTator 注釈の結果を複数の形式でエクスポートできるようになりました ✅
🚀 エンティティID検索: フリーテキストで生物学概念の標準識別子を検索 ✅
📊 関係性マイニング: エンティティ間の生物医学的関係性を発見する ✅
📄 文献検索: キーワードとエンティティIDによる文献検索をサポートします ✅
🧠 バッチ処理: 検索結果からの注釈情報のバッチエクスポートをサポート ✅
Related MCP server: mcp-pubmed
🚀 クイックスタート
要件
Python 3.10以上
FastMCPライブラリ
インストール
スミザリー経由
Smitheryを使用して PubTator Server を自動的にインストールします。
クロード
npx -y @smithery/cli@latest install @JackKuo666/pubtator-mcp-server --client claude --config "{}"カーソル
設定 → カーソル設定 → MCP → 新しいサーバーの追加を貼り付けます。
Mac/Linux
npx -y @smithery/cli@latest run @JackKuo666/pubtator-mcp-server --client cursor --config "{}" ウィンドサーフィン
npx -y @smithery/cli@latest install @JackKuo666/pubtator-mcp-server --client windsurf --config "{}"Cライン
npx -y @smithery/cli@latest install @JackKuo666/pubtator-mcp-server --client cline --config "{}"手動インストール
リポジトリをクローンします。
git clone https://github.com/JackKuo666/PubTator-MCP-Server.git cd PubTator-MCP-Server依存関係をインストールします:
pip install -r requirements.txt
📊 使用方法
サーバーを直接実行する
MCP サーバーを起動します。
python pubtator_server.pyサーバーはstdioとTCPの両方のトランスポートをサポートするようになりました。デフォルトではTCPトランスポートを使用します。以下の環境変数を設定できます。
MCP_TRANSPORT: TCPトランスポートの場合は「tcp」、stdioトランスポートの場合は「stdio」に設定します(デフォルトは「tcp」です)MCP_HOST: バインドするホスト(デフォルトは「0.0.0.0」)MCP_PORT: リッスンするポート(デフォルトは8080)
カスタム設定でサーバーを起動する例:
MCP_TRANSPORT=tcp MCP_HOST=127.0.0.1 MCP_PORT=8888 python pubtator_server.pyサーバーは遅延初期化と適切なエラー処理を実装しています。シャットダウンシグナル(SIGINTおよびSIGTERM)を適切に処理し、起動時または操作中に発生したエラーをすべてログに記録します。
Dockerの使用
簡単にデプロイできるよう、Dockerfileを提供しています。Dockerコンテナを使用するには、以下の手順に従ってください。
Docker イメージをビルドします。
docker build -t pubtator-mcp-server .Docker コンテナを実行します。
docker run -p 8080:8080 pubtator-mcp-server
これにより、Docker コンテナ内で PubTator MCP サーバーが起動し、ポート 8080 で公開されます。
トラブルシューティング
サーバーの起動中に問題が発生した場合:
コンソール出力でエラー メッセージを確認します。
必要な依存関係がすべてインストールされていることを確認します (要件セクションを参照)。
環境変数が正しく設定されていることを確認します。
サーバーの起動に失敗した場合は、詳細度を上げて実行してみてください。
python -v pubtator_server.pyこれにより、問題の原因を特定するために役立つ、より詳細なログ情報が提供されます。
Docker を使用する場合、次のコマンドでログを確認できます。
docker logs <container_id>構成
クロードデスクトップ構成
claude_desktop_config.jsonに追加:
(Mac OS)
{
"mcpServers": {
"pubtator": {
"command": "python",
"args": ["-m", "pubtator-mcp-server"]
}
}
}(ウィンドウズ)
{
"mcpServers": {
"pubtator": {
"command": "C:\\Users\\YOUR\\PATH\\miniconda3\\envs\\mcp_server\\python.exe",
"args": [
"D:\\code\\YOUR\\PATH\\PubTator-MCP-Server\\pubtator_server.py"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}CLine構成
{
"mcpServers": {
"pubtator": {
"command": "bash",
"args": [
"-c",
"source /home/YOUR/PATH/mcp-server-pubtator/.venv/bin/activate && python /home/YOUR/PATH/pubtator_server.py"
],
"env": {
"MCP_TRANSPORT": "stdio"
},
"disabled": false,
"autoApprove": []
}
}
}TCP トランスポートを使用するには、次のように構成を変更します。
{
"mcpServers": {
"pubtator": {
"command": "bash",
"args": [
"-c",
"source /home/YOUR/PATH/mcp-server-pubtator/.venv/bin/activate && python /home/YOUR/PATH/pubtator_server.py"
],
"env": {
"MCP_TRANSPORT": "tcp",
"MCP_HOST": "127.0.0.1",
"MCP_PORT": "8888"
},
"disabled": false,
"autoApprove": []
}
}
}🛠 API 機能
PubTator MCP サーバーは、次のコア機能を提供します。
1. 出版物のエクスポート (export_publications)
指定された PMID 文献の PubTator 注釈結果をエクスポートします。
result = await export_publications(
ids=["32133824", "34170578"],
id_type="pmid",
format="biocjson", # Supported: pubtator, biocxml, biocjson
full_text=False # Whether to include full text
)2. エンティティID検索(find_entity_id)
自由テキストを通じて生物学概念の標準識別子を照会します。
result = await find_entity_id(
query="COVID-19",
concept="disease", # Optional: gene, disease, chemical, species, mutation
limit=5 # Optional: limit number of results
)3. 関係クエリ(find_related_entities)
指定したエンティティに関連する他のエンティティを検索します。
result = await find_related_entities(
entity_id="@DISEASE_COVID_19",
relation_type="treat", # Optional: treat, cause, interact, etc.
target_entity_type="chemical", # Optional: gene, disease, chemical
max_results=5 # Optional: limit number of results
)4. 文献検索(search_pubtator)
PubTator データベースを検索:
results = await search_pubtator(
query="COVID-19",
max_pages=1 # Optional: maximum number of pages to retrieve
)5. バッチエクスポート(batch_export_from_search)
文献注釈の検索と一括エクスポート:
results = await batch_export_from_search(
query="COVID-19",
format="biocjson",
max_pages=1,
full_text=False,
batch_size=5
)注: 実際の関数呼び出しは実装によって異なる場合があります。これらの例は最近のテストに基づいており、実際のAPIに合わせて調整する必要がある場合があります。
⚠️ 使用制限
API リクエストレート制限: 1 秒あたり最大 3 リクエスト
バッチエクスポートの場合は、リクエストのタイムアウトを回避するために適切なbatch_sizeを使用してください。
関係クエリの場合、エンティティ ID は「@」で始まる必要があります(例:「@DISEASE_COVID-19」)。
📄 ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています。
⚠️免責事項
このツールは研究目的のみにご使用ください。PubTatorの利用規約を遵守し、責任を持ってご利用ください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityFmaintenanceProvides comprehensive access to NCBI's PubMed database of over 36 million biomedical citations, allowing users to search, retrieve, and analyze literature directly through MCP tools. It supports advanced queries, citation management, full-text retrieval from PubMed Central, and precise discovery using MeSH terms.1615
- AlicenseAqualityDmaintenanceAn MCP server that provides direct access to PubMed and PubMed Central via the NCBI E-utilities API. It enables AI models to search biomedical literature, retrieve detailed article metadata, and download open-access full texts.5MIT
- AlicenseNot gradedqualityFmaintenanceMCP server for PubMed search and literature summarization52MIT
- AlicenseBqualityDmaintenanceThis MCP server provides 16 intelligent tools for searching, retrieving, and linking biomedical literature from PubMed and PMC. It enables LLM applications to perform complex queries, batch processing, and cross-database linking.168MIT
Related MCP Connectors
Auditable MCP server for PubMed, Europe PMC, ClinicalTrials.gov, and bioRxiv/medRxiv queries
MCP gateway federating 21 biomedical MCP servers behind one endpoint: gnomAD, ClinVar, HPO, VEP.
PubMed MCP — wraps the NCBI E-utilities API (biomedical literature, free, no auth)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/JackKuo666/PubTator-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server