Skip to main content

MCP server

The GWAS Catalog Model Context Protocol (MCP) server allows compatible AI agents to query GWAS Catalog data directly.

Instead of constructing REST API requests yourself, you can ask questions in natural language or allow an agent to make structured queries on your behalf.

MCP server: https://www.ebi.ac.uk/gwas/mcp

Use the REST API when building software or making reproducible programmatic queries. Use the MCP server when working with an MCP-compatible AI agent that should discover and query GWAS Catalog data on your behalf.

Connect to the server​

The server is hosted online, so you do not need to install it. Connect with an MCP 2.x-compatible client that supports Streamable HTTP. No bearer token or other headers are needed.

Codex CLI​

Run this command to add the server:

codex mcp add gwas-mcp --url https://www.ebi.ac.uk/gwas/mcp

Run codex mcp list to check the connection.

Claude Code​

Run this command to add the server:

claude mcp add --transport http gwas-mcp https://www.ebi.ac.uk/gwas/mcp

Add --scope user to make the server available in all your projects.

Other MCP clients​

Add https://www.ebi.ac.uk/gwas/mcp as a Streamable HTTP server in your client. For example, in the ChatGPT desktop app, open Settings → MCP Servers → Add server, choose Streamable HTTP, then enter the server URL. Other clients that support remote Streamable HTTP servers can use the same URL. Clients that only support local STDIO servers can connect through the mcp-remote bridge.

For more client setup details, see the MCP server README.

Available data​

The MCP server provides tools for querying:

  • Traits — EFO traits (diseases and phenotypes) by name, gene or publication
  • Studies — GWAS studies by trait, ancestry label, gene or accession
  • Associations — variant-trait associations and statistics such as p-values and odds ratios

It also provides reference data, including ancestry labels, cohort IDs and variant consequences, which agents can use to interpret results.

Example questions​

You do not need to call the tools directly. Ask your MCP-compatible agent questions such as:

  • “What EFO trait covers type 2 diabetes?”
  • “Find GWAS studies of type 2 diabetes in East Asian cohorts.”
  • “What variants are associated with LDL cholesterol near the APOE gene?”
  • “Show the strongest associations for study accession GCST000001.”