masa061580/pubmed_cinii_mcp_server
If you are the rightful owner of pubmed_cinii_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This server integrates PubMed and CiNii Research, allowing for comprehensive searches across English and Japanese literature.
PubMed + CiNii MCP Server
日本語
PubMed(英語文献)と CiNii Research(日本語文献)の両方を検索できる統合 MCP (Model Context Protocol) サーバーです。
機能一覧
PubMed ツール(英語文献)
| ツール | 説明 |
|---|---|
search | PubMed検索(MeSHサポート、1-200件) |
fetch | 単一PMIDのアブストラクト取得 |
fetch_batch | 複数PMIDのアブストラクト一括取得 |
get_full_text | PMCIDの全文取得 |
count | 検索結果件数の取得 |
find_similar_articles | 類似論文の検索 |
export_to_ris | RIS形式エクスポート |
get_citation_counts | iCite APIで被引用数取得 |
download_pdfs | PDFダウンロード |
CiNii ツール(日本語文献)
| ツール | 説明 |
|---|---|
search_japanese | CiNii Research検索(抄録含む) |
export_to_ris_japanese | 日本語論文のRIS形式エクスポート |
API キーの取得方法
NCBI API Key(PubMed用)
- NCBI アカウント設定 にアクセス
- NCBI アカウントでログイン(なければ作成)
- 「API Key Management」セクションで「Create an API Key」をクリック
- 生成されたキーをコピーして
.envファイルに設定
※ API キーがない場合は 3 req/s、ある場合は 10 req/s のレート制限
CiNii APP ID(日本語文献用)
- CiNii API 利用登録ページ にアクセス
- 「API利用登録」から新規登録
- 必要事項を入力し、利用目的を記載して申請
- 登録完了後、メールでアプリケーション ID が通知されます
※ 学術研究目的での利用が前提です
インストールと起動
# リポジトリをクローン
git clone https://github.com/your-username/pubmed_cinii_mcp_server.git
cd pubmed_cinii_mcp_server
# 依存関係をインストール
pip install -r requirements.txt
# 環境変数を設定
cp .env.example .env
# .env ファイルを編集して API キーを設定
# サーバーを起動
python pubmed_mcp_server.py
Koyeb へのデプロイ
- GitHub リポジトリを Koyeb に接続
- 以下の環境変数を設定:
NCBI_API_KEYNCBI_EMAILCINII_APP_IDPORT=8000
- ビルドコマンド:
pip install -r requirements.txt - 実行コマンド:
python pubmed_mcp_server.py
OpenAI/Claude での設定
サーバーが https://your-app.koyeb.app で動作している場合:
{
"mcpServers": {
"pubmed-cinii": {
"url": "https://your-app.koyeb.app/sse"
}
}
}
使用例
# PubMed検索
「machine learning in medicine」で論文を検索して
# CiNii検索
「機械学習」に関する日本語論文を検索して
# 日本語論文のRISエクスポート
検索結果をRIS形式でエクスポートして
English
An integrated MCP (Model Context Protocol) server that can search both PubMed (English literature) and CiNii Research (Japanese literature).
Features
PubMed Tools (English Literature)
| Tool | Description |
|---|---|
search | PubMed search with MeSH support (1-200 results) |
fetch | Retrieve abstract for single PMID |
fetch_batch | Batch retrieve abstracts for multiple PMIDs |
get_full_text | Get full text for PMCID |
count | Get search result count |
find_similar_articles | Find similar articles |
export_to_ris | Export to RIS format |
get_citation_counts | Get citation counts via iCite API |
download_pdfs | Download PDF files |
CiNii Tools (Japanese Literature)
| Tool | Description |
|---|---|
search_japanese | Search CiNii Research (includes abstracts) |
export_to_ris_japanese | Export Japanese papers to RIS format |
How to Get API Keys
NCBI API Key (for PubMed)
- Visit NCBI Account Settings
- Log in with your NCBI account (create one if needed)
- Click "Create an API Key" in the API Key Management section
- Copy the generated key to your
.envfile
※ Rate limit: 3 req/s without API key, 10 req/s with API key
CiNii APP ID (for Japanese Literature)
- Visit CiNii API Developer Registration
- Click "API利用登録" (API Registration)
- Fill in required information and describe your usage purpose
- After registration, you will receive your APP ID via email
※ Usage is limited to academic research purposes
Installation and Running
# Clone repository
git clone https://github.com/your-username/pubmed_cinii_mcp_server.git
cd pubmed_cinii_mcp_server
# Install dependencies
pip install -r requirements.txt
# Configure environment variables
cp .env.example .env
# Edit .env file with your API keys
# Start server
python pubmed_mcp_server.py
Deploy to Koyeb
- Connect your GitHub repository to Koyeb
- Set environment variables:
NCBI_API_KEYNCBI_EMAILCINII_APP_IDPORT=8000
- Build command:
pip install -r requirements.txt - Run command:
python pubmed_mcp_server.py
Configuration for OpenAI/Claude
If your server is running at https://your-app.koyeb.app:
{
"mcpServers": {
"pubmed-cinii": {
"url": "https://your-app.koyeb.app/sse"
}
}
}
Usage Examples
# PubMed search
Search for papers on "machine learning in medicine"
# CiNii search (Japanese)
Search for Japanese papers on "機械学習"
# Export to RIS
Export search results to RIS format
License
MIT
Credits
- Powered by PubMed / NCBI E-utilities
- Powered by CiNii Research