A Model Context Protocol (MCP) server that provides comprehensive access to the UCSC Genome Browser API. This server enables LLM applications to query genomic data, sequences, tracks, and metadata from the UCSC Genome Browser. This MCP server exposes 12 tools that cover all major UCSC Genome Browser API endpoints: - findgenome - Search for genomes using keywords, accession IDs, or organism names -
Add this skill
npx mdskills install hlydecker/ucsc-genome-mcpComprehensive genomics API wrapper with 12 well-documented tools for querying UCSC Genome Browser data
A Model Context Protocol (MCP) server that provides comprehensive access to the UCSC Genome Browser API. This server enables LLM applications to query genomic data, sequences, tracks, and metadata from the UCSC Genome Browser.
This MCP server exposes 12 tools that cover all major UCSC Genome Browser API endpoints:
# Clone or download the repository
cd ucsc-genome-mcp-server
# Install in development mode
pip install -e .
mcp>=0.9.0 - Model Context Protocol SDKhttpx>=0.27.0 - HTTP client for API requestsThe server communicates over stdio, following the MCP protocol:
python ucsc_genome_mcp_server.py
Add this to your Claude Desktop configuration file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"ucsc-genome-browser": {
"command": "/Users/You/.local/bin/uv",
"args": [
"--directory",
"/Users/Path/To/Repository/ucsc-genome-mcp",
"run",
"ucsc-genome-mcp.py"
],
"env": {},
"metadata": {
"description": "UCSC Genome Browser API",
"version": "1.0.0"
}
}
}
Search for dog genomes:
{
"query": "dog"
}
Search with advanced operators:
{
"query": "+white +rhino* -southern",
"browser": "mustExist"
}
List all tracks for human genome (hg38):
{
"genome": "hg38"
}
List tracks without container information:
{
"genome": "hg38",
"track_leaves_only": true
}
Get entire mitochondrial chromosome:
{
"genome": "hg38",
"chrom": "chrM"
}
Get specific region:
{
"genome": "hg38",
"chrom": "chrM",
"start": 4321,
"end": 5678
}
Get reverse complement:
{
"genome": "hg38",
"chrom": "chrM",
"start": 4321,
"end": 5678,
"reverse_complement": true
}
Get gene annotations for a region:
{
"genome": "hg38",
"track": "knownGene",
"chrom": "chr1",
"start": 47000,
"end": 48000
}
Get track data from an assembly hub:
{
"hub_url": "http://hgdownload.gi.ucsc.edu/hubs/mouseStrains/hub.txt",
"genome": "CAST_EiJ",
"track": "assembly",
"chrom": "chr1"
}
Search for BRCA1 in human genome:
{
"search": "brca1",
"genome": "hg38"
}
Search only in help documentation:
{
"search": "bigBed",
"genome": "hg38",
"categories": "helpDocs"
}
All requests go to: https://api.genome.ucsc.edu
start=0, end=10 retrieves the first 10 basesThe get_track_data tool supports these track types:
For tracks with over 1 million items, use pagination:
{
"genome": "hg19",
"track": "knownGene",
"chrom": "chr1"
}
{
"genome": "hg19",
"track": "knownGene",
"chrom": "chr1",
"start": 1000000,
"end": 2000000
}
Track hubs allow accessing external genomic data:
{
"hub_url": "http://hgdownload.gi.ucsc.edu/hubs/mouseStrains/hub.txt",
"genome": "CAST_EiJ",
"track": "ensGene",
"chrom": "chr1"
}
The server handles various error conditions:
Errors are returned as text responses with descriptive messages.
This MCP server enables LLM applications to:
For complete API documentation, visit: https://genome.ucsc.edu/goldenpath/help/api.html
This project interfaces with the UCSC Genome Browser, which has its own terms of use: https://genome.ucsc.edu/conditions.html
For issues with the UCSC Genome Browser API, contact UCSC. For issues with this MCP server, please file an issue in the repository.
.
├── ucsc_genome_mcp_server.py # Main server implementation
├── pyproject.toml # Project metadata and dependencies
└── README.md # This file
To add new endpoints:
list_tools()call_tool()Test individual endpoints manually:
# Using curl
curl -L 'https://api.genome.ucsc.edu/list/ucscGenomes'
# Using wget
wget -O- 'https://api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM;start=4321;end=5678'
Install via CLI
npx mdskills install hlydecker/ucsc-genome-mcpUCSC Genome Browser MCP Server is a free, open-source AI agent skill. A Model Context Protocol (MCP) server that provides comprehensive access to the UCSC Genome Browser API. This server enables LLM applications to query genomic data, sequences, tracks, and metadata from the UCSC Genome Browser. This MCP server exposes 12 tools that cover all major UCSC Genome Browser API endpoints: - findgenome - Search for genomes using keywords, accession IDs, or organism names -
Install UCSC Genome Browser MCP Server with a single command:
npx mdskills install hlydecker/ucsc-genome-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
UCSC Genome Browser MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.