Literature MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install literature-mcp
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add literature-mcp -- node "<FULL_PATH_TO_LITERATURE_MCP>/dist/index.js"

Replace <FULL_PATH_TO_LITERATURE_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

Biological and clinical evidence retrieval from the Europe PMC database.

๐Ÿ“š Literature MCP

A specialized Model Context Protocol (MCP) server for biological and clinical evidence retrieval. This server provides a structured, agent-friendly interface to the Europe PMC database, enabling LLMs to gather, rank, and synthesize published research.

Built for the Agent4Target ecosystem, it focuses on high-confidence evidence collection for therapeutic targets and disease associations.


๐Ÿ—๏ธ Architecture & Workflow

The server performs semantic and keyword-based retrieval, transforming raw XML/JSON responses from Europe PMC into clean, machine-readable evidence models.

graph LR
    User([User / LLM Client]) <-->|MCP Protocol| Server[Literature MCP Server]
    
    subgraph "Internal Processing"
        Server --> Router{Tool Router}
        Router --> T1[collect_target_evidence]
        Router --> T2[search_articles]
        Router --> T3[get_article_by_pmid]
        
        T1 & T2 & T3 --> Client[EuropePMCClient]
        Client --> EPMC_API[[Europe PMC REST API]]
    end
    
    subgraph "Ranking Logic"
        Client --> Ranker[Citation & Recency Weighted Ranking]
        Ranker --> Pydantic[Pydantic Result Models]
        Pydantic --> Server
    end

๐Ÿš€ Quick Start

1. Installation

pip install literature-mcp

2. Running the Server

The server is highly flexible and supports both stdio (standard for Claude Desktop) and HTTP SSE transport.

# Run over stdio (Standard)
literature-mcp --transport stdio

# Run as local HTTP server (SSE)
literature-mcp --port 8002

๐Ÿ› ๏ธ Tools Documentation

`collect_literature_target_evidence`

The primary tool for the Agent4Target workflow. It performs a multi-strategy search for a gene and disease context, returning the most cited and relevant evidence records.

  • Inputs:
    • gene_symbol (required, e.g., "BRAF")
    • disease_id (optional, e.g., "EFO_0000311")
    • limit (max records, default: 15)

`search_literature_articles`

A flexible search tool that accepts raw Europe PMC query strings (e.g., AUTHOR:"Vogelstein B" AND GENE:"KRAS").

  • Inputs: query (string)

`get_literature_article_by_pmid`

Retrieves full structured metadata for a specific article.

  • Inputs: pmid (string)

`get_literature_service_metadata`

Returns information about the underlying Europe PMC client, API rate limits, and health status.


โš™๏ธ Configuration

Variable Default Description
LITERATURE_MCP_EUROPE_PMC_SEARCH_URL https://www.ebi.ac.uk/... REST API endpoint.
LITERATURE_MCP_HTTP_PORT 8002 Port for SSE transport.
LITERATURE_MCP_REQUEST_TIMEOUT_S 30 Network timeout for API calls.
LITERATURE_MCP_LOG_LEVEL INFO Verbosity of server logs.

๐Ÿ–ฅ๏ธ Usage in Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "literature-mcp": {
      "command": "literature-mcp",
      "args": ["--transport", "stdio"],
      "env": {
        "LITERATURE_MCP_LOG_LEVEL": "DEBUG"
      }
    }
  }
}

๐Ÿงช Development

The project uses uv for modern, fast dependency management.

# Clone and setup
git clone https://github.com/your-org/literature-mcp
cd literature-mcp
uv sync

# Run tests
uv run pytest

๐Ÿ“„ License

MIT ยฉ 2026 Literature MCP Contributors. Part of the Agent4Target ecosystem.

Tools (4)

collect_literature_target_evidencePerforms a multi-strategy search for a gene and disease context to return cited evidence.
search_literature_articlesA flexible search tool that accepts raw Europe PMC query strings.
get_literature_article_by_pmidRetrieves full structured metadata for a specific article.
get_literature_service_metadataReturns information about the underlying Europe PMC client, API rate limits, and health status.

Environment Variables

LITERATURE_MCP_EUROPE_PMC_SEARCH_URLREST API endpoint for Europe PMC.
LITERATURE_MCP_HTTP_PORTPort for SSE transport.
LITERATURE_MCP_REQUEST_TIMEOUT_SNetwork timeout for API calls.
LITERATURE_MCP_LOG_LEVELVerbosity of server logs.

Configuration

claude_desktop_config.json
{"mcpServers": {"literature-mcp": {"command": "literature-mcp", "args": ["--transport", "stdio"], "env": {"LITERATURE_MCP_LOG_LEVEL": "DEBUG"}}}}

Try it

โ†’Find the most cited research evidence linking the BRAF gene to EFO_0000311.
โ†’Search for recent articles authored by Vogelstein B that mention the KRAS gene.
โ†’Get the full metadata for the article with PMID 34567890.
โ†’What is the current health status and rate limit for the Europe PMC connection?

Frequently Asked Questions

What are the key features of Literature MCP?

Semantic and keyword-based retrieval from Europe PMC. Citation and recency weighted ranking of research articles. Structured Pydantic result models for machine-readable data. Support for both stdio and HTTP SSE transport protocols.

What can I use Literature MCP for?

Gathering high-confidence evidence for therapeutic target validation. Synthesizing published research for disease association studies. Automating literature reviews for clinical research workflows. Integrating biological database queries directly into LLM agent workflows.

How do I install Literature MCP?

Install Literature MCP by running: pip install literature-mcp

What MCP clients work with Literature MCP?

Literature MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Literature MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare