No local installation. No QueryGaP account. No QueryGaP API key.
QueryGaP gives your assistant structured access to dbGaP, UK Biobank, and public All of Us documentation metadata. Use it to resolve dbGaP studies, find variables, datasets, and document metadata within an exact study accession, search or inspect UK Biobank fields, and navigate public All of Us variables with source identifiers and canonical links in the results.
The MCP client supplies the reasoning and decides which tools to call. QueryGaP handles study resolution, scoped retrieval, ranking, and provenance.
QueryGaP is a hosted remote MCP server. Use this URL in any compatible client:
https://mcp.querygap.org/mcp
The hosted public beta requires no QueryGaP account, access token, or user-supplied OpenAI key.
Claude
- In Claude on the web, open
Customize > Connectors. - Select
+, thenAdd custom connector. - Enter
QueryGaPandhttps://mcp.querygap.org/mcp, leaving the optional authentication fields blank. - In a conversation, select
+ > Connectorsand enable QueryGaP.
The same remote connector is also available in Claude Desktop. See Anthropic's custom connector guide. On managed Team and Enterprise accounts, an organization owner must add the connector before members can enable it.
ChatGPT
Where ChatGPT Developer mode is available:
- Open
Settings > Security and loginand enableDeveloper mode. - Open
ChatGPT Plugins, select+, and create a developer-mode app. - Use
https://mcp.querygap.org/mcpas the remote MCP URL and select no authentication. - Enable the app from the conversation's Developer mode tools.
See the ChatGPT Developer mode guide.
Codex
codex mcp add querygap --url https://mcp.querygap.org/mcpClaude Code
claude mcp add --transport http --scope user querygap https://mcp.querygap.org/mcpThe user scope makes QueryGaP available across projects. See the Claude Code MCP guide.
For another MCP client, add the endpoint as a remote Streamable HTTP server with no authentication.
dbGaP
Resolve the Framingham Heart Study, then find variables related to systolic blood pressure. Return their exact dbGaP IDs, descriptions, parent datasets, and source links.
UK Biobank
Find UK Biobank fields related to kidney function. Inspect the most relevant field and return its exact field ID, title, category path, available instance summaries, and source link.
All of Us
Find All of Us EHR measurement variables for diastolic blood pressure. Focus on standard LOINC concepts, then inspect the best result's identifiers, relationships, and Data Browser link.
The hosted public beta currently exposes all seven read-only tools:
| Tool | Purpose |
|---|---|
resolve_dbgap_study |
Resolve a study name, acronym, accession, or dbGaP URL to ranked candidates. |
get_dbgap_study |
Retrieve metadata for an exact versioned dbGaP accession. |
search_dbgap_catalog |
Search a resolved study's variables, datasets, or document-title metadata using keyword, semantic, or hybrid retrieval. |
search_ukb_fields |
Search the UK Biobank field dictionary by concept, field ID, or stored aliases. |
get_ukb_field |
Retrieve an exact UK Biobank field and optional instance summaries. |
search_aou_catalog |
Search public All of Us metadata, optionally filtering by variable type and EHR domain, role, or vocabulary. |
get_aou_item |
Retrieve one AoU result's identifiers, links, answer choices, scale membership, and concept relationships. |
AoU results explicitly distinguish variables from contextual records. These
tools never connect to participant-level All of Us Workbench data. EHR-specific
filters require variable_type="ehr"; omitting filters searches the full public
metadata catalog.
Self-hosted servers expose the five dbGaP and UK Biobank tools by default. They
add the two AoU tools only when the isolated aou schema passes preflight and
QG_MCP_AOU_ENABLED=1.
For dbGaP, QueryGaP resolves the study first and preserves the full versioned accession throughout retrieval. UK Biobank remains a separate, field-centric source.
QueryGaP searches public documentation metadata, not participant-level records. The hosted MCP is read-only and uses a catalog-only database separate from QueryGaP accounts, chats, credits, and billing data. Keyword search does not call a model provider; semantic and hybrid search use QueryGaP-funded query embeddings.
This repository contains the MCP runtime, retrieval implementation, ontology, tests, evaluation material, and security controls. It connects to the hosted QueryGaP catalog; the catalog snapshot and ingestion pipeline are separate.
QueryGaP MCP supports Python 3.10 and newer. Unit tests use fakes, so they require neither a catalog database nor OpenAI access.
python -m venv .venv-mcp
.venv-mcp/bin/pip install -r requirements-mcp-dev.txt
.venv-mcp/bin/python -m pytest -q tests/mcpRunning a server against a real catalog requires a schema-compatible PostgreSQL
database and the dedicated read-only role described in
ops/querygap_mcp_ro.sql.
docs/mcp.md: local setup and complete tool contractquerygap://ontology/v0: entities, identity, relationships, and provenancequerygap://retrieval-contract/v0: study scoping and retrieval rulesdocs/mcp-security.md: hosted security boundarydocs/mcp-evaluation.md: evaluation protocol
The hosted endpoint is live as a best-effort public beta with deliberate usage
limits. QueryGaP MCP is licensed under the Apache License 2.0; see
LICENSE. Use GitHub Issues for questions and follow
SECURITY.md for vulnerability reports.