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 MCP find 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.
Available Tools
24 toolsget_ancestry_categoriesDecode ancestry category codesARead-only
Map the three-letter ancestry symbols used in PGS Catalog data (EUR, AFR, EAS, SAS, AMR, GME, MAE, MAO, …) to their full display names and underlying categories. Use this before interpreting any ancestry_distribution field.
Inputs: no named parameters.
get_api_versionsGet REST API version historyARead-only
List the current and previous PGS Catalog REST API versions with their dates and changelogs.
Inputs: no named parameters.
get_catalog_infoGet PGS Catalog info and citationARead-only
Get PGS Catalog metadata: REST API version and changelog, latest release date, counts of scores/traits/publications, the PGS Catalog citation (title, DOI, PubMed ID, authors, journal, year), the Ensembl version used for harmonized scoring files, and the terms of use. Use this to cite the catalog correctly.
Inputs: no named parameters.
get_cohortGet a cohort by symbolARead-only
Look up a cohort by short symbol (e.g. ABCFS, NHS, UKB). Cohort symbols are not guaranteed to be unique, so this may return several matches with their full names and associated PGS IDs.
Inputs: cohort_symbol (required), limit, offset.
get_ftp_fileDownload a file from the FTP siteARead-only
Download the raw text content of a file from the PGS Catalog FTP site. Provide a path relative to the FTP root, e.g. PGS000001/ScoringFiles/PGS000001.txt.gz or PGS000001/Metadata/PGS000001_metadata_scores.csv. Binary files (e.g. .gz) are returned as base64-encoded text; text files (e.g. .csv) are returned as-is.
Inputs: path (required).
get_performance_metricGet a performance metric by PPM IDARead-only
Retrieve one reported performance metric by PPM ID (e.g. PPM000001): metric estimates with confidence intervals and standard errors, the trait and phenotyping method, covariates, the associated score, and the evaluation samples.
Inputs: ppm_id (required), full, fields.
get_publicationGet a publication by PGP IDARead-only
Retrieve one PGS Catalog publication by PGP ID (e.g. PGP000001): title, journal, DOI, PubMed ID, authors, dates, and the PGS IDs associated with it split into development and evaluation.
Inputs: pgp_id (required), full, fields.
get_releaseGet a PGS Catalog releaseARead-only
Get release details: release date and the counts and IDs of newly added scores, publications, performance metrics, and traits. Omit release_date to get the current release.
Inputs: full, fields, release_date.
get_sample_setGet a sample set by PSS IDARead-only
Retrieve one sample set by PSS ID (e.g. PSS000070): every sample with participant counts, ancestry, cohorts, phenotyping details, and follow-up information.
Inputs: pss_id (required), full, fields.
get_scoreGet a polygenic score by IDARead-only
Retrieve one polygenic score by PGS ID (e.g. PGS000001): scoring-file URLs including harmonized GRCh37/GRCh38 files, publication citation, reported and mapped traits, variant-development and training samples, ancestry distribution at each stage, method parameters, and license terms.
Inputs: pgs_id (required), full, fields.
get_scores_from_gwas_studyFind scores built from a GWAS studyARead-only
Given an NHGRI-EBI GWAS Catalog study ID (GCST), return the PGS IDs that used that study as the source of variant associations. Useful for tracing a GWAS finding into the polygenic scores derived from it.
Inputs: gcst_id (required).
get_traitGet a trait by ontology IDARead-only
Retrieve one trait by ontology ID (e.g. MONDO_0004989): label, description, synonyms, external mapped terms, trait categories, and the PGS IDs associated with it (and optionally its child terms).
Inputs: trait_id (required), full, fields, include_children.
list_cohortsList cohortsARead-only
List study cohorts referenced by the PGS Catalog (for example UK Biobank, NHS, ABCFS, ESTHER, PROFILE) with their full names and the PGS IDs that used them for development or evaluation. Provide cohort_symbols to look up specific cohorts.
Inputs: limit, offset, cohort_symbols.
list_ftp_metadata_filesList a score's metadata filesARead-only
List the downloadable metadata files in a score's Metadata/ directory (e.g. PGS000001/Metadata/). Returns file names, sizes, and modification dates. Metadata includes CSVs for cohorts, EFO traits, evaluation sample sets, performance metrics, publications, score development samples, and scores, plus a metadata archive and Excel workbook. Use get_ftp_file to download a file's contents.
Inputs: pgs_id (required).
list_ftp_score_directoryList a score's FTP directory contentsARead-only
List the subdirectories and files inside a score's FTP directory (e.g. PGS000001/). Returns the ScoringFiles/ and Metadata/ subdirectories and any other entries. Use list_ftp_scoring_files or list_ftp_metadata_files to enumerate the actual downloadable files.
Inputs: pgs_id (required).
list_ftp_scoresList PGS score directories on the FTP siteARead-only
List all PGS score directories available on the PGS Catalog FTP site (https://ftp.ebi.ac.uk/pub/databases/spot/pgs/scores/). Each directory is named after a PGS ID (PGS000001, PGS000002, …) and contains ScoringFiles/ and Metadata/ subdirectories. Use this to discover which scores have scoring files available for download.
Inputs: no named parameters.
list_ftp_scoring_filesList a score's scoring filesARead-only
List the downloadable scoring files in a score's ScoringFiles/ directory (e.g. PGS000001/ScoringFiles/). Returns file names, sizes, and modification dates. Harmonized files live in the Harmonized/ subdirectory. Use get_ftp_file to download a file's contents.
Inputs: pgs_id (required).
list_releasesList PGS Catalog releasesARead-only
List all PGS Catalog releases, most recent first, with counts and IDs of newly added content.
Inputs: limit, offset.
list_trait_categoriesList trait categoriesARead-only
List the higher-level trait categories used to group traits in the PGS Catalog (for example Cancer, Cardiovascular disorder, Neurological disorder) together with the ontology terms in each category. A good starting point for exploratory questions such as 'what polygenic scores exist for cancer'.
Inputs: limit, offset.
search_performance_metricsSearch reported performance metricsARead-only
Search reported PGS performance metrics (odds ratio, beta, hazard ratio, C-index/AUC, variance explained, …) by score, publication, or PubMed ID. Each result includes the metric estimates with confidence intervals, the samples used for evaluation with their ancestry and cohorts, and the covariates that were adjusted for.
Inputs: full, pmid, limit, fields, +4 more.
search_publicationsSearch PGS Catalog publicationsARead-only
Search publications in the PGS Catalog by author name, PubMed ID, or an associated score ID. Returns citation data plus the PGS IDs each publication developed and evaluated.
Inputs: full, pmid, limit, author, +4 more.
search_sample_setsSearch sample setsARead-only
Search PGS sample sets (the groups of participants used to evaluate a score) by score, publication, or PubMed ID. Each sample set lists participant counts, ancestry breakdowns, age and follow-up data, and the cohorts involved.
Inputs: full, pmid, limit, fields, +4 more.
search_scoresSearch polygenic scoresARead-only
Search the PGS Catalog for polygenic scores by publication (PGP ID or PubMed ID) or by trait ontology ID (EFO/HP/MONDO). Provide pgs_ids alone to fetch a known set of scores directly. Returns scores with traits, publication citation, variant counts, weight type, ancestry distribution, license, and the FTP scoring-file URL.
Inputs: full, pmid, limit, fields, +4 more.
search_traitsSearch traits (ontology terms)ARead-only
Search PGS Catalog traits by name, trait category, synonym, ontology ID, or external mapped term (e.g. 'breast cancer', 'Neurological disorder', 'ICD10:I25', 'OMIM:605526'). Always use this first to resolve a human-readable condition into the exact EFO/MONDO/HP ID that search_scores expects — ontology IDs change between catalog releases, so do not assume an ID from documentation or memory. Child ontology terms are included by default.
Inputs: full, term, exact, limit, +6 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Most tools have clearly distinct resource-plus-action purposes, and the descriptions carefully distinguish similar tools such as the FTP directory and file-listing operations. The only mild risk of confusion is among the several FTP listing variants, but their nested scopes are explicitly explained.
The tool set follows a strong verb_noun convention throughout: list_*, search_*, and get_* are used consistently. Singular/plural distinctions are also predictable, such as search_scores/get_score and list_cohorts/get_cohort.
At 24 tools, the surface is somewhat heavy but reasonable for a catalog covering many entity types: scores, publications, traits, performance metrics, sample sets, cohorts, releases, and FTP files. Each tool appears to serve a distinct lookup or browsing need.
The tool set provides broad coverage of the PGS Catalog domain, including search and retrieval for all major entities, release and version metadata, FTP access, ancestry interpretation, and cross-linking from GWAS studies. Since the catalog is a read-only resource, the absence of create/update/delete tools is appropriate rather than a gap.
Maintenance
Related MCP Connectors
GWAS Catalog (EBI/NHGRI) MCP — curated catalog of genome-wide association studies. Look up a SNP…
Find pharmacogenomics guidelines, translate diplotypes, and retrieve prescribing recommendations.
Read-only research pilot catalogue: task templates, resources, starter studies, capability status.
Read-only search and retrieval of published books, articles and authors, with public catalog links.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP 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 gradedqualityCmaintenanceEnables 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.127 npmMIT

@pipeworx/enaofficial
AlicenseNot gradedqualityCmaintenanceEnables searching ENA's public sequencing data by organism, study, platform, country or date, retrieving FASTQ/BAM download URLs and checksums, and discovering available result types and fields.146 npmMIT