Skip to main content

AutoCleanEEG PubMed MCP Server

A Model Context Protocol (MCP) server that provides access to PubMed, the comprehensive biomedical literature database maintained by NCBI. This server enables AI assistants like Claude to search and retrieve detailed information from millions of biomedical research articles.

Features

  • Search PubMed Database: Search across 39+ million biomedical articles using flexible query syntax
  • Retrieve Article Details: Get complete article metadata, abstracts, authors, and publication information
  • Database Information: Access current PubMed database statistics and status
  • API Key Support: Optional NCBI API key integration for enhanced rate limits
  • MCP Protocol: Full Model Context Protocol compliance for seamless AI assistant integration

Installation

From PyPI (Recommended)

pip install autocleaneeg-pubmedmcp

From Source

git clone <repository-url>
cd claude_code_docker
pip install -e .

Usage

As MCP Server

The server can be run directly:

autocleaneeg-pubmedmcp

Claude Desktop Integration

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "pubmed": {
      "command": "autocleaneeg-pubmedmcp",
      "args": [],
      "env": {
        "PUBMED_API_KEY": "your_api_key_here_optional"
      }
    }
  }
}

API Key Setup (Optional)

For enhanced rate limits, obtain a free API key from NCBI:

  1. Visit NCBI API Key Settings
  2. Create an account or log in
  3. Generate an API key
  4. Set environment variable: export PUBMED_API_KEY="your_key_here"

Available Tools

search_pubmed

Search the PubMed database with flexible query syntax.

Parameters:

  • term (required): Search query using PubMed syntax
  • retmax (optional): Maximum results to return (1-1000, default: 20)
  • email (optional): Your email for NCBI tracking

Example:

{
  "term": "BRCA1 mutations AND breast cancer",
  "retmax": 10
}

get_pubmed_details

Retrieve detailed information for specific PubMed articles.

Parameters:

  • id (required): PubMed ID(s) - single ID or array of IDs

Example:

{
  "id": ["35123456", "35789012"]
}

get_pubmed_info

Get current information about the PubMed database.

Parameters: None

Query Syntax Examples

  • Basic search: "covid vaccine"
  • Multiple terms: "BRCA1 AND breast cancer"
  • Author search: "Smith J[Author]"
  • Date range: "covid vaccine" AND 2020:2023[dp]
  • Journal: "Nature[Journal]"
  • Title search: "machine learning"[Title]

Error Handling

The server provides comprehensive error handling for:

  • Invalid queries or parameters
  • Network connectivity issues
  • Rate limiting (automatically handled)
  • Invalid PubMed IDs
  • API key validation

Development

Testing

Run the test suite:

python test_focused.py

Requirements

  • Python 3.10+
  • httpx>=0.25.0
  • mcp>=1.0.0
  • pydantic>=2.0.0
  • email-validator>=2.0.0

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

Support

For issues and questions:

  • Check the troubleshooting section below
  • Open an issue on the repository

Troubleshooting

Connection Issues

  • Verify internet connectivity
  • Check if NCBI servers are accessible
  • Ensure firewall allows outbound HTTPS connections

Rate Limiting

  • Consider adding a PUBMED_API_KEY for higher limits
  • Reduce query frequency
  • Check NCBI rate limiting guidelines

Invalid Results

  • Verify PubMed ID format (numeric)
  • Check query syntax against PubMed documentation
  • Ensure search terms are properly formatted

Made with ❤️ for biomedical research and AI assistance

Metadata

Release files for autocleaneeg-pubmedmcp 1.1.4

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

Source distribution (sdist)

Source distribution for autocleaneeg-pubmedmcp 1.1.4
File Size Uploaded Provenance
autocleaneeg_pubmedmcp-1.1.4.tar.gz 12.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for autocleaneeg-pubmedmcp 1.1.4
File Interpreter ABI Platform
autocleaneeg_pubmedmcp-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / autocleaneeg_pubmedmcp-1.1.4.tar.gz

Download URL autocleaneeg_pubmedmcp-1.1.4.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
014c1b2b28fe1f666dc998b6e54fe3f8eafe8a4964ae90d7d24fba89853ebc0f
BLAKE2b-256 checksum
How to use checksums
3b69ea7a620f8fb4c1f764d5534bdfad57192b272b321d6213a081e63c2f8870
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Release files / autocleaneeg_pubmedmcp-1.1.4-py3-none-any.whl

Download URL autocleaneeg_pubmedmcp-1.1.4-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0363a1e849995ac49cf4723c50949ab37e05ac5d221c55d3f5cc10816585c1d
BLAKE2b-256 checksum
How to use checksums
dd830b36a11d868bb8b1b85338d2bc2329e5f35d9a305e6e5b75ded59ad764c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Security for autocleaneeg-pubmedmcp 1.1.4

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