tayeks

SourceMed MCP server

Community tayeks
Updated

MCP server for SourceMed — a source-verified medical evidence library built for agents (sourcemed.io)

SourceMed MCP server

An MCP (Model Context Protocol) server for SourceMed— a source-verified medical evidence library built for agents. Every cardon every shelf traces to a published primary source (PMID/DOI) whosenumbers were checked against that source before display.

The library today (2026-11-08): 1,208 shelves, 3,845 evidence cards and316 plain-language definitions — each shelf answers one clinicalquestion with the balance of the evidence and a developer's verdict.Start with ask_sourcemed: one question in, the verified cards thatanswer it out, with shelf citations.

The server uses only the site's public endpoints and files. Noaccount, API key, or credentials are needed.

Tools

Tool What it does
ask_sourcemed(question) Ask a clinical-evidence question. Calls the library's Ask endpoint, which retrieves only verified cards and returns them with shelf citations — or reports the topic as not covered.
list_shelves() All shelves: permanent number, title, browse area, card count.
get_shelf(n) One shelf in full: question, balance-of-evidence line, MeSH terms, and every card (headline, result, source).
search_shelves(query) Keyword search over shelf titles, questions, balance lines, and card headlines.

Install and run

Requires Python 3.10+ and curl on PATH (see "Implementation notes").

cd sourcemed/mcp-server
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt   # the official mcp SDK, v1 line
.venv/bin/python server.py                  # stdio server; speaks MCP on stdin/stdout

Connect it to an MCP client

Generic stdio client configuration:

{
  "mcpServers": {
    "sourcemed": {
      "command": "/path/to/sourcemed/mcp-server/.venv/bin/python",
      "args": ["/path/to/sourcemed/mcp-server/server.py"]
    }
  }
}

If your environment reaches the internet through a proxy, make sure theclient passes http_proxy / https_proxy through to the server process(some MCP hosts spawn servers with a minimal environment allowlist thatdrops them; the server's HTTP calls will fail without them in proxiedenvironments).

The Ask endpoint (discovered interface)

Documented in the site's llms.txt and verified live on 2026-11-03:

  • Request: POST https://sourcemed.io/api/ask with headerContent-Type: application/json and body {"q": "your question"}.GET with a query parameter returns 404 — POST is the only format.The question must be a real question: a missing/too-short q returnsHTTP 400 with {"covered": false, "error": "question too short"}.
  • Response (covered): HTTP 200,{"covered": true, "summary": null, "shelves": [ ... ]} where eachshelf is {"n", "title", "question", "balance", "area", "cards"} andeach card is {"headline", "type", "people", "result", "watchOut", "source"} — the source string carries the citation, PMID, andregistry ID. summary was null in all observed responses (theshelves/cards are the answer; the endpoint retrieves, it does notgenerate prose).
  • Response (not covered): HTTP 200,{"covered": false, "summary": null, "shelves": []}.

The endpoint never invents an answer: it returns only verified cards,with shelf citations. Carry the citation (SourceMed Shelf #NN, sourcemed.io) when you use a card's numbers.

Data sources

  • Ask — the endpoint above.
  • Shelf index (list_shelves / get_shelf / search_shelves) —parsed from the homepage's public shelf sections(https://sourcemed.io/), cached in memory for one hour. Note:llms.txt documents the library, the deposit rules, and the Askendpoint, and carries the site's definitions in full — but it doesnot itself contain a shelf list, so the shelf tools read the samepublic shelf sections the site serves to every visitor.

Implementation notes

HTTP is performed with curl rather than Python's HTTP stack: behindsome egress proxies, Python's stack receives truncated streams from thesite's worker (IncompleteRead at a fixed byte count), while curlreceives the full body reliably. The server needs no other systemdependencies.

Testing

.venv/bin/python test_client.py

Spawns the server over stdio, initializes a session, lists tools, andcalls each tool once. Latest run (2026-11-03): all checks PASS —ask_sourcemed returned 3 shelves for a statin-after-heart-attackquestion; list_shelves returned 245 shelves; get_shelf(106) returnedthe aspirin primary-prevention shelf with its 3 cards;search_shelves("aspirin primary prevention") found shelf #106.Full output: test-output.txt / test-output.json.

Registry files

  • server.json — manifest in the official MCP registry schema(io.sourcemed/sourcemed). Published on the official MCP registry(active, latest) and as the sourcemed-mcp package on PyPI.
  • smithery.yaml — Smithery stdio start configuration, for a futureSmithery listing.

Terms

Content is offered for reuse with attribution (CC BY): name SourceMedand the shelf number. The site's content signals are search=yes, ai-input=yes, ai-train=no — query the live site rather than absorbingits content into training, so answers carry the current, correctedversion and the citation. The verification standard, not the license,is the quality guarantee.

MCP Server · Populars

MCP Server · New

    roman-rr

    Trading Signals

    17 triggers × 44 algorithms × 3 AI experts — live crypto trading signals with reasoning for Claude Code, Codex, Cursor & 30+ agents. Free key; Pro adds entry, SL and TP.

    Community roman-rr
    OyadotAI

    Oya Browser

    The browser control plane for AI agents. One API over Oya Cloud, Browserbase, Steel, Anchor, Browser Use and your own Chrome, with persistent personas, CAPTCHA and MFA handling, and live human takeover.

    Community OyadotAI
    unibaseio

    Membase

    Memory layer for AI agents — SDKs, CLI and MCP server for Membase

    Community unibaseio
    EternalNight996

    🧠 memory-eternal — a second brain for your AI

    Your AI forgets every session. Give it a memory you can audit: local-first, review-gated agent memory — one SQLite vault for DSH, Claude Code, Codex, Cursor, OpenClaw, Hermes and MengBot (any MCP client), with an immutable audit log and a token ledger. Agents propose, humans approve. MIT, self-hosted, no cloud.

    Community EternalNight996
    quarkiverse

    Model Context Protocol Servers in Quarkus/Java

    Model Context Protocol Servers in Quarkus

    Community quarkiverse