Logo NCBI 文献搜索 MCP 服务器

NCBI 文献搜索 MCP 服务器

Cộng đồng
vitorpavinato

A Model Context Protocol (MCP) server for searching NCBI databases, designed for researchers across all life sciences and biomedical fields. This server provides seamless access to PubMed's vast…

Nhà phát hànhvitorpavinato
Kho mãncbi-mcp-server
Ngôn ngữPython
Bản fork
3
Sao
13
Công cụ có sẵn
0
Phương thức truyền tảistdio, streamable-http
Danh mục
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    NCBI 文献搜索 MCP 服务器 cung cấp các chức năng MCP cho các ứng dụng khách AI và tác nhân AI tương thích.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Mẫu cấu hình có thể sao chép ngay

    Dùng các đoạn cấu hình mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Mức độ quan tâm của cộng đồng đến kho mã

    13 sao và 3 bản fork từ kho mã được liên kết.

NCBI Literature Search MCP Server

A Model Context Protocol (MCP) server for searching NCBI databases, designed for researchers across all life sciences and biomedical fields. This server provides seamless access to PubMed's vast collection of 35+ million scientific articles through natural language queries, enabling AI assistants to help with literature reviews, research discovery, and scientific analysis.

Features

🔬 Comprehensive Search: Search PubMed's 35+ million articles across all biological disciplines 📊 Advanced Queries: Support for complex searches with boolean operators, field tags, and filters
🧬 Life Sciences Research: Covers all biological and biomedical fields including genetics, ecology, medicine, and biotechnology 💻 Computational Biology: Perfect for finding bioinformatics methods, algorithms, and computational tools 🔬 Research Applications: Literature reviews, hypothesis generation, method discovery, and staying current with scientific advances 📚 Full Article Details: Get abstracts, author lists, MeSH terms, DOIs, and publication information 🔗 Related Articles: Discover relevant research through NCBI's relationship algorithms 📖 MeSH Integration: Search and utilize Medical Subject Headings for precise terminology

Quick Start

Prerequisites

Setup (5 minutes)

  1. Create and initialize project

    bash
    mkdir ncbi-mcp-server && cd ncbi-mcp-server
    poetry init

    During init, add dependencies: mcp, httpx, typing-extensions

  2. Create project structure

    bash
    mkdir -p src/ncbi_mcp_server
    # Save server.py code as src/ncbi_mcp_server/server.py
  3. Install dependencies

    bash
    poetry install
  4. Test the server

    bash
    poetry run python src/ncbi_mcp_server/server.py
  5. Configure Claude Desktop

    Edit your Claude Desktop config file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
    • Linux: ~/.config/claude/claude_desktop_config.json

    Add this configuration:

    json
    {
      "mcpServers": {
        "ncbi-literature": {
          "command": "poetry",
          "args": ["run", "python", "src/ncbi_mcp_server/server.py"],
          "cwd": "/FULL/PATH/TO/YOUR/ncbi-mcp-server"
        }
      }
    }
  6. Restart Claude Desktop and start searching!

Alternative Setup Methods

Conda Environment

bash
conda env create -f environment.yml
conda activate ncbi-mcp
python server.py

Standard pip + venv

bash
python -m venv venv
source venv/bin/activate  # Linux/macOS
pip install -r requirements.txt
python server.py

Usage Examples

For Evolutionary Biology Research

Search for phylogenetic studies:

"Search for recent phylogenetic analysis papers on mammalian evolution"
→ Uses: search_pubmed with query "phylogenetic analysis[ti] AND mammalian[ti] AND evolution"

Find computational phylogenetics methods:

"Find papers about maximum likelihood methods for phylogenetic reconstruction"
→ Uses: search_pubmed with query "maximum likelihood[ti] AND phylogenetic reconstruction"

Search by specific organism:

"Find recent papers on Drosophila comparative genomics"
→ Uses: search_pubmed with query "Drosophila[ti] AND comparative genomics[ti]"

For Computational Biology Research

Algorithm and method papers:

"Search for machine learning applications in genomics from the last 2 years"
→ Uses: search_pubmed with date_range="730" and query "machine learning AND genomics"

Software and database papers:

"Find papers about new bioinformatics tools for sequence analysis"
→ Uses: search_pubmed with query "bioinformatics[ti] AND software[ti] AND sequence analysis"

Advanced Search Examples

Multi-criteria search:

"Find review articles about CRISPR applications in evolutionary studies published in Nature or Science"
→ Uses: advanced_search with terms=["CRISPR", "evolution"], publication_types=["Review"], journals=["Nature", "Science"]

Author-specific searches:

"Find recent papers by researchers working on ancient DNA and phylogenomics"
→ Uses: search_pubmed with query "ancient DNA[ti] AND phylogenomics[ti]"

Tool Reference

search_pubmed

Primary search tool for PubMed database

  • query: Search terms (supports field tags like [ti] for title, [au] for author, [mh] for MeSH terms)
  • max_results: Number of results (1-100, default: 20)
  • sort: Sort by "relevance", "pub_date", "author", or "journal"
  • date_range: Limit to recent articles ("30", "90", "365", "1095" days)

Examples:

  • "CRISPR[ti] AND evolution" - CRISPR in title AND evolution anywhere
  • "phylogenetic analysis[mh]" - Using MeSH term for phylogenetic analysis
  • "computational biology AND machine learning" - Boolean search

get_article_details

Fetch complete information for specific articles

  • pmids: List of PubMed IDs (up to 50)

Returns full abstracts, author lists, MeSH terms, DOI, publication details

search_mesh_terms

Find standardized Medical Subject Headings

  • term: Term to search in MeSH database

Helps discover related concepts and improve search precision

get_related_articles

Discover articles related to a specific paper

  • pmid: PubMed ID of reference article
  • max_results: Number of related articles (1-50, default: 10)

Perfect for literature reviews and finding relevant research

advanced_search

Complex searches with multiple criteria

  • terms: List of search terms to combine
  • operator: "AND", "OR", or "NOT" to combine terms
  • authors: List of author names
  • journals: List of journal names
  • publication_types: "Research Article", "Review", "Meta-Analysis", etc.
  • date_from/date_to: Date range in YYYY/MM/DD format
  • max_results: Number of results (1-100, default: 20)

Analytics & Performance Monitoring

The NCBI MCP Server includes comprehensive analytics to help you understand your research patterns and optimize performance.

Analytics Tools

get_analytics_summary

Get comprehensive analytics overview

"Show me my research analytics summary"

Returns:

  • Total requests and uptime
  • Operation breakdown (searches, fetches, etc.)
  • Cache performance metrics
  • Recent activity and error rates
  • System health indicators

get_detailed_metrics

Detailed performance metrics for specific time periods

"Get detailed metrics for the last 24 hours"
  • hours: Time period to analyze (default: 24)
  • Operation-specific performance data
  • Timeline analysis with hourly breakdowns
  • Error rates and response times per operation

reset_analytics

Reset analytics data (use with caution)

"Reset all analytics data"

Note: This permanently clears all collected metrics.

What's Tracked

Usage Patterns:

  • Search queries and frequency
  • Most used operations
  • Unique vs. repeated queries
  • Peak usage periods

Performance Metrics:

  • Response times for each operation
  • Cache hit/miss rates
  • Error rates and types
  • Rate limiting efficiency

Research Insights:

  • Popular search terms and patterns
  • Research workflow analysis
  • Literature access patterns
  • Most accessed journals and topics

Deployment

Quick Start

  1. Configure credentials:

    bash
    cp .env.example .env
    # Edit .env with your NCBI email and API key
  2. Choose deployment method:

    bash
    # Local development
    ./deploy.sh local
    
    # Docker deployment
    ./deploy.sh docker
    
    # Production deployment
    ./deploy.sh production

Deployment Options

1. Local Development

Perfect for development and testing:

bash
poetry install
poetry run python -m src.ncbi_mcp_server.server

2. Docker Deployment

Recommended for most users with two options:

Full setup with Redis (recommended):

bash
# Copy and configure environment
cp .env.example .env
# Edit .env with your NCBI email and API key

# Start all services
docker-compose up -d

Simple setup without Redis:

bash
# For basic usage without Redis dependencies
cp .env.example .env
# Edit .env with your NCBI email

docker-compose -f docker-compose.simple.yml up -d

Full setup includes:

Simple setup includes:

  • NCBI MCP Server container only
  • In-memory caching (no persistence)

3. Production Deployment

For production environments:

bash
# Configure production settings
cp .env.production .env
# Edit with production values

# Deploy
./deploy.sh production

Monitoring

Docker logs:

bash
docker-compose logs -f ncbi-mcp-server

Cache monitoring:

Health checks:

bash
# Test server health
curl http://localhost:8000/health

# Test via MCP
python -c "from src.ncbi_mcp_server.server import cache_stats; import asyncio; print(asyncio.run(cache_stats()))"

Configuration

NCBI API Key (Optional but Recommended)

For higher rate limits and better performance:

  1. Register at NCBI: https://www.ncbi.nlm.nih.gov/account/
  2. Get API key: https://www.ncbi.nlm.nih.gov/account/settings/
  3. Add to server code in src/ncbi_mcp_server/server.py:
python
# Replace the line: ncbi_client = NCBIClient()
# With:
ncbi_client = NCBIClient(
    email="your.email@university.edu",
    api_key="your_api_key_here"
)

Rate Limits

  • Without API key: 3 requests/second
  • With API key: 10 requests/second
  • With API key + email: Higher limits for bulk requests

Development Workflow

Poetry Commands

bash
poetry shell              # Activate virtual environment
poetry add package        # Add new dependency
poetry remove package     # Remove dependency
poetry update            # Update all dependencies
poetry run python ...    # Run commands in environment
poetry build             # Create distribution packages

Code Quality (if you added dev dependencies)

bash
poetry add --group dev black mypy pytest isort flake8
poetry run black .       # Format code
poetry run mypy .        # Type checking  
poetry run pytest       # Run tests
poetry run isort .       # Sort imports

Sharing with Colleagues

bash
# They just need:
git clone your-repo
cd ncbi-mcp-server  
poetry install
# Everything works identically!

Field Tags for Advanced Searches

PubMed supports many field tags for precise searching:

  • [ti] - Title
  • [tiab] - Title and Abstract
  • [au] - Author
  • [mh] - MeSH Terms
  • [journal] - Journal Name
  • [pdat] - Publication Date
  • [pt] - Publication Type
  • [lang] - Language
  • [sb] - Subset (e.g., medline, pubmed)

Example Advanced Queries:

"machine learning"[ti] AND "phylogen*"[tiab] AND "2020"[pdat]:"2024"[pdat]
evolutionary[mh] AND computational[ti] AND (genomics[tiab] OR proteomics[tiab])
"ancient DNA"[ti] AND (paleogenomics[mh] OR phylogenomics[tiab])

Research Workflow Examples

Literature Review Workflow

  1. Start broad: search_pubmed("computational phylogenetics")
  2. Refine with MeSH: search_mesh_terms("phylogenetics")
  3. Find key papers: Use publication dates and journal filters
  4. Explore connections: get_related_articles(pmid="key_paper_id")
  5. Deep dive: get_article_details(pmids=["12345", "67890"])

Staying Current

  1. Recent methods: search_pubmed("new methods", date_range="90")
  2. Follow key authors: search_pubmed("author_name[au]", sort="pub_date")
  3. Track specific topics: advanced_search with your research keywords

Method Discovery

  1. Algorithm papers: search_pubmed("algorithm[ti] AND your_field")
  2. Software tools: search_pubmed("software[ti] OR tool[ti] AND bioinformatics")
  3. Benchmarking: search_pubmed("comparison[ti] OR benchmark[ti]")

Troubleshooting

Common Issues

Server won't start:

  • Check Python version (3.8+ required)
  • Install dependencies: pip install -r requirements.txt
  • Verify file permissions

No search results:

  • Check query syntax (use proper field tags)
  • Try broader search terms
  • Verify internet connection

Rate limit errors:

  • Add delays between requests
  • Get NCBI API key for higher limits
  • Consider searching fewer results per query

XML parsing errors:

Getting Help

Contributing

This MCP server is designed to grow with the research community. Ideas for enhancement:

  • Additional databases: PMC, BioRxiv, databases beyond NCBI
  • Citation analysis: Track paper impact and citation networks
  • Export formats: BibTeX, EndNote, RIS for reference managers
  • Saved searches: Persistent search profiles and alerts
  • Full-text integration: When available through PMC

License

This project is open source. Feel free to modify and distribute according to your institution's policies.


Perfect for researchers in:

  • Evolutionary Biology & Phylogenetics
  • Computational Biology & Bioinformatics
  • Molecular Evolution & Population Genetics
  • Comparative Genomics & Proteomics
  • Systems Biology & Network Analysis
  • Biostatistics & Mathematical Biology
  • Ancient DNA & Paleogenomics
  • Conservation Genetics & Ecology

Start exploring the vast world of biological literature with powerful, precise searches!

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "vitorpavinato-ncbi-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ncbi-mcp-server"
      ]
    }
  }
}

Dùng MCP NCBI 文献搜索 MCP 服务器 với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối NCBI 文献搜索 MCP 服务器, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. Bạn có thể chạy MCP ngay trên thiết bị của mình hoặc kết nối qua URL của máy chủ MCP từ xa.

Cách 1: Dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Thiết lập trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Thiết lập trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh thiết lập trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Để tiến trình tiếp tục chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Để tiến trình tiếp tục chạy trong cửa sổ Terminal khi bạn dùng các công cụ MCP.
3

Thêm NCBI 文献搜索 MCP 服务器 làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của NCBI 文献搜索 MCP 服务器.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "vitorpavinato-ncbi-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ncbi-mcp-server"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của NCBI 文献搜索 MCP 服务器, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của NCBI 文献搜索 MCP 服务器.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện trên TypingMind dùng các công cụ MCP đã bật với mô hình AI đã chọn
Bạn có thể dùng NCBI 文献搜索 MCP 服务器 giúp tôi làm việc này không?
NCBI 文献搜索 MCP 服务器
Được. Tôi đọc rồi.
Đây là kết quả tôi tìm được bằng NCBI 文献搜索 MCP 服务器.

Cách 2: Thêm URL máy chủ MCP

Dùng cách này khi NCBI 文献搜索 MCP 服务器 đã chạy trên máy chủ từ xa hoặc nhóm của bạn muốn có một trình kết nối dùng chung cho nhiều người dùng.

1

Mở mục Trình kết nối MCP

Trong TypingMind, vào Plugin, mở mục Trình kết nối MCP, rồi chọn Thêm URL.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Vào mục Plugin.
  3. Mở mục Trình kết nối MCP.
  4. Nhấp vào Thêm URL.
Biểu mẫu Thêm URL máy chủ MCP tùy chỉnh của TypingMind
2

Dán URL máy chủ

Nhập URL máy chủ của bạn vào trường URL máy chủ. Thêm tên kết nối, mô tả, biểu tượng, header HTTP tùy chỉnh hoặc cài đặt ứng dụng khách OAuth nếu máy chủ yêu cầu.

  1. Dán URL máy chủ của bạn vào trường URL máy chủ.
  2. Nhập tên kết nối cho NCBI 文献搜索 MCP 服务器.
  3. Thêm mô tả và biểu tượng nếu bạn muốn dễ nhận biết kết nối hơn.
  4. Thêm header HTTP tùy chỉnh hoặc thông tin ứng dụng khách OAuth nếu máy chủ yêu cầu xác thực.
3

Tạo kết nối

Nhấp vào Tạo kết nối, sau đó quay lại danh sách Plugin và xác nhận kết nối MCP mới đang hoạt động.

  1. Nhấp vào Tạo kết nối.
  2. Quay lại danh sách trình kết nối MCP.
  3. Xác nhận kết nối NCBI 文献搜索 MCP 服务器 hiển thị trạng thái đang hoạt động.
  4. Làm mới danh sách plugin nếu kết nối chưa xuất hiện ngay.
4

Đổi mô hình mà không cần kết nối lại

Bắt đầu cuộc trò chuyện với mô hình bạn thích, bật các công cụ của NCBI 文献搜索 MCP 服务器 trong mục Plugin và chuyển sang mô hình khác khi cần. Kết nối MCP vẫn sẵn dùng trong không gian làm việc TypingMind.

  1. Bắt đầu cuộc trò chuyện mới trong TypingMind.
  2. Chọn mô hình AI bạn muốn dùng.
  3. Bật các công cụ của NCBI 文献搜索 MCP 服务器 trong mục Plugin.
  4. Yêu cầu mô hình dùng công cụ khi cần.
  5. Chuyển sang mô hình AI khác và tiếp tục dùng kết nối MCP hiện có.
Cuộc trò chuyện trên TypingMind dùng các công cụ MCP đã bật với mô hình AI đã chọn
Bạn có thể dùng NCBI 文献搜索 MCP 服务器 giúp tôi làm việc này không?
NCBI 文献搜索 MCP 服务器
Được. Tôi đọc rồi.
Đây là kết quả tôi tìm được bằng NCBI 文献搜索 MCP 服务器.

Câu hỏi thường gặp

Máy chủ MCP NCBI 文献搜索 MCP 服务器 dùng để làm gì?

NCBI 文献搜索 MCP 服务器 là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP NCBI 文献搜索 MCP 服务器 với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng NCBI 文献搜索 MCP 服务器 với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP NCBI 文献搜索 MCP 服务器 với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối NCBI 文献搜索 MCP 服务器, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP NCBI 文献搜索 MCP 服务器 với TypingMind?

Bạn có thể kết nối NCBI 文献搜索 MCP 服务器 trong TypingMind bằng trình kết nối MCP cục bộ hoặc bằng cách thêm URL máy chủ MCP từ xa. Dùng trình kết nối cục bộ khi máy chủ cần truy cập tệp, ứng dụng hoặc tài nguyên riêng trên thiết bị của bạn; dùng URL máy chủ khi máy chủ MCP được lưu trữ từ xa.

MCP NCBI 文献搜索 MCP 服务器 cung cấp những công cụ nào trong TypingMind?

NCBI 文献搜索 MCP 服务器 cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP NCBI 文献搜索 MCP 服务器 không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu NCBI 文献搜索 MCP 服务器 yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