Dev.to AI ๐Ÿค– Ai ๐Ÿ‘ 0 ๐Ÿ“– 3 min read

Give Claude access to PubMed, arXiv and ClinicalTrials.gov in 2 minutes

The problem: AI assistants invent references Ask a chatbot for "the key phase 3 trials on semaglutide since 2023, with PMIDs" and you will often get confident answers with citations that do not exist, or exist but say

The problem: AI assistants invent references

Ask a chatbot for "the key phase 3 trials on semaglutide since 2023, with PMIDs" and you will often get confident answers with citations that do not exist, or exist but say something else. Language models remember the shape of a reference, not the reference itself.

The fix is not a better prompt. It is giving the model a tool that searches the real databases and returns real records, so every PMID, DOI and NCT number in its answer comes from PubMed, arXiv or ClinicalTrials.gov.

That is what the Model Context Protocol (MCP) is for. You plug a server into Claude Desktop, Cursor or any MCP client, and the model can call it like a function.

What the Research MCP server does

It exposes three tools:

Tool Source Returns
search_pubmed NCBI PubMed PMID, title, full abstract (with section labels), authors, journal, date, DOI, MeSH terms
search_arxiv arXiv arXiv ID, title, summary, authors, categories, DOI, PDF link
search_clinical_trials ClinicalTrials.gov v2 NCT ID, title, status, phase, conditions, interventions, sponsor, dates

No NCBI API key, no scraping to maintain. It runs on Apify and you pay per result returned (about $0.002 per paper or trial, so a typical question costs one or two cents).

Setup (2 minutes)

  1. Create a free Apify account and copy your API token from Settings > API & Integrations.
  2. In Claude Desktop, add a custom connector (or edit claude_desktop_config.json):
{
  "mcpServers": {
    "research": {
      "url": "https://capable-coach--research-papers-mcp-server.apify.actor/mcp",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
  1. Restart Claude. You should see the three tools in the tools menu.

Cursor works the same way: Settings > MCP > Add new server, same URL and header.

Prefer the Apify gateway? Use https://mcp.apify.com?actors=capable_coach/research-papers-mcp-server instead.

A real example

Prompt:

Find phase 3 clinical trials of semaglutide registered since 2023, then the PubMed papers reporting their results. Give me a table with NCT ID, PMID, primary outcome and one-line finding. Only use records returned by your tools.

What happens:

  • Claude calls search_clinical_trials with intervention: semaglutide, phase: 3.
  • It then calls search_pubmed with the trial names and reads the abstracts.
  • The answer is a table where every ID links back to a real record. When there is no published result yet, Claude says so instead of inventing one.

A second useful pattern, for literature reviews:

Search arXiv and PubMed for papers on retrieval-augmented generation in clinical decision support from the last 18 months. Group them by approach and list the 3 strongest per group with abstract quotes.

What it costs

  • $0.002 per paper (PubMed or arXiv) and $0.002 per clinical trial returned.
  • A search that returns 10 papers costs $0.02.
  • No subscription. Apify's free plan includes monthly credit, enough for hundreds of searches.

You can cap results per call with maxResults so an agent never pulls thousands of records by accident.

Tips

  • Ask Claude to only cite records returned by the tools. It follows that instruction well once the tools exist.
  • Use MeSH terms in PubMed queries ("Diabetes Mellitus, Type 2"[MeSH]) for precise results.
  • For recent work, combine arXiv (preprints) with PubMed (peer reviewed) and ask Claude to flag which is which.

Links

Questions, or a source you want added (Europe PMC, bioRxiv, Semantic Scholar)? Leave a comment.

Disclosure: I built this server. This post was drafted with help from Claude.

๐Ÿ“ฐ Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.