🐍 ☁️ - Interact with the UCSC Genome Browser API to find genomes, chromosomes and more
UCSC Genome Browser MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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
Installation
Prerequisites
- Python 3.10 or higher
- pip
Install from source
Required Dependencies
- mcp>=0.9.0 - Model Context Protocol SDK
- httpx>=0.27.0 - HTTP client for API requests
Usage
Running the Server
The server communicates over stdio, following the MCP protocol:
Configuration 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
Tool Examples
1. Find Genomes
Search for dog genomes:
Search with advanced operators:
2. List Available Tracks
List all tracks for human genome (hg38):
List tracks without container information:
3. Get DNA Sequence
Get entire mitochondrial chromosome:
Get specific region:
Get reverse complement:
4. Get Track Data
Get gene annotations for a region:
Get track data from an assembly hub:
5. Search Within a Genome
Search for BRCA1 in human genome:
Search only in help documentation:
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=10 retrieves 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:
1. Query by chromosome:
2. Use start/end coordinates for smaller regions:
Working with Track Hubs
Track hubs allow accessing external genomic data: