MedCP

official

MedCP, the free MCP server for PubMed

What can you do with MedCP MCP?

  • Literature search — Ask a clinical question and get matching PubMed articles with abstracts, filters, and relevance, date, or citation sorting via search_pubmed.
  • Full-text reading — Pull up to 20 full records by PMID or read one article's full text page by page, including its licence, with get_articles.
  • Figures — Retrieve figures from a full text, such as forest plots and survival curves, as images with get_figure.
  • MeSH lookup — Find MeSH descriptors and publication types with identifiers and tree numbers to build precise filters using lookup_mesh.
  • Drug data — Look up FDA and EMA medicines, labels, shortages, and recalls by name or code with lookup_drug, then read a label section by section via read_drug_label.
  • Guidelines — Search clinical guidelines and health technology assessments by passage, then read a publication's documents page by page with search_guidelines and get_guideline.

Hosted MCP Server

npx add-mcp 'https://api.medcp.app/mcp'

Installs into Claude Code, Codex, Cursor and more

Documentation

For developers. Updated every day.

An MCP server and a REST API for the medical literature

For your agent: 33.8 million MEDLINE/PubMed articles, 8.1 million full texts, clinical trials and medicines, updated every day, and clinical guidelines.

MCP endpointhttps://api.medcp.app/mcpCopy

Attribution and data date included

[ GET /v1/search ]

Request

cURL

curl -sG https://api.medcp.app/v1/search \ -H "Authorization: Bearer $MEDCP_API_KEY" \ --data-urlencode \ "q=does vitamin D supplementation prevent fractures in older adults" \ -d mode=hybrid \ -d limit=3 \ -d abstracts=true

The REST search defaults to keywords only, 20 results and no abstracts; this request changes all three.

Response 200 OK

[.JSON ]shortened

{ "results": [ { "pmid": 22396920, … }, { "pmid": 16019730, … }, { "pmid": 35939577, "title": "Supplemental Vitamin D and Incident Fractures in Midlife and Older Adults.", "journal": { "iso_abbrev": "N Engl J Med", … }, "pub_year": 2022, "authors": ["LeBoff MS", "Chou SH", …], "pub_types": […, "Randomized Controlled Trial"], "abstract": "BACKGROUND: Vitamin D…", "full_text": { "source": "pmc", … } } ], "mode": "hybrid", "meta": { "attribution": "This service uses MEDLINE…", "data_as_of": "2026-11-01T07:20:44.639840Z" }}

The record is real; the response is shortened for this page.

MCP endpoint

https://api.medcp.app/mcp

REST base

https://api.medcp.app/v1

Authentication

Bearer medcp_…

Status

GET /health, no key

Agent ready

Connect your agent over MCP

Streamable HTTP and stateless: each request carries your key, with no session to keep.

One endpoint. The same key, starting with medcp_, works for MCP and REST.

MCP server

POST https://api.medcp.app/mcpAuthorization: Bearer medcp_…

Other clients. Cursor and VS Code take the same address and header. On claude.ai and in the Claude desktop app, add MedCP as a custom connector with the same address and the header as a request header: the key page shows how, for them and for Codex CLI. ChatGPT needs a sign-in (OAuth) that MedCP does not offer yet.

Claude Code

claude mcp add --transport http medcp https://api.medcp.app/mcp \ --header "Authorization: Bearer $MEDCP_API_KEY"

Claude API

import osimport anthropicclient = anthropic.Anthropic()response = client.beta.messages.create( model="claude-opus-5-5", max_tokens=4096, betas=["mcp-client-2025-11-20"], mcp_servers=[{ "type": "url", "url": "https://api.medcp.app/mcp", "name": "medcp", "authorization_token": os.environ["MEDCP_API_KEY"], }], tools=[{"type": "mcp_toolset", "mcp_server_name": "medcp"}], messages=[{ "role": "user", "content": "Does vitamin D supplementation prevent fractures in older adults? Cite PMIDs.", }],)print("".join(b.text for b in response.content if b.type == "text"))

OpenAI API

