Science
Data source: PubMed (NCBI)
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"}}}'
REST API
API Root
https://context.gnist.ai/rest/pubmed/
6 endpoints available:
GET /rest/pubmed/search_pubmedGET /rest/pubmed/get_articleGET /rest/pubmed/mesh_lookupGET /rest/pubmed/search_trialsGET /rest/pubmed/get_trialGET /rest/pubmed/report_feedback
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())
Command Line
Command
gc pubmed
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (6)
search_pubmedSearch PubMed for biomedical literature.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search query. Supports PubMed syntax (e.g., "diabetes[MeSH] AND insulin", "COVID-19 vaccine efficacy"). Plain keywords also work. |
max_results | integer | optional | Number of results to return (1–100, default 10). (default: 10) |
date_from | any | optional | Filter by publication date start (YYYY/MM/DD or YYYY). |
date_to | any | optional | Filter by publication date end (YYYY/MM/DD or YYYY). |
get_articleFetch full metadata and abstract for a PubMed article.
| Parameter | Type | Required | Description |
|---|---|---|---|
pmid | string | required | PubMed ID (e.g., "33972843"). Found in search_pubmed results. |
mesh_lookupLook up a MeSH (Medical Subject Headings) term.
| Parameter | Type | Required | Description |
|---|---|---|---|
term | string | required | The medical term to look up (e.g., "Diabetes Mellitus", "Hypertension"). |
search_trialsSearch ClinicalTrials.gov for clinical trials by condition.
| Parameter | Type | Required | Description |
|---|---|---|---|
condition | string | required | Medical condition to search for (e.g., "COVID-19", "Type 2 Diabetes"). |
status | any | optional | Trial status filter (e.g., RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING). |
phase | any | optional | Trial phase filter (e.g., PHASE1, PHASE2, PHASE3, PHASE4). |
country | any | optional | Country filter (e.g., United States, Norway). |
max_results | integer | optional | Number of results to return (1–50, default 10). (default: 10) |
get_trialFetch detailed information about a specific clinical trial.
| Parameter | Type | Required | Description |
|---|---|---|---|
nct_id | string | required | ClinicalTrials.gov NCT ID (e.g., "NCT04470427"). |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |