Skip to main content

An MCP server that provides access to PubMed articles through Entrez API.

Project description

MCP Simple PubMed

An MCP server that provides access to PubMed articles through the Entrez API.

Features

  • Search PubMed database using keywords
  • Access article abstracts
  • Download full text when available (for open access articles available directly on PubMed)

Please note that the tool returns XML-ized version of full text. It is however more useful for AIs than a "human readable" text would have been as it gives them additional information about document's structure. At least, this is what Claude 3.5 Sonnet said he prefers.

Please also note that inability of this tool and possibly other tools to deliver a paper's full text may not be due to the fact that it is not available. When testing this tool I came across a paper that did not have full text on PubMed and when Claude accessed the publication URL (which we did get through DOI) using fetch he did get a "forbidden” error. However, I was able to access the very same page using a regular browser.

In other words if your AI assistant is not able to get the full text of a paper using this tool it is worth trying manually with a regular web browser.

Finally, this tool of course can’t give you access to paywalled/paid papers. You may be able to read them through your library access or – as a last resort – through a certain site that strives to make publicly funded research freely available.

Installation

pip install mcp-simple-pubmed

Configuration

The server requires the following environment variables:

  • PUBMED_EMAIL: Your email address (required by NCBI)
  • PUBMED_API_KEY: Optional API key for higher rate limits

The standard rate limit is 3 requests / second. No rate limiting was implemented, as it is highly unlikely in the typical usage scenario that your AI would generate more traffic. If you need it, you can register for an API key which will give you 10 requests / second. Read about this on NCBI pages.

Usage with Claude Desktop

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

(Mac OS)

{
  "mcpServers": {
    "simple-pubmed": {
      "command": "python",
      "args": ["-m", "mcp_simple_pubmed"],
      "env": {
        "PUBMED_EMAIL": "your-email@example.com",
        "PUBMED_API_KEY": "your-api-key" 
      }
    }
  }
}

(Windows)

{
  "mcpServers": {
    "simple-pubmed": {
      "command": "C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Programs\\Python\\Python311\\python.exe",
      "args": [
        "-m",
        "mcp_simple_pubmed"
      ],
      "env": {
        "PUBMED_EMAIL": "your-email@example.com",
        "PUBMED_API_KEY": "your-api-key" 
      }
    }
  }
}

License

MIT License

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

mcp_simple_pubmed-0.1.10.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

mcp_simple_pubmed-0.1.10-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_simple_pubmed-0.1.10.tar.gz.

File metadata

  • Download URL: mcp_simple_pubmed-0.1.10.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.3

File hashes

Hashes for mcp_simple_pubmed-0.1.10.tar.gz
Algorithm Hash digest
SHA256 136bf3a796a96a9d82cb4403e8a566e81546b1bac521255e7ecb85fa3bbd00f1
MD5 0a5b3eebf2db6f6a6d4825521cd54537
BLAKE2b-256 7037f8337b1cbb041c0fb8f8dc02eba2185975ba60e2946cfd0eff75aa3586fc

See more details on using hashes here.

File details

Details for the file mcp_simple_pubmed-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_simple_pubmed-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 75235c879e8eadaaf4ee94cd24bdc9e087baeddc8c1c7272be512fef23371b81
MD5 04411aced560c8b126a1d7b1334a805c
BLAKE2b-256 87bc3a95f2d0fde14e6cd0f332b5b5403f887cff6cda5fdb7469675e6ad96865

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