Evidence MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FH_CORE_API_KEY | No | CORE API key for open-access full texts | |
| FH_NCBI_API_KEY | No | NCBI API key for faster PubMed access | |
| FH_CONTACT_EMAIL | No | Contact email sent to PubMed, Unpaywall and other open sources | |
| FH_WILEY_TDM_TOKEN | No | Wiley text-mining token for full texts | |
| FH_ELSEVIER_API_KEY | No | Elsevier text-mining key for full texts | |
| FH_OPENALEX_API_KEY | No | OpenAlex API key |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
evidence-mcp keeps a local library of scientific papers, FDA drug labels, clinical trial records and web pages, so you can check what a source actually says, and searches ClinicalTrials.gov. The server downloads each record, converts it to Markdown and stores it on disk. Every tool returns a small JSON answer; the document itself never enters your context — except fh_fetch_url, which is the standard fetch tool with a cache. One ID per call.
IDs — always "type:value"
pmid:30955454 — a paper by PubMed ID. Bare digits are taken as a PMID.
doi:10.… — a paper by DOI. A DOI PubMed indexes is stored under its PMID; any other gets its record from Crossref.
dailymed: — an FDA prescribing-information label, current version. The set ID comes from fh_dailymed_search_labels, or is the "setid=" value in the label's DailyMed URL.
nct:05173896 — a ClinicalTrials.gov trial record, current version. NCT05173896 is accepted too.
Tools
fh_info() — this server's package and version, then the whole library: entry counts by type and level, the retrieval sources, browsers, the decision model, the configuration, this server's cache hits and misses since it started (cache).
fh_library_add(id) — download and store one record; returns its status. A stored full text is returned without any download; an abstract-level record retries only the sources that failed transiently; a record older than 30 days gets its correction notices re-read.
fh_library_status(id) — the status of one record without downloading; level "missing" when it is not stored.
fh_library_read(id, section?, query?, max_chars?, max_hits?) — one small piece of a stored document: its outline, one section, or the passages matching a query.
fh_verify_claim(claim, id) — does this one source state this one finding? A decision model judges the stored text and returns a verdict.
fh_pubmed_fetch_articles(pmids) — title, first author, year, publication types, retracted and level for up to 200 PMIDs at once; faster and far smaller than asking PubMed, known papers from disk, the rest in one request and stored. For abstract or full text: fh_library_read.
fh_pubmed_search_articles(query, max_results?, sort?, years?) — search PubMed in its own syntax: the total and rows in columns order (PMID, title, first author, year, journal, publication types, PMCID, library level); faster and far smaller than asking PubMed. Cached a week.
fh_clinicaltrials_search_studies(query | intervention | condition, status?, sort?, max_results?) — search ClinicalTrials.gov: the total and rows in columns order (NCT ID, title, status, phase, enrollment, dates, primary outcome, conditions, interventions, has_results). Cached a week.
fh_dailymed_search_labels(drug_name, labeler?, max_results?) — find FDA drug labels by generic or brand name: the total and rows in columns order (set ID, title, labeler, published, version, level), newest first; labeler narrows to one company. Use it rather than DailyMed's search page, which shows no set IDs as Markdown. Cached a week.
fh_clinicaltrials_get_study_record(nct) — one trial as a review needs it (status, design, enrollment, dates, outcomes, eligibility, result publications, summary), from the stored record; added first when missing.
fh_clinicaltrials_get_study_results(nct, max_chars?) — a trial's posted results as Markdown, capped; the outcome titles listed for fh_library_read.
fh_fetch_url(url, max_length?, start_index?, raw?, title_only?) — a web page as Markdown, same call and same answer as the standard fetch tool ("Contents of :" and the page, cut at max_length with a note on how to continue). Prefer it for every URL: a cached page answers from disk, a walled or script-rendered page runs through the browser and unlocker stages in one call. PDFs as Markdown; XML, JSON and other text as is. title_only returns the title line alone — enough to verify a link, at a few tokens.
Hints
fh_library_read and fh_verify_claim store a missing record themselves; the fh_library_read answer then carries added: true. No fh_library_add necessary first.
citable false — the paper is retracted (a retraction notice, or PubMed's publication type), or holds nothing to read: no abstract and no full text. comment says which; corrections lists the notices as {type, pmid, source}.
level — what is stored: "full_text", "abstract" (no full text could be found; the log names each source tried and why it failed) or "title" (not even an abstract; citable false).
error "pmid not found", "doi not found", "ctgov: not a study record", "dailymed: not an SPL document" — no service knows the ID. Remembered for a day (FH_RETRY_AFTER_DAYS): the same call answers from disk with the date it was checked; after that the service is asked again. "invalid id" — the ID itself is malformed; the same call gives the same answer. A URL is no library ID: it is refused with what to send instead — the record's ID for a PubMed, doi.org, ClinicalTrials.gov or DailyMed URL, else fh_fetch_url for the web page.
Calls may run in parallel: fh_library_add, fh_library_read and fh_verify_claim. Two calls on the same missing record share one add.
fh_fetch_url takes any URL that is not a paper, label or trial record; those have IDs, and fh_library_add, fh_library_read and fh_verify_claim work on the stored document. A second pass over the same review reads every page from disk; a failed fetch is remembered for a day.
To verify that a web page exists and what it is: fh_fetch_url(url, title_only: true). The answer is "Contents of :" and the page's title line — a few tokens — or the fetch error; the page itself is stored in full, so a later fh_fetch_url of the same URL reads from disk.
Verifying a claim
fh_verify_claim judges one claim against one stored document. A finding backed by three papers takes three calls with the same claim.
It expects the finding as a complete sentence: who or what, the intervention, the outcome, the number. Citation markers and commentary around the finding are not part of what a document states.
It can only confirm what this one document states. A finding about two interventions from two papers is two claims, each against its own paper. A summary of several trials ("trials used 60–200 mg") is stated by none of them; the dose this one trial used is.
It returns error for a claim under four words, a sentence fragment, or a claim still containing citations. A short finding with its setting (in vitro, cell line, dose) is accepted; filler words do not help.
verdict "pass" — the document states the claim. score is the model's probability.
verdict "fail" — the stored full text does not state the claim as worded; fh_library_read with a query shows what the document does say. Or, with basis "title", nothing is stored to read: reason says so, score is null.
verdict "unverifiable" — only the abstract is stored and it does not state the claim; the full text may (reason says so). A retry gives the same answer until a full text is stored.
glyphs_unresolved above 0 — the PDF font lost symbols (minus, ±, ≤); a fail on a number may be the font. fh_library_read shows the passage.
superseded true — a published correction replaced the figure the claim uses; the status's corrections holds the notice.
Verdicts are kept for 30 days: the same claim against the same stored text answers from disk, no model call. A paper that gains its full text is judged afresh.
Reading a document
fh_library_read with only the ID returns the outline: every heading with its word count, and whether the full text or only the abstract is stored.
section — a heading from the outline, matched case-insensitively as a substring; the text is capped at max_chars (default 6000). A heading that occurs several times is listed as "Participants [3/12]" and is addressed that way.
query — returns the passages holding every term: up to max_hits (default 5), each at most 1000 characters around the matches, with its section, best first. It works best with two or three distinctive terms the document itself would use (a measure and a unit, an outcome and a group, a compound name), not a claim sentence. Case, accents, hyphens, plurals and -ed/-ing forms are matched.
partial true — no passage holds every term; missing_terms are the words the document never uses. The same query without them finds the passage if there is one.
Numbers are often in tables; a matching table row comes with its header row.
section and query together search inside that section only.
section "Abstract" on a full text without one returns the stored abstract. section "Declarations" returns funding, conflicts of interest, acknowledgements and ethics statements, assembled when the document has no section of that name, else the statements of the PubMed or Crossref record.
Status fields: pmid, pmcid, setid, nctid, publications, year, publication_types, retracted, corrections, citable, comment, has_abstract, level, version, retrieved_by, glyphs_unresolved, error. Funding and conflicts of interest: fh_library_read section "Declarations". Answers carry only what the call did not send: no echo of the ID, claim or query; a field that is null or an empty list is left out. fh_verify_claim always has verdict, score (null: no judgement) and basis.
Where records come from: PubMed for the record and abstract; the full text from PubMed Central, Europe PMC, publishers' text-mining links, Unpaywall, OpenAlex, CORE, and a proxy URL template from the configuration. Every action is appended as one line to /logs/evidence.log.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| fh_library_addA | Download and store one record — a paper (pmid:, doi:), a drug label (dailymed:) or a trial record (nct:<8 digits>) — and return its status JSON. A paper gets its record, abstract and correction notices from PubMed (Crossref for a DOI PubMed does not index), then the full text from the configured sources; a label or trial record is stored as a full text. A stored full text is returned without any download; an abstract-level record retries only sources that failed transiently; a record older than 30 days gets its notices re-read. |
| fh_library_statusA | Read-only status of the library entry for one ID — a paper, a drug label or a trial record: the same status JSON as fh_library_add, or level "missing" when there is no entry. Never fetches. |
| fh_library_readA | One piece of a stored document's Markdown, never the whole. No section/query: the outline (headings with word counts; full text or abstract only). section: that heading's own text (case-insensitive substring; a repeated heading as "Participants [3/12]"), capped at max_chars, its subsections listed. query: passages holding every term, each a window of at most 1000 chars with its section, best first, at most max_hits (more: how many further passages match); partial: true with missing_terms when no passage holds them all. section and query together: inside that section. A missing paper is added first (added: true). |
| fh_verify_claimA | Does one source state one finding of a review? claim: the finding as a complete statement (subject, intervention, outcome, number), without citations or the review's framing, and only what this source reports. id: one source the review cites for it — paper, drug label (dailymed:…) or trial record (nct:…); added first when missing. The server reads the stored text and asks a decision model; nothing enters your context. verdict: pass (score is the probability) | fail (the full text does not state it; or only the title is stored — reason says so) | unverifiable (only the abstract is stored and does not state it — reason says so) | error (claim refused: under four words, a fragment, carrying citations; add failed; no model; model failure). basis: full_text | abstract | title. glyphs_unresolved: symbols the PDF font lost; above 0 a failed number may be the font. superseded: true when a stored correction replaced the claim's figure. |
| fh_infoB | The server and the whole library as JSON: this server's package name and version (which build is loaded), its log file; evidence directory (evidence_dir) and host; entry count and size on disk; per type (pmid, doi, dailymed, nct) the entries by level (full_text, abstract, title) and retractions; counts of retracted and not-citable entries and of errata, expressions of concern and updates; the retrieval sources in run order and which are off (tiers); the multi-stage download (download): the Playwright servers with the version they must run, the Chrome stages, whether an unlocker is configured; the configuration and where each value came from — environment, .env or default, never the value (config); the decision model behind fh_verify_claim and whether it answers right now (verify); the unlockers and whether each answers right now (unlockers); our own stage hosts — fetch proxy, Playwright servers, Chrome — and whether each is reachable right now (stages); this server's cache hits and misses for fh_verify_claim and fh_fetch_url since it started (cache). |
| fh_fetch_urlA | Fetch a web page as Markdown: the standard fetch tool, cached and hardened. Use it for any URL instead of a plain fetch or a browser. A page fetched in the last 30 days is answered from disk in milliseconds; a page a plain fetch cannot get (403, rate limit, bot wall, script-rendered) is fetched through the configured browsers and unlockers in this one call. PDFs come back as Markdown; XML, JSON and other text as is. To verify a link, title_only returns just its title line. A PubMed, ClinicalTrials.gov, DailyMed or doi.org URL is answered from the library's record of it. |
| fh_pubmed_fetch_articlesA | Title, first author, year, publication types, retracted and library level for up to 200 PubMed IDs in one call. Faster and far smaller than asking PubMed: known papers come from disk, the rest in one request, stored for every later call; rows as arrays in columns order, ~120 characters a paper. Level "not found": PubMed has no such record. For abstract or full text: fh_library_read. |
| fh_pubmed_search_articlesA | Search PubMed with its own query syntax (AND / OR, field tags like [pt], [ti], [mesh]); sort relevance | newest; years "2020-2026". Faster and far smaller than asking PubMed: the total and up to 100 rows as arrays in columns order — PMID, title, first author, year, journal, publication types, PMCID when free full text exists, and the library level when the paper is already stored. The same search is answered from disk for 7 days. For a batch of PMIDs: fh_pubmed_fetch_articles; for abstract or full text: fh_library_read. |
| fh_clinicaltrials_search_studiesA | Search ClinicalTrials.gov by free text, intervention or condition; status ongoing | completed | all; sort relevance | newest | largest | completion. Returns the total and up to 100 rows as arrays in columns order: NCT ID, title, status, phase, enrollment ("~100" estimated), start, primary completion, primary outcome, conditions, interventions, has_results. Link: https://clinicaltrials.gov/study/. Cached 7 days. One trial in detail: fh_clinicaltrials_get_study_record. |
| fh_dailymed_search_labelsA | Find FDA drug labels on DailyMed by drug name, generic or brand: the total and up to 100 rows as arrays in columns order — set ID, title (drug and form), labeler (the company), published date, version, and the library level when the label is already stored. Newest first. A generic name lists every maker's label; labeler narrows to one company ("Boehringer" for Micardis's maker), a brand name to its own labels. Pass the set ID as "dailymed:" to fh_library_read or fh_library_add. Use this, not DailyMed's search page: fetched as Markdown the page shows no set IDs, raw it is some 150,000 characters. The same search is answered from disk for 7 days. |
| fh_clinicaltrials_get_study_recordA | One ClinicalTrials.gov trial as a review needs it: titles, status and why stopped, phase, design, enrollment, dates, sponsor, conditions, interventions, primary outcomes, eligibility, sites, result publications as pmid: IDs, has_results, brief summary. From the stored record; a missing trial is added first. The whole record: fh_library_read("nct:…"). |
| fh_clinicaltrials_get_study_resultsA | The posted results of one ClinicalTrials.gov trial — participant flow, baseline, every outcome measure as a table, adverse events — as Markdown from the stored record, capped at max_chars, outcome titles listed; fh_library_read("nct:…", section: ) returns one measure whole. has_results false when the registry holds none. A missing trial is added first. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 12 tools
Most tools have clearly distinct roles: library add/status/read, source-specific search/fetch, trial record/results, claim verification, and URL fetching are separable. The main overlap is fh_fetch_url versus source-specific fetches and fh_library_read, but the descriptions explicitly route PubMed, ClinicalTrials.gov, DailyMed and doi.org URLs through the library, which mitigates confusion.
The set mostly follows an fh_<domain>_<action>_<noun> pattern, with clear grouping by library, PubMed, ClinicalTrials.gov and DailyMed. Minor deviations are fh_info, fh_library_status, and fh_library_read, which drop the noun or use a status noun rather than a verb, but overall the naming remains predictable.
Twelve tools is a well-scoped size for a multi-source evidence retrieval server covering library management, PubMed, ClinicalTrials.gov, DailyMed, URL fetching, and claim verification. Each tool corresponds to a distinct workflow step rather than duplicating functionality.
The surface covers the core lifecycle: searching sources, adding records to the library, checking status, reading stored content, retrieving trial records/results, verifying claims, and fetching arbitrary URLs. Minor gaps include no explicit delete/prune operation for library entries and no dedicated tool to list all stored records, though fh_info provides aggregate counts.