import osfrom openai import OpenAIclient = OpenAI()response = client.responses.create( model="gpt-6-astra", tools=[{ "type": "mcp", "server_label": "medcp", "server_url": "https://api.medcp.app/mcp", "authorization": os.environ["MEDCP_API_KEY"], "require_approval": "never", }], input="Does vitamin D supplementation prevent fractures in older adults? Cite PMIDs.",)print(response.output_text)

cURL

curl -sG https://api.medcp.app/v1/search \ -H "Authorization: Bearer $MEDCP_API_KEY" \ --data-urlencode "q=does vitamin D supplementation prevent fractures in older adults" \ -d mode=hybrid -d limit=3 -d abstracts=true

Claude Code: Add --scope user at the end to have it in every project.

Claude API: Python, with the anthropic package and ANTHROPIC_API_KEY set. Each tool call counts as one request.

OpenAI API: Python, with the openai package and OPENAI_API_KEY set. require_approval "never" lets the model call the tools without asking; the tools only read data.

cURL: The REST search: each hit with its abstract when it has one, then the attribution and the date of the data.

Eight tools

The tools your agent can call

Each tool call counts as one request; initialize, tools/list and ping do not count.

  • search_pubmed Finds articles with their abstracts: by meaning and keywords together (hybrid, the default), by keywords only (bm25) or by meaning only (vector). Takes PubMed search syntax and filters on MeSH headings, publication types, dates, languages, journals and their impact factor, trial registry numbers, open access and full text; sorts by relevance, date or citations; by default, reranks the first 100 results of a free-text search sorted by relevance, within the daily rerank quota.
  • get_articles Reads up to 20 full records by PMID, or the full text of one article a page at a time, whole or by section, with its licence.
  • get_figure Returns figures of a full text as images, such as forest plots and survival curves.
  • lookup_mesh Finds MeSH descriptors and publication types, with their identifiers, tree numbers and synonyms, to build precise filters.
  • lookup_drug Finds a medicine in the data of the FDA and the EMA by name or code: substances, US applications, labels, products, shortages and recalls; EU medicines, shortages and safety communications.
  • read_drug_label Reads a US label or an EU product information, section by section.
  • search_guidelines Searches clinical guidelines, health technology assessments and opinions on medicines and devices by passage, with the page and the PDF link. Mostly in French; ask in French or English.
  • get_guideline Reads one guideline publication: its documents and their text, a page at a time.

Every result gives the date of its data and the attribution of its source. Trials, citation counts and retraction flags come with the articles; retracted articles are left out unless asked for.

JSON over HTTPS

Or call the REST API

The same data and the same key. X-Quota-Limit and X-Quota-Remaining give your count for the day.

  • GET POST/v1/searchThe search of search_pubmed, with the same filters. Its defaults differ: keywords only (bm25), 20 results, no abstracts; add mode=hybrid and abstracts=true.
  • GET/v1/articles/{pmid}One record.
  • GET/v1/articles?pmids=…POST/v1/articles/batchUp to 200 records in one request.
  • GET/v1/articles/{pmid}/fulltextThe full text, a page at a time, with its licence.
  • GET/v1/articles/{pmid}/figures/{id}The image of one figure.
  • GET/v1/drugsA medicine’s FDA and EMA data, by name or code.
  • GET/v1/drugs/labelA US label or an EU product information, by section.
  • GET POST/v1/guidelines/searchThe search of search_guidelines, with the same parameters; 10 publications and 3 passages each by default.
  • GET/v1/guidelines/{id}One guideline publication, its documents and their text, a page at a time.
  • GET/healthWithout a key: whether the service is up, and the date of its data.

Errors are JSON too. A 429 says when to try again in Retry-After.

429 Too Many Requests

{ "error": { "status": 429, "code": "quota_exceeded", "message": "daily quota of 10000 requests used up for this key; it resets at 00:00 UTC" }, "meta": { … }}

From your server. Call the API from your server or scripts: browsers block calls from other sites' pages. Keep the key out of public code.

