PGS Catalog MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PGS Catalog MCPfind polygenic scores for type 2 diabetes in PGS Catalog"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PGS Catalog MCP
An MCP server for the PGS Catalog REST API — the EMBL-EBI catalog of published polygenic scores, their traits, publications, evaluation samples, and reported performance metrics.
Built with the official TypeScript SDK (@modelcontextprotocol/sdk) over stdio. It covers the full REST surface (v1.8.6): score, publication, trait, performance metric, sample/cohort, release, and info endpoints.
Quick start
npm install
npm run build
npm run setup # detect the MCP clients on this machine and print the configsetup figures out which harnesses are installed, prints the exact config each
one expects (JSON, or YAML for Hermes), and tells you what it would change.
Nothing is written until you add --write. See Setup below.
For Claude Desktop, add to claude_desktop_config.json:
{
"mcpServers": {
"pgs-catalog": {
"command": "node",
"args": ["<absolute-path-to>/dist/index.js"]
}
}
}For VS Code Copilot, add to .vscode/mcp.json — note this file uses the
servers key, not mcpServers:
{
"servers": {
"pgs-catalog": {
"type": "stdio",
"command": "node",
"args": ["${workspaceFolder}/dist/index.js"]
}
}
}For OpenCode, add to opencode.json (project) or
~/.config/opencode/opencode.json (global). OpenCode wants the command and its
arguments as one array, and environment variables under environment:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"pgs-catalog": {
"type": "local",
"command": ["node", "<absolute-path-to>/dist/index.js"]
}
}
}For Hermes, add to ~/.hermes/config.yaml, which is YAML. hermes mcp add pgs-catalog --command node --args <absolute-path-to>/dist/index.js
does the same thing and also probes the connection:
mcp_servers:
pgs-catalog:
command: node
args:
- <absolute-path-to>/dist/index.js
enabled: trueRelated MCP server: europepmc-mcp-server
Setup: installing into a client
pgscatalog-mcp setup writes the server entry into a client's own config file,
or prints it as JSON. It supports Claude Code, Claude Desktop, Cursor, VS Code /
GitHub Copilot, GitHub Copilot CLI, Gemini CLI, OpenCode, and Hermes.
npm run setup # detect installed clients, preview every change
npm run setup -- --write # apply them
npm run setup -- --harness cursor # one client only
npm run setup:json # print just the JSON, for piping or pastingPositional harness names work too (pgscatalog-mcp setup cursor gemini), as do
aliases like claude or desktop.
Flag | Effect |
| Merge the entry into the client's config file. Without it, nothing is written. |
| Show what would change, explicitly. |
| Print only JSON — one merged document, or a map keyed by harness when several are targeted. With |
| Human-readable preview (the default). |
| Which config file to touch. Each client has its own sensible default. |
| Every supported client, installed or not. |
| Replace an existing |
| Skip the |
| How to launch the server. |
| Write somewhere other than the client's default config. |
| Environment for the server process. |
Safety rules, all deliberate:
Nothing is written without
--write. The default action is a preview.Files are merged, never rewritten. Other servers, other top-level settings, and key order are preserved. Only
pgs-catalogis added or replaced.A differing existing entry is left alone and reported as a conflict (exit code 1) unless you pass
--force.A file that is not valid JSON — or not valid YAML, for Hermes — is never overwritten — the tool stops and says so.
Hermes'
config.yamlis edited in place. Only itsmcp_serverssection changes; every other setting, comment, and line is copied through byte for byte.A modified file is copied to
<file>.bakfirst, unless--no-backup.Re-running is a no-op. An identical entry is reported as
unchangedand the file is not touched.
Where each client's config lives:
Harness | Project scope | User scope | Top-level key |
Claude Code |
|
|
|
Claude Desktop | — |
|
|
Cursor |
|
|
|
VS Code / Copilot |
| VS Code user |
|
Copilot CLI |
|
|
|
Gemini CLI |
|
|
|
OpenCode |
|
|
|
Hermes | — |
|
|
VS Code is the odd one out among the JSON clients: .vscode/mcp.json and the
user profile file use servers, while the portable .mcp.json uses
mcpServers. setup prefers whichever shape the folder already uses. Claude
Code needs a type field on a stdio entry, and reads a url entry without one
as stdio, so type is written explicitly there and for VS Code.
OpenCode and Hermes differ more sharply:
OpenCode keeps servers under
mcp, mergescommandandargsinto a single array, and calls environment variablesenvironment. It also merges its own config files, so a projectopencode.jsonoverrides the global one. OpenCode 1.x accepts onlymcp.<name>; OpenCode 2 also offersmcp.servers.<name>, andsetupwarns if a config already uses that shape.Hermes is the only client whose config is YAML.
setupedits only itsmcp_serverssection and copies every other line through untouched, comments included. Hermes has one config per home, so it has no project scope.
After writing, reload the client: restart Claude Desktop, reload the VS Code
window, start a new OpenCode session, run /reload-mcp in a Hermes session, or
run claude mcp list / gemini mcp list to confirm the server registered.
Tools
Tool | REST endpoint | What it gives you |
|
| Scores by trait ID, PGP ID, PubMed ID, or a known list of PGS IDs |
|
| Scoring-file URLs (incl. harmonized GRCh37/GRCh38), method parameters, variant count, weight type, ancestry distribution, license |
|
| Publications by author, PMID, or associated score |
|
| Citation plus the PGS IDs developed and evaluated by that paper |
|
| Resolve a condition name, category, synonym, or mapped term (ICD10/OMIM) into an ontology ID |
|
| Trait definition, synonyms, categories, associated PGS IDs, child terms |
|
| The high-level groups (Cancer, Cardiovascular disorder, …) and their traits |
|
| Odds ratios, hazard ratios, C-index/AUC, variance explained — with confidence intervals, covariates, and evaluation samples |
|
| One metric record in full |
|
| Participant counts, ancestry breakdowns, age/follow-up data, cohorts |
|
| One sample set in full |
|
| Cohorts (UK Biobank, NHS, ABCFS, …) and the scores that used them |
|
| One cohort by short symbol |
|
| Release date and newly added content |
|
| All releases, most recent first |
|
| API version, catalog counts, and the PGS Catalog citation (DOI/PMID) for attribution |
|
| Decode |
|
| REST API version history |
|
| Trace a GWAS Catalog study (GCST) into the scores derived from it |
| FTP site root | List all PGS score directories on the FTP site (PGS000001, PGS000002, …) |
| FTP site, | List a score's FTP directory (ScoringFiles/, Metadata/, …) |
| FTP site, | List downloadable scoring files for a score |
| FTP site, | List downloadable metadata files for a score |
| FTP site, any path | Download a file's contents from the FTP site |
All tools are read-only and marked as such via MCP tool annotations.
How to use it well
Resolve trait IDs before searching scores. Ontology IDs are remapped between catalog releases, and IDs quoted in the upstream API docs (for example EFO_0000305) can return zero results. Search by name first:
search_traits { "term": "breast cancer" } -> MONDO_0007254, MONDO_0004989, ...
search_scores { "trait_id": "MONDO_0004989" } -> 145 scoresCompact by default. PGS records are large, so tools return a curated projection. Narrow it further with fields (dotted paths are supported and reproduce the original nesting):
get_score { "pgs_id": "PGS000001", "fields": "id,name,variants_number,publication.title" }Set full: true when you need the complete upstream record.
Page with next_offset. List results are capped at 250 per call (the API maximum). When a response includes next_offset and a hint, call again with that offset to continue.
Configuration
Environment variables, all optional:
Variable | Default | Purpose |
|
| Point at a mirror or a staging instance |
|
| Client-side requests per minute (the API allows 100) |
|
| Per-request timeout |
The client enforces a sliding-window rate limit below the documented 100 req/min ceiling, retries transient 5xx and 429 responses with backoff, and handles the API's quirks: unknown IDs return HTTP 200 with {} (surfaced as a clear not_found), and malformed requests can return an HTML error page rather than JSON.
Development
npm run build # compile to dist/
npm run dev # watch mode
npm test # unit tests (88) against the compiled output
npm run test:e2e # end-to-end: spawns the server over stdio and exercises every tool against the live APItest/setup.test.mjs covers the setup command: config paths and wrapper keys per
harness, entry shape, merge behaviour, conflict handling, argument parsing, and
runSetup end-to-end against a temporary directory — it never writes to a real
client config. The YAML path is covered too: appending a section, preserving
comments and unrelated keys, leaving an unchanged entry byte-identical, and
refusing to overwrite a file it cannot parse.
scripts/verify-config.mjs closes the loop the other way: it reads a config file
setup generated — JSON or Hermes' YAML, mcpServers / servers / mcp /
mcp_servers, string or array command — launches the server exactly as that
config describes, and checks the MCP handshake and tool count. Run it with:
node dist/index.js setup --harness cursor --json --path /tmp/c.json > /tmp/c.json
node scripts/verify-config.mjs /tmp/c.jsonspec/pgscatalog-rest-openapi.yaml is the upstream OpenAPI 3.0.3 document this server was built against, kept for reference.
Data and attribution
PGS Catalog data is © EMBL-EBI and distributed under the EBI Terms of Use. Call get_catalog_info to retrieve the current citation (DOI and PubMed ID) when publishing results derived from these tools. Individual scores may carry additional license restrictions, reported in each score's license field.
This server code is licensed under Apache-2.0.
This server cannot be deployed
Maintenance
Related MCP Connectors
GWAS Catalog (EBI/NHGRI) MCP — curated catalog of genome-wide association studies.
Read-only research pilot catalogue: task templates, resources, starter studies, capability status.
Search biomedical papers, inspect publication records, and traverse citation or semantic graphs.
Search biomedical literature, get article details, find related articles, and explore MeSH terms
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for polygenic risk score analysis, wrapping just-prs to enable catalog search, PRS computation, VCF normalization, percentile and risk estimation, and quality assessment.201MIT
- FlicenseNot gradedqualityBmaintenanceEnables searching and retrieving biomedical literature from Europe PMC, including abstracts, full-text (JATS XML), text-mined annotations, citations, references, and database cross-links, through natural language queries and automated data staging.-
- AlicenseNot gradedqualityBmaintenanceMCP server for querying the GWAS Catalog (EBI/NHGRI), a curated catalog of genome-wide association studies. It enables AI agents to search and retrieve study data via natural language or direct tool calls.15 npmMIT
- FlicenseAqualityAmaintenanceEnables querying rare-variant, gene-based association results across ~1.2M individuals from 10 global biobanks, supporting phenome-wide scans, replication screens across ancestries, and candidate list evaluation for 44 harmonized traits.4-