UCSC Genome Browser MCP Server
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., "@UCSC Genome Browser MCP Server get the DNA sequence for BRCA1 gene region in human genome hg38"
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.
UCSC Genome Browser MCP Server
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.
Features
This MCP server exposes 12 tools that cover all major UCSC Genome Browser API endpoints:
Listing & Discovery Tools
find_genome - Search for genomes using keywords, accession IDs, or organism names
list_public_hubs - List all available public track hubs
list_ucsc_genomes - List all UCSC database genomes
list_genark_genomes - List GenArk assembly hub genomes
list_hub_genomes - List genomes from a specific hub
list_files - List downloadable files for a genome
list_tracks - List data tracks in a genome or hub
list_chromosomes - List chromosomes in a genome or track
list_schema - Get schema/field definitions for a track
Data Retrieval Tools
get_sequence - Retrieve DNA sequences from genomes
get_track_data - Get track data (genes, variants, annotations, etc.)
search_genome - Search within a genome assembly
Related MCP server: gnomAD MCP Server
Installation
Prerequisites
Python 3.10 or higher
pip
Install from source
# Clone or download the repository
cd ucsc-genome-mcp-server
# Install in development mode
pip install -e .Required Dependencies
mcp>=0.9.0- Model Context Protocol SDKhttpx>=0.27.0- HTTP client for API requests
Usage
Running the Server
The server communicates over stdio, following the MCP protocol:
python ucsc_genome_mcp_server.pyConfiguration with Claude Desktop
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"
}
}
}Tool Examples
1. Find Genomes
Search for dog genomes:
{
"query": "dog"
}Search with advanced operators:
{
"query": "+white +rhino* -southern",
"browser": "mustExist"
}2. List Available Tracks
List all tracks for human genome (hg38):
{
"genome": "hg38"
}List tracks without container information:
{
"genome": "hg38",
"track_leaves_only": true
}3. Get DNA Sequence
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
}4. Get Track Data
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"
}5. Search Within a Genome
Search for BRCA1 in human genome:
{
"search": "brca1",
"genome": "hg38"
}Search only in help documentation:
{
"search": "bigBed",
"genome": "hg38",
"categories": "helpDocs"
}API Details
Base URL
All requests go to: https://api.genome.ucsc.edu
Rate Limits
Recommended: Maximum 1 request per second
The API has a botDelay system to prevent overload
Excessive queries may result in restricted access
Coordinate Systems
Start coordinates: 0-based (first base is 0)
End coordinates: 1-based (exclusive)
Example:
start=0, end=10retrieves the first 10 bases
Supported Track Types
The get_track_data tool supports these track types:
bed, bigBed, bigWig
genePred, bigGenePred
bigChain, bigPsl, bigMaf
narrowPeak, bigNarrowPeak
wiggle/wig, barChart/bigBarChart
interact/bigInteract
And many more...
Advanced Features
Working with Large Datasets
For tracks with over 1 million items, use pagination:
Query by chromosome:
{
"genome": "hg19",
"track": "knownGene",
"chrom": "chr1"
}Use start/end coordinates for smaller regions:
{
"genome": "hg19",
"track": "knownGene",
"chrom": "chr1",
"start": 1000000,
"end": 2000000
}Working with Track Hubs
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"
}Error Handling
The server handles various error conditions:
HTTP errors (404, 500, etc.)
Invalid parameters
Non-existent genomes/tracks/chromosomes
Request timeouts (30 second default)
Errors are returned as text responses with descriptive messages.
Use Cases
This MCP server enables LLM applications to:
Genomic Research: Query gene locations, sequences, and annotations
Variant Analysis: Retrieve SNP and variant data
Comparative Genomics: Access data from multiple species
Sequence Analysis: Get DNA/RNA sequences for analysis
Data Discovery: Find available datasets and assemblies
Educational: Learn about genomics through interactive queries
API Documentation
For complete API documentation, visit: https://genome.ucsc.edu/goldenpath/help/api.html
License
This project interfaces with the UCSC Genome Browser, which has its own terms of use: https://genome.ucsc.edu/conditions.html
Support
For issues with the UCSC Genome Browser API, contact UCSC. For issues with this MCP server, please file an issue in the repository.
Development
Project Structure
.
├── ucsc_genome_mcp_server.py # Main server implementation
├── pyproject.toml # Project metadata and dependencies
└── README.md # This fileAdding New Tools
To add new endpoints:
Add the tool definition in
list_tools()Add the handler in
call_tool()Update this README with examples
Testing
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'Changelog
Version 0.1.0
Initial release
Support for all major UCSC Genome Browser API endpoints
12 tools covering listing, discovery, and data retrieval
Full documentation and examples
Available Tools
12 toolsfind_genomeB
Search for a genome in the UCSC browser using a search string. Supports advanced search with +word (force inclusion), -word (exclusion), and word* (wildcard).
Inputs: query (required), browser, stats_only, year, +4 more.
get_sequenceB
Retrieve DNA sequence from a specified genome assembly. Can retrieve entire chromosome or specific coordinates.
Inputs: genome (required), chrom (required), start, end, +2 more.
get_track_dataB
Retrieve data from a specified track in a hub or UCSC database genome. Can be filtered by chromosome and coordinates.
Inputs: genome (required), track (required), chrom, start, +4 more.
list_chromosomesB
List chromosomes in an assembly hub, track hub, or UCSC database genome. Optionally filter by specific track.
Inputs: genome (required), hub_url, track.
list_filesB
List download files available for a specified UCSC genome assembly.
Inputs: genome (required), format, max_items.
list_genark_genomesB
List UCSC Genome Browser database genomes from assembly hub host (GenArk). Can also test for existence of a specific genome.
Inputs: genome, max_items.
list_hub_genomesC
List all genomes available in a specified track or assembly hub.
Inputs: hub_url (required).
list_public_hubsB
List all available public track hubs in the UCSC Genome Browser.
Inputs: no named parameters.
list_schemaB
List the schema (field definitions) for a specified data track.
Inputs: genome (required), track (required), hub_url.
list_tracksC
List all data tracks available in a specified hub or UCSC database genome.
Inputs: genome (required), hub_url, track_leaves_only.
list_ucsc_genomesA
List all UCSC Genome Browser database genomes available on the database host.
Inputs: no named parameters.
search_genomeC
Search for matches within a UCSC Genome Browser genome assembly across tracks, help docs, and public hubs.
Inputs: search (required), genome (required), categories.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools have distinct purposes, but there is some overlap between 'find_genome' and 'search_genome'—both involve searching genomes, which could cause confusion. The other tools target specific resources like sequences, tracks, chromosomes, files, and hubs with clear boundaries.
All tool names follow a consistent verb_noun pattern using snake_case, such as 'find_genome', 'get_sequence', and 'list_tracks'. This predictability makes it easy for agents to understand and use the toolset without confusion.
With 12 tools, the count is well-suited for the UCSC Genome Browser domain, covering key operations like searching, retrieving data, and listing resources. Each tool serves a specific function without redundancy, making the set comprehensive yet manageable.
The toolset provides strong coverage for browsing and retrieving genomic data, including search, sequence access, track management, and hub listings. A minor gap is the lack of tools for modifying or updating data, but this aligns with the server's likely read-only focus on the UCSC Browser.
Maintenance
Related MCP Connectors
UCSC Genome Browser REST API — reference genome assemblies for ~250 species, the annotation tracks…
Look up genes, sequences, variants, homologs, and cross-database xrefs from Ensembl REST.
dbSNP refSNP records and HGVS/SPDI/rsID normalization for human genetic variants, from NCBI…
Query STRING interactions, enrichment, annotations, homology, and PPI networks.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides access to the Ensembl genomics REST API with 30+ tools for genomic data including gene lookup, sequence retrieval, genetic variants, cross-species homology, phenotypes, and regulatory features.25100 npmISC
- AlicenseBqualityDmaintenanceProvides a programmatic interface to the Genome Aggregation Database (gnomAD) API across versions v2.1.1, v3.1.2, and v4.1.0. It enables users to query gene metadata, variant information, population frequencies, and ClinVar data through a unified schema.127Apache 2.0
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive access to the NCBI Datasets API, enabling genomic, taxonomic, and biological data operations through 31 specialized tools.15MIT
- AlicenseNot gradedqualityDmaintenanceProvides access to BioThings.io APIs for comprehensive gene and variant annotations, enabling seamless integration of biological data into workflows.1,527 npm6MIT