++**#**####%#%%#####%#######**++**+=+====-=--::-::.::.. ..:..  . . . .  ..   ... .     .    ... ........ ..:.  .:.....  ... .  .  ... .:.::.:::-::=-==++=+******##%@@@@@@@@@
**##*##%#%#%@%@##%####%%####*#++++=+++==---:-:-:::...    ... . .       .  .     .     .  .   .... .. .  .. :: :....:. ... . ...:.  . :.:..:::------=-==+++****%##%%%%%@@@@@@
#*#%%%%@%%%%%@%%%@@#%##%#*****+**====--=---:::::.:.... . .   .  .    .  .. .             ...   .  .  . ..   ...:.....:.:..:..::.....:::::---:---==-==++++***##%##%@%%%@@@@@@
#%%#%%@%%@%%@@%@%%%##%%%###*+++++==+==-:--.:::... ..      .            ..     .     .  . . .....  ......: ::...........:::...:::.::.:-:::--=--=---==++=+**#*#**%%##%%@@@@@@@
#@%%@@@@%@@@@%%@%%%%%#*####++*+=====--:::.:::. ...                          .   .  .      ..    ... . .....:..:..:..:::::-:.::-:.:::::-:--:-:=-===+=+=+*++***####%%%%@#%@%@@
%%%@@@@%%%%@%%%%@%%#%**#*#**+++-+=----::.:.:.:                               .  . .  ... .  ..:...::...:::..:.:..:::::---::-::.::-:::::--:--=-==-=======++*++***#*####%%#%%%
#@##@%%@%@%@#%%#%%####**+*=+++=-=-=:::.:.... .                      .  .              . . .....:.::.:.::..:::.-.::--:.:::-:.---:::--::------=-=---=--===++++=++*******##*##*
%%###%@%%%%%%#%##*#*++*+=+++=--==-::::::.  ..  .                     .    ..    . ..  . . .......:.::.::.-:.:.:----:-:::-:-:-::-:--:::-:--::----::-----=+===+=**=++****+##*#
%######%%#####**+#+++**+=+==-==:-:-::::::: ..    .                   .... .  .  .  . .  ..:.:.::.:::.::::::--::-:-:::-:-:-::--:::.:.-:::-::::----::-:--==-===+==++=+++*+***+
**###**#*********++++===-+==----:-.:.:..  . .                  ..  .     .. .. ...   .... .:.:....:..::::-::--:-::-:----:::-:-.:-::.:.:.::::::-..:.::::--:====-====+=+=+*==+
********++**++***+++===+===--:-::::.... .. .. .           ..    .. .   .. . .. .   .....:.....:.::.:--:.-:-:::::-::---:----:-.:--:::.....::..:.:::::::.::---------==++===+++
+**+**++=*+++++++==========-:----:-...:.   .            .       .       ... .  . . . .:....:.:.:.::.-::::---::--:-::--::::--..::.:..::::::. ...... .....::-:::-:-=-=-+-=++++
====+==+=+++==+=+=+-+=+----=-----:-.:::::.:..  .  .     .       . .  .....  .    ... ........:.:::::-::::-:::--::::---:::::.:.:.::.::..... ...     . .. :::.::.::::---=====+
-=----=-======--=-=-===----=-:--::.-::.::.:.... ....   .   ...  .    .  . ...:.... . .....:::::....::-::--::-:---::--:-:--::.::.:..: :......       .     . ...:.::-=-====+==
:-:-=:---=-----====--==-=--==-:-:---::::.::..:.. ........  .. . .    . . .: ...... .......:...::::::-:::-::-:-:--::--:-::.-::.:.:... .  ..         ..   ......::::--:==-===+
:.:.:-::-::--===--==-==-=------==--::--:-.:::.:... ......  .  . . .. ..  .....: .... .:. ::::...:.::.-::-.:::--::::-:::::-..::...:. . .    .       .      ......:.:--:-====*
.:...:::.:-::---=:====---==--=-----:--:-::-::::...:.:: :....  . : .... ... ...... .. .   .:.:::..::.:::-:::::-:-::::-:-:-.:::.::.. ....    .                . ...::::-====++
 . ... ::::.::-:---:=-:--=-=-=-------:-=:---:----:-:.:.:..:.:.. .... ...     ... ...  ..: .....::::::::::.::::::-:::--:-:::.:.::....   .                 .  . .:..:::-=--==+
