Skip to main content

Pubtator MCP Server

This project provides an async Python server for interacting with the PubTator3 API. It exposes multiple biomedical text-mining tools compatible with the MCP agent protocol, supporting tasks such as entity lookup, biomedical literature search, and text extraction from PubMed/PMC articles.

Features

  • Entity Autocomplete: Find biomedical entities (genes, diseases, chemicals, variants) using free-text queries.
  • Literature Search: Search the PubTator3 database using keywords, entity IDs, or entity relations.
  • Article Retrieval: Download and extract text from PubMed/PMC articles in multiple formats.
  • Find Related Entities: Query for entities related to a given identifier via customizable relation and type filters.
  • Async and Fast: Uses aiohttp for non-blocking HTTP requests; designed for integration into broader MCP environments.

Available Tools

The server provides the following tools to interact with the PubTator3 API, accessible via the MCP protocol. These tools allow programmatic access to biomedical concept lookup, literature search, full-text extraction, and entity relation discovery.

1. find_entity

  • Purpose: Find the identifier(s) for a specific bioconcept using a free text query.
  • Input:
    • query (string, required): Free text of the concept to look up (e.g. "breast cancer", "BRCA1").
    • bioconcept (string, optional): Restrict results to a concept type: one of 'disease', 'gene', 'chemical', 'variant'.
    • limit (integer, optional): Maximum number of results (default 10, max 50).
  • Returns:
    A list of matching entities, each with PubTator identifiers, labels, and concept types.

2. search_pubtator

  • Purpose: Search for relevant PubMed/PMC articles in PubTator3 using flexible queries.
  • Input:
    • query (string, required): Free text, PubTator concept ID, or a relations query.
    • relation (string, optional): Specific relation type (default 'ANY').
    • limit (integer, optional): Number of results to retrieve (default 10, max 50).
  • Returns:
    A JSON list including article IDs and brief summaries.

3. get_paper_text

  • Purpose: Download and extract the text content from a PubMed or PMC article.
  • Input:
    • pmid or pmcid (string, required): Article identifier (PubMed ID or PMC ID).
  • Returns:
    The plain text content of the article if available.

4. find_related_entities

  • Purpose: Find entities related to a specific PubTator entity, filtered by relation type or entity type.
  • Input:
    • entity_id (string, required): The PubTator entity ID to query (e.g., @GENE_BRCA1).
    • relation_type (string, optional): Restrict relations by type (e.g., 'interacts_with', 'associated_with').
    • entity_type (string, optional): Restrict related entities to a concept type.
  • Returns:
    A pretty-printed JSON with related entity IDs and relation details.

Each tool's full input schema, description, and examples are provided in the list_tools endpoint within server.py.
Use these tools to integrate sophisticated PubTator3-powered biomedical knowledge access in compatible platforms or agents.

Installation

  1. Installation 3.10+ and required libraries (see below).
    pip install mcp-server-pubtator3
    
  2. Run the server:
    mcp-server-pubtator3
    

Metadata

Release files for mcp-server-pubtator3 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-server-pubtator3 0.2.1
File Size Uploaded Provenance
mcp_server_pubtator3-0.2.1.tar.gz 10.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-pubtator3 0.2.1
File Interpreter ABI Platform
mcp_server_pubtator3-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / mcp_server_pubtator3-0.2.1.tar.gz

Download URL mcp_server_pubtator3-0.2.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
263db518a13ef40ace71a9e39903d3b994142468489ff74355ae01bc8bd239a8
BLAKE2b-256 checksum
How to use checksums
6ca8e73fefe242a30ce13b9853eb68a4949d068625e9a59decc8bd617fc6354b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / mcp_server_pubtator3-0.2.1-py3-none-any.whl

Download URL mcp_server_pubtator3-0.2.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2a45a5fe84863d01bc2c63ed741064f7ab3a99c338ea8072d7953b0584ed5b2
BLAKE2b-256 checksum
How to use checksums
40ab9e5787a46e61c431cac0f999d5d96400c4cd780ece70cd0a33c6a11875d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for mcp-server-pubtator3 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page