DEV Community

quuin james
quuin james

Posted on Fully Autonomous

How to Ground Claude or Codex in Inspectable Biomedical Evidence with MCP

MCP makes it easy to give an AI assistant another tool. The harder problem in research is knowing what the tool actually established. In this walkthrough, I’ll connect LitSource to an MCP-compatible client, find biomedical papers for one claim, verify a short reference list, and keep the distinction between “a paper exists” and “the paper supports this sentence.”

Disclosure: I work on LitSource. This article was drafted by an AI agent using live tool calls and source inspection. The tool results below came from live LitSource MCP calls in a Codex conversation on October 1, 2026. The Claude Code instructions are documented setup guidance; I did not test a fresh Claude sign-in in this session. This is a research-tool demonstration, not treatment advice.

A real DOI can still be the wrong evidence

Here is a deliberately overstrong claim to test:

Semaglutide produces permanent weight loss after treatment is discontinued in adults with overweight or obesity.

The exercise is to inspect evidence and revise the sentence. A DOI resolver alone cannot do that. It can identify a paper without establishing its relevance, the direction of its findings, or the limits of its follow-up.

Keep three decisions separate:

Decision What you need to inspect
Does the record exist? DOI or PMID and bibliographic metadata
Does it address the sentence? Population, treatment, comparator, outcome and timing
Is the wording justified? Source passage, study design and uncertainty

Connect the client, then make a free call

The LitSource MCP landing page links to the client-specific guides. The endpoint is https://litsource.net/mcp.

Sign in to LitSource and create a separate Agent Token for this client. Grant usage:read for the connection check, evidence:search for retrieval, references:verify for reference checks, and optionally runs:read to reopen saved results. Grant only what you plan to use. Keep the token out of chats, screenshots and version control.

For Codex, put this configuration in your local ~/.codex/config.toml and supply the token through the named environment variable before starting the client:

[mcp_servers.litsource]
url = "https://litsource.net/mcp"
bearer_token_env_var = "LITSOURCE_AGENT_TOKEN"
Enter fullscreen mode Exit fullscreen mode

Run codex mcp list to inspect the configuration. The bearer-token setting is documented in the official Codex MCP guide.

For Claude Code, follow the LitSource connection guide and Claude Code's remote HTTP instructions. Use a private local configuration for authentication; do not commit a project configuration containing an Authorization token. Confirm the server with /mcp or claude mcp get litsource. These instructions concern Claude Code; they do not establish a one-click Claude web marketplace listing.

Now ask:

Call litsource_get_usage and tell me whether authentication succeeded.
Do not run a paid search yet.
Enter fullscreen mode Exit fullscreen mode

That call succeeded in this session and charged zero LitSource credits. It checks the connection and usage permission; it does not prove every other tool or scope will work. Your AI-client subscription and LitSource credits are separate.

Search the sentence, keeping disagreement visible

The live request used:

{
  "query": "Semaglutide produces permanent weight loss after treatment is discontinued in adults with overweight or obesity.",
  "max_hits": 3,
  "rerank": true,
  "request_id": "outreach-dev-20261001-semastop-01"
}
Enter fullscreen mode Exit fullscreen mode

This returned three hits and charged one credit. For your own new operation, choose a new request_id; reuse a key only when retrying the identical request.

Ask the assistant to organize, rather than silently strengthen, the result:

Show each paper's DOI/PMID, source passage and study context.
Separate support, partial support, conflict and uncertainty.
Preserve disagreements between tool fields. Do not decide from a score alone.
Enter fullscreen mode Exit fullscreen mode

The first two returned hits had stance: against. A third returned a methods/search passage and was marked uncertain; I did not use that passage as an outcome finding.

There was also a useful imperfection: one hit paired supportType: direct_support with stance: against. Another paired related_background with against. I retained those fields and checked the source instead of letting the assistant turn the labels into a single green checkmark. Automated classifications are review aids.

Open the source before editing the claim

The STEP 1 extension record has DOI 10.1111/dom.14725 and PMID 35441470. I opened the full original article on PMC. Its exploratory extension followed 327 participants; one year after semaglutide and lifestyle intervention stopped, much of the prior loss had returned. Stopping both interventions and the selected extension cohort constrain interpretation.

A defensible correction for this example is:

In the STEP 1 exploratory extension, substantial weight regain occurred during the year after semaglutide and lifestyle intervention were discontinued.

That sentence has a study, an observation window and an explicit treatment context. It avoids claiming permanence or generalizing to every patient. The review decision in this demonstration was to replace the original sentence after inspecting the article. A researcher still needs to review that interpretation before using it.

Check a short reference list separately

I then called litsource_verify_references with two versions of the same STEP 1 extension citation. The second deliberately changed the supplied publication year from 2022 to 2019 while retaining the title and DOI. This is a controlled demonstration, not a reported customer mistake.

Submitted version Observed result
Correct citation, 2022, DOI 10.1111/dom.14725 decision: verified; no mismatch fields
Same title and DOI, deliberately changed to 2019 decision: unverified; mismatchFields: ["year"]; matched record year 2022

The two-reference call charged three credits. The returned reason identified a publication-year conflict. I would correct the metadata and recheck it against the journal record. I would not call this a fabricated paper: the candidate record exists.

Preserve the audit trail and protect the input

Save the exact sentence, tool request, source identifiers, passages, output fields and your keep/revise/remove decision. A saved-run ID helps reopen an owned result when your token has permission; it is not a public article URL or independent review.

LitSource stores search inputs, submitted references, results and usage records for saved runs. Your AI client receives tool results and has its own data policies. Use public examples for demos, and follow your institution's requirements before sending unpublished manuscript text or identifiable patient information. Revoke a client token when you stop using it. See the LitSource privacy policy.

The final habit is small: check the original source each time the sentence matters. The three-minute citation checklist gives you a repeatable starting point. A matching citation and a supported claim are separate decisions, and MCP can help preserve the material you need to make both.

Top comments (0)