GnistAI GnistAI
Log in

PubMed

Biomedical literature search — PubMed abstracts, citations, and MeSH term lookup. For clinical trials use the clinicaltrials server.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 6 tools tools 6 6 Science

Data source: PubMed (NCBI)

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/pubmed/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-pubmed": {
      "url": "https://context.gnist.ai/mcp/pubmed/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/pubmed/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_pubmed", "arguments": {"query": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/pubmed/

6 endpoints available:

Shell
curl "https://context.gnist.ai/rest/pubmed/search_pubmed?query=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/pubmed/search_pubmed",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "query": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc pubmed

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (6)

search_pubmed
Search PubMed for biomedical literature.
ParameterTypeRequiredDescription
querystringrequiredSearch query. Supports PubMed syntax (e.g., "diabetes[MeSH] AND insulin", "COVID-19 vaccine efficacy"). Plain keywords also work.
max_resultsintegeroptionalNumber of results to return (1–100, default 10). (default: 10)
date_fromanyoptionalFilter by publication date start (YYYY/MM/DD or YYYY).
date_toanyoptionalFilter by publication date end (YYYY/MM/DD or YYYY).
get_article
Fetch full metadata and abstract for a PubMed article.
ParameterTypeRequiredDescription
pmidstringrequiredPubMed ID (e.g., "33972843"). Found in search_pubmed results.
mesh_lookup
Look up a MeSH (Medical Subject Headings) term.
ParameterTypeRequiredDescription
termstringrequiredThe medical term to look up (e.g., "Diabetes Mellitus", "Hypertension").
search_trials
Search ClinicalTrials.gov for clinical trials by condition.
ParameterTypeRequiredDescription
conditionstringrequiredMedical condition to search for (e.g., "COVID-19", "Type 2 Diabetes").
statusanyoptionalTrial status filter (e.g., RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING).
phaseanyoptionalTrial phase filter (e.g., PHASE1, PHASE2, PHASE3, PHASE4).
countryanyoptionalCountry filter (e.g., United States, Norway).
max_resultsintegeroptionalNumber of results to return (1–50, default 10). (default: 10)
get_trial
Fetch detailed information about a specific clinical trial.
ParameterTypeRequiredDescription
nct_idstringrequiredClinicalTrials.gov NCT ID (e.g., "NCT04470427").
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related