Skip to main content

NCBI E-utilities MCP server for accessing NCBI databases

Project description

NCBI E-utilities MCP Server

A Machine Capability Protocol (MCP) server for accessing NCBI E-utilities API. This package provides programmatic access to NCBI databases including PubMed, Protein, Nucleotide, and more.

Features

  • EInfo: Get list of Entrez databases or statistics for a specific database
  • ESearch: Text-based search to retrieve UID lists from NCBI databases
  • ESummary: Retrieve document summaries (DocSum) for UIDs
  • EFetch: Fetch full formatted records for UIDs (core functionality)

Installation

pip install ncbi-mcp

Configuration

Create a .env file in your project root with the following variables:

API_KEY=your_ncbi_api_key  # Optional but recommended for higher rate limits
BASE_URL=https://eutils.ncbi.nlm.nih.gov/entrez/eutils/

Note: Without an API key, your requests are limited to 3 requests per second. With an API key, you can make up to 10 requests per second.

Getting an NCBI API Key

To get an NCBI API key, you need to:

  1. Register for an NCBI account at https://www.ncbi.nlm.nih.gov/account/
  2. Go to your account "Settings" page
  3. Find the "API Key Management" area and click "Create an API Key"
  4. Copy the generated key and use it in your .env file

For more information about NCBI API keys, visit: https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/

Usage

The server implements the MCP protocol and can be integrated with MCP-compatible clients.

Tools Available

EInfo

  • Description: Query NCBI databases, get database statistics
  • Parameters: db_name (optional), retmode (default: xml)

ESearch

  • Description: Search for content by term in specified database
  • Parameters: db_name (default: pubmed), term (search query)

ESummary

  • Description: Get summary information for specified IDs
  • Parameters: db_name (default: pubmed), ids (list of IDs)

EFetch

  • Description: Get complete records for specified IDs
  • Parameters: db_name (default: pubmed), ids (list of IDs), retmode (default: xml), rettype (default: abstract)

Requirements

  • Python >= 3.8
  • NCBI API key (recommended for higher rate limits)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncbi_mcp-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncbi_mcp-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file ncbi_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: ncbi_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ncbi_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c96d275b1644c57c20163e029e164e349cc40cafd4e919605a108aac1667576
MD5 500a921db55357069d1cd1296a72deb1
BLAKE2b-256 41c8881055e7c975b9abcd32d3f177fb621e273553530742ba165f660490bcc7

See more details on using hashes here.

File details

Details for the file ncbi_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ncbi_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ncbi_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b4ef32f54129d9a879c2d89936282ccce698a41f2e1efea261043cbcc5ca1d2
MD5 14d02dbb6b84d4fe2acdfd3508b34bb9
BLAKE2b-256 1eaee8314bf06aad2e5551af5eb74137f746db7cd7bff2c3fc3fb8e1b9676217

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page