.. .... ....:.::-::-::----==-==--======---:--:::---::-.::..:....  ...: . .  ...  ....   .:  . ........::.-:.:-::--::-.::-:-::.:::.::...  .  .               ..  ....::--=-=+
   ..  ... ::..:.::--:----=--==--===-=---==----:-::--:.::.::.....: ..:..:   ..  .   .. ... ..... ..:.::.::.::::::---:::::::---:::::.::..  .. .  .            .  .:..::----=-
      . .  ... ..:..:-:-:=---=-=====--====--=----=--::-::.::.:::.:.........  ..  ..    .. ..  ....:.::::.::..-::::-::---:--.:..:.:......: ..  . ..          .       ..::-:--
               .:..:::-:::---:=------==+-=-====-==:-::::-::::-.:.::.... .. .   . ..     .   .. ....... .:::.::-:--:-.:::::::----::..:.:.. . ... .. .     ..  ..  ...:::-::--
               .......:-:::-::-==-==-=-==-==-=----=----------.-:.:::...: ........ . . . .  . . ...... ...:.::.::.:-:-:--:-:::::-:::::.:.::..:: :. . .   .    .  ...  ::.:---
                . . .:::...-:::-=---=-=-==---=-====-=-==--:-::-:::::.:.::. . ... .  .    .. .  . ..  . .   ..:.:...::::.::-:-:::-::-::.-:-:.:...:....  . . ..   . ..  .....:
    .          . . ..  .....:..:::--:-=-=-==-======-===---:--:::.::::::...:......   .  ..   .. . ... ..   .::....::::::-::::-::::-:--::-:-::::::.:.:..::... :. ... ....:...-
:......             ... . .:..:::.:::--:--==-=--=----==-:-=:--::-:::.:......:: :  .  . .   ..   .     . ....... .::.::...:::::::-:::::-::---::-:-::-::-::.:::...:.::...::..:
:-.:. .. .         .   .  . .....:----::-----=-==---------=--:-:-:::--:.....:.:.:. .    .......   . . ...  ..... . .::..:.:..:::.---::----:-:-:-::--::-:--:::::::..:::::.:::
---::-::..     .           . .  ...:.:--::--:---:----=-=-=-:-::-:-:--::-..:...:.::....  .  .  . .. .... ......   ... ...:....:::-:::::--:--:=-=:-:--==-=:-:-----:::--.-:-::-
---=--:-:.:.... .. .       . ....: ..:.::.:::::--::--:=----:-=:-::::-::-:-::.:... .:. ...    . . .. .. ...  . .. ..  .. .::....:::.:::::-:::-:=--:---==--=----==-:--:--:-:-:
++=+==---::::...:..... .  . .   .....  ::.:..-::-:::-::-:-:-:::--:-:--:::-..:::....: . ..:.  .. ..  .     . .. .  ..  .. . .:...::..:::-.:----==--==-=======-===-=--===----=
+==+=-=--==--:-:::..:... ......  .  ........::.::::--:-::--:::-::-:::::::::::.:::..: ..   .  ....    . ... .. . ..  .  .   . .  . : ::::..:::::--=-=---=========+=+=+=====+=
++**+======-=-::::-:::...: :.   ..   .:.. :.:.::...::::-:-:--:.--:::::-::::.:..:.::....  .... ..:.:....  ...          .. . . .   ....: :...::-::--=:=-===-+===+=++=+++*++++=
+**+++++===+===-=:-::-:.:.:.......:    . ... ... .::..:.:.:-:-:-::-:.:::::-:.::....:..:::.: .::............ .. ..           .    .      ...:.:.:::-----=-+=+=====+++*****+**
+*==+==+++===-====-::-:---:-.:::::..::. ... ::. .:.:...:::.::.:......:-::::..::.:.:.:::.....::......:. ....:... .  . ..      .            ... :::-::-:---==-=++*+*+++*+*##**
++==+=++=++=++==+=--=--:::---:-:::::..:: ::... .:.. .:.........:...::::...:::.::.::..:.:...:...:::..:........ .:    .         .            . ..:..:.::::---=-==+==*+**+*###*
--=-=+==++===+=======-=-==:---::-:--:..::..::::.:...:.....::...:.:..:.:.:..::..:..:....:..:.:::.::.:...::.:...:..: ..       .                 .  ..::.::::-:----==++*+#*#*%#
---=-=--========+=+=-----=------=--:::::::.:......:....:...::: :.....  . ..:::. ...:.:.. ...:...::..:.::...:....:.. :.:    .   .            .      . .....-::=--==+=++*+**##
:::---=:-==-=---=-==========-=-=--=::::::---:::.:....:::..:.::. .:....:.::..... ..:.....:::::::..:.:.:..:.:.:..:.:....: . . ..       .              . .   .:.:::-=-=++++#*##
.:::::-:--=---===-==+==+--+-====-=---=-::::----:.::::.:.:......:::..: .. ............  ..:...::::.:..:.:.--:...::-..:::.. :. .. .  ..                    . .:.:----==+++**##
....:.::::-::::--=---=-=--=+=======-==-----:-:::-:-..::.:::..::. :. :.  .:.. : . ... .... ...:.:..:.::::::.::::::...:.::::::. .....  ..               .   ....:.--=--=++*+*#
   .....:.:.::--:=:===-==========-=====-==-==--:-:--:-:::.:.::........ .   . . ....  .  ... . ........::..:.::.:::.::-.::......:. ...                     . ...:.-----==++++
    .   .....-.::-----=-=====++=-====+=-==-=-=--=--:-:::-..:....:..... ............ .. ..   :. : ....:.:.:..:::.::::::.:..::.:.::::  . ...                .  ..::::::---==++
       . ....:.:::----:======++==+=+-=-+==-=--===---:-::-:-.-:::.:.: .: .. ..  . . . . ....  . ..:.:.:.::...::.:.-::.::::.:::.:.:.:... ......  .          .     ..::---==+=+
       . . .. ::..::----=-====+===+==========-=-=-==----:--:-...:......  ... ....   ... .    .  ..: .......:..:::::...:::..:..::.:........... ..      .   . ..::::.::::---=+
          .  ....::-:-:-=-=-+=-+===+===+==-=+-+=====:-=-:::-::::::::. ....         .. . . .. . .. . ..:  :....::.:..::.:::-:..:::..:::::..:  ...  ...  .  ... ..:.:::---==+=
            ....:::--:::=-=---+++===+++++===+=======-=-=:-:-:.:::.:.::..: ...  .  ..    .   . . ..  . .. ..:::.:.:.::::::-:::::.:.:::::.:.:.. .:.:  ............::.:----=-+=
          ......::::-::--=-======+=++=+==+=++=+=+==+-==-=--::-::::.:.::..... .       .  ....    .  ..... .....: .::...:..:.:::-:-.:-:-:::.::::::.::.:.. ....:..::-::----===+
 ..   .  ..  :.:..:::-:--====-+===++++====++=+=++======-----:--.-...:.:...   .. ..   . . .  ...       . . .........:..::.:::-:::::.---:-::::-:::::.:::::..::.:-:-------====+

Updated every day

The whole of MEDLINE, updated every day

New articles and corrections are applied as the National Library of Medicine publishes them. Each response dates its data in meta.data_as_of.

Articles With MeSH headings, and abstracts when they have one

33.8M

Open access Every one searchable by meaning

11M+

Full texts 4.7 million with their figures

8.1M

Clinical trials Linked to the articles that report them

600,000+

Article count of 31 October 2026. Also: more than 262,000 US labels and 2,300 EU medicines from the FDA and the EMA, more than 19,000 clinical guidelines that are not in PubMed, and citation counts for most articles.

Per key

Usage limits

Each REST request or MCP tool call counts once; a request refused for a limit does not count.

Requests per day

10,000

Requests per minute

60

Reranked searches per day

100

Pages of full text or figures per day

1,000

Over MCP, a page of full text holds up to 20,000 characters by default; over REST, pages are longer unless max_chars says otherwise. The counters reset at midnight UTC.

Building something that needs more? Write to [email protected].

[ Good to know ]

Build agents, applications and research on MedCP. Without our written agreement, do not download the data in bulk, mirror it, resell access or offer it as your own API. Never put personal data about identifiable people, such as patients, in queries. When you show results, keep their attribution and the licence of each full text. MedCP gives no medical advice. Details in the Terms of use.

Using an AI assistant rather than code? See the home page