med-lit-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NCBI_EMAIL | Yes | Required for PubMed/PMC search and for fetching. Also sent to Unpaywall, which requires a contact email. Use a real address. | |
| S2_API_KEY | No | Alternative name for SEMANTIC_SCHOLAR_API_KEY. Enables Semantic Scholar by default. Without a key it shares a public rate limit that usually answers HTTP 429, so it is skipped unless requested. | |
| NCBI_API_KEY | No | Optional; raises NCBI rate limits. | |
| MED_LIT_STAGES | No | Optional, for advanced users. Exposes only the tools up to a stage: `search`, `screening`, `fetch` or `wiki` (default: all). For example, `fetch` hides the 11 wiki tools. Clients that load tools on demand rarely need this; it helps with clients that load every tool up front. Project, status and guide tools are always available. | |
| OPENALEX_API_KEY | No | Optional OpenAlex key. | |
| MED_LIT_STATE_DIR | No | Where the list of known projects is kept. Default: `$XDG_DATA_HOME/med-lit-mcp` or `~/.local/share/med-lit-mcp`. | |
| MED_LIT_PROJECTS_DIR | No | Where new projects are created when no path is given. Default: `~/med-lit`. | |
| SEMANTIC_SCHOLAR_API_KEY | No | Enables Semantic Scholar by default. Without a key it shares a public rate limit that usually answers HTTP 429, so it is skipped unless requested. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
med-lit runs an auditable medical literature review: project -> search -> screening -> (fetch -> wiki)
-> report. For a researcher's question, research_next leads the whole review: call it, do what its
do says, and call it again. When a step has ask_researcher=true, show the researcher what it lists,
ask, and stop until they answer. Two modes: basic (titles and abstracts, a report from the abstracts)
full (also full text and the evidence wiki) and deep (full mode in rounds that search again until
the evidence is enough). Only verbatim quotes count as evidence; uncertain
screening decisions are the researcher's. State lives on disk: check research_next or get_run_status
rather than chat history.
First-time setup: call med_lit_settings(action='status'). If unconfigured, open its private form with med_lit_settings(action='open'); ask the researcher to complete it and wait. Never ask for email or API keys in chat, read credential files, capture the form, or return private values to the model. The form sends settings directly to med-lit. Call status again when the researcher has finished.
Tools by stage (if your client loads tools on demand, look them up by these names):
research: research_next (the next step of a review); next_report + record_report (the report that answers the question, written after screening); record_evaluation (deep mode: is a round's evidence enough)
projects: list_projects, create_project, open_project, project_settings (show the review's settings when presenting the search question; change them only as the researcher asks)
setup: med_lit_settings (private form or boolean configuration status), review_defaults (defaults for new reviews or bots; no credentials)
search: validate_question -> start_search(question_id); resume_search; add_skipped_articles (only when the researcher asks for articles skipped for having no DOI or PMID)
screening: set_screening_criteria, next_triage_batch + record_triage_scores (rank titles first), next_screening_batch, record_screening_decisions (20 articles per session), review_article
fetch: fetch_articles
wiki: wiki_tasks (start here and follow it), export_wiki
status: get_run_status, list_runs, list_articles
bot (scheduled jobs of bot projects only; follow the job's prompt): bot_start, bot_next, bot_finish.
bot management (normal researcher chats only): bot_sources lists tried searches; create_bot copies one into a scheduled bot; manage_bot shows or updates its schedule, settings, question and criteria, pauses, resumes or archives it. Preview changes with confirmed=false, show the proposal and wait for approval before confirmed=true. Scheduled bots cannot manage themselves or other bots. In normal chat, decide a bot's uncertain articles with review_article.
rules: guide(topic) with workflow, research, question, screening, fetch, wiki, report, evaluation, extraction, duplicates, synthesis or ontology. Read guide("workflow") first, and the stage's guide before starting it.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| med_lit_settingsA | Check configuration (booleans only), or open a private local form for email, reviews folder and API keys. Never collect those values in chat, read/capture the form or credential files, or pass private input as tool arguments. After the researcher completes the form, call status. On a headless machine the tool gives a command for the researcher's own terminal. |
| review_defaultsA | Show or change defaults for new reviews or bots at the researcher's request. Existing projects keep their settings; change those with project_settings or manage_bot. |
| bot_sourcesA | Find approved reviews for creating scheduled literature bots with create_bot. Returns their questions, criteria and run IDs; no shell or file access is needed. Show which review to copy. |
| create_botA | Create a scheduled literature review bot: a recurring daily or weekly Hermes routine. First use bot_sources to choose a tried review, then preview with confirmed=false. After approval, confirmed=true creates its project and routine in the restricted medlitbot profile. No shell needed. Never starts a review run now. Report the local timezone and wait for the researcher's approval of the preview. |
| manage_botA | Configure, reschedule, pause, resume or archive a scheduled literature review bot in chat. Preview first. After researcher approval, confirmed=true updates its Hermes schedule and saved settings, or pauses/resumes/archives it. Criteria changes re-screen collected articles; question changes backfill the collection window. Archive keeps the review and history. Scheduled bot runs cannot call this tool. |
| create_projectB | Create a project: one folder per review, holding its wiki and (hidden) its data. |
| project_settingsA | Show or change a project's settings (med-lit.settings.json): research mode (basic, full or deep) and max_screened, search years, records per source, preprints, fetch limit and mode, pages per article, and more. Change them only as the researcher asks. |
| list_projectsA | List known reviews with folders. available=false means a folder moved or is missing. For a scheduled literature bot, use bot_sources then create_bot; edit one with manage_bot. These tools manage Hermes routines directly; shell access is unnecessary. |
| open_projectA | Register an existing project folder, for example after it was moved or copied from elsewhere. |
| research_nextC | Start or continue a review: the next step from the question to the report, with |
| guideC | Rules and how-to for a stage: workflow, question, screening, fetch, wiki, extraction, duplicates, synthesis or ontology. |
| validate_questionA | Check a drafted PICO/PCC search question against the project's settings and return a question_id for start_search. Show the result, including settings, to the researcher and wait for approval. Rules: guide("question"). |
| start_searchA | Search the literature databases with an approved question; creates a run in the project. If search_status is 'running', call resume_search(run_id). |
| resume_searchA | Check a running search, retry a failed one, or retry just the failed sources of a completed run. |
| add_skipped_articlesA | Add articles that were skipped for having no DOI, PMID or PMCID. Use only when the researcher asks for them by name; they then need screening. |
| set_screening_criteriaB | Save the researcher's inclusion and exclusion criteria (and the reason for each) for screening. Rules: guide("screening"). |
| next_triage_batchA | Get untriaged titles with the question and criteria, to score 0-3 before screening. |
| record_triage_scoresA | Record the 0-3 title scores that decide which articles each session screens. |
| next_screening_batchC | Get the next titles/abstracts of this session (20 best-triaged articles) with the criteria. |
| record_screening_decisionsB | Record screening decisions; include/exclude need a verbatim quote as evidence. |
| review_articleB | Record the researcher's own include/exclude decision and reason for one article. |
| fetch_articlesB | Fetch full text of included articles (PMC, Unpaywall open access, else abstract); repeat while remaining > 0. Rules: guide("fetch"). |
| next_reportC | Get what the report is written from: the question, the search and screening facts, and the included articles' evidence, in portions (repeat while remaining > 0). Reads only (may create the project database). Rules: guide("report"). |
| record_reportB | Save the report answering the question: citations and quotes are checked against the stored articles, and the methods and study list are added from the run's record. Reply with its message. Rules: guide("report"). |
| record_evaluationB | Deep mode: record whether this round's evidence is enough; if not, the revised question is searched into the same review and the next round begins. Rules: guide("evaluation"). |
| wiki_tasksA | Start here to build or update the wiki: the current step as self-contained tasks (each with its full rules and the tools it may use), sized for one fresh subagent; a long step comes in portions. Rules: guide("wiki"). |
| next_wiki_articleA | Get the next unextracted page of article text (a JSON header plus the page); it repeats until record_extraction records it. An article whose text changed loses its old extraction first. |
| get_article_pageA | Re-read one page of a fetched article within its extraction allowance (the project's wiki.max_pages), e.g. to check a quote; next_wiki_article serves the pages still to extract. Reads only (may create the project database). |
| record_extractionB | Record the entities and relationships extracted from one page (re-recording replaces it). Rules: guide("extraction"). |
| find_entitiesA | Search a project's wiki entities by name, alias, acronym, or spelling variant, e.g. to reuse an entity's id while extracting. Reads only (may create the project database). |
| list_duplicate_candidatesA | List pending entity pairs that may be the same thing, with an example mention of each; decide them with resolve_duplicates. Reads only (may create the project database). |
| resolve_duplicatesA | Decide pairs from list_duplicate_candidates: merge (irreversible; keep picks the survivor) or distinct (not suggested again). Rules: guide("duplicates"). |
| merge_entitiesA | Merge entities into one (irreversible), and/or rename or retype an entity, by id. For pairs from list_duplicate_candidates use resolve_duplicates. |
| next_synthesisB | Get the next entity whose wiki page needs writing or updating, with its evidence; it repeats until record_synthesis saves it. Rules: guide("synthesis"). |
| record_synthesisA | Save an entity page from next_synthesis, replacing the stored one: a new page, or only the changed sections of an update. Rules: guide("synthesis"). |
| export_wikiB | Rewrite every Markdown page of a project's wiki (entities, sources, index, log) from its database. |
| list_runsB | List a project's searches (runs), newest first. To keep a tried review updated on a schedule, use bot_sources then create_bot, which creates its Hermes routine directly without shell access. |
| get_run_statusA | Show a run's progress in every stage and the available next steps; check it rather than chat history. Reads only (may create the project database). |
| list_articlesB | List a run's articles with their screening, fetch, and wiki status. |
| bot_startA | Begin a scheduled bot run: lock the project and search its look-back window for new articles. |
| bot_nextA | Advance a bot run after bot_start: returns the next step (wait, triage, screen, fetch, wiki or
finish) with a |
| bot_finishA | End a bot run: refresh the wiki, write the update report, and return the message to reply with. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| research_question | Answer a research question with a reviewed literature search and a report (basic, full or deep). |
| plan_search | Draft and validate a structured search for a research question. |
| screen_run | Screen a run's search results against criteria. |
| build_wiki | Build the evidence-linked wiki for a run's fetched articles. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 42 tools
Most tools target a distinct resource+action, and descriptions cross-reference each other heavily (e.g. bot_sources->create_bot, list_duplicate_candidates->resolve_duplicates, next_*->record_*), which aids selection. However, several navigational tools (research_next, bot_next, get_run_status, guide, wiki_tasks) all essentially answer 'what next', and the four config tools (med_lit_settings, review_defaults, project_settings, manage_bot) overlap in scope enough to invite occasional misselection.
There are recognizable prefix families (record_*, next_*, list_*, get_*, bot_*, *_settings), but verb style is inconsistent: some are verb_noun (create_project, start_search, fetch_articles) while others are bare nouns or noun phrases (review_defaults, bot_sources, wiki_tasks, med_lit_settings). Readable overall, but not a predictable single convention.
42 tools is heavy for this purpose and exceeds the practical ceiling; the multi-stage pipeline (search, triage, screen, fetch, extract, synthesize, wiki, report, bots) explains some of it, but many stage-navigator and config tools add surface area an agent must juggle. It is well beyond the 3-15 sweet spot and risks context bloat and selection errors.
The surface covers the full literature-review lifecycle end to end: project/run management, question validation, search, triage, screening, fetch, extraction, synthesis, wiki export, reporting, duplicate resolution, and scheduled bots. Every stage has both a 'next/get' input tool and a 'record/save' output tool, with settings and guide support, leaving no obvious dead ends.