UniProt MCP Server
About
Access UniProt protein information, including function and sequence data.
Details
- Transport
- SSE
- License
- MIT
Explore
- Get protein information by UniProt accession number
- Batch retrieval of multiple proteins
- Caching for improved performance (24-hour TTL)
- Error handling and logging
- Information includes:
- Protein name
- Function description
- Full sequence
- Sequence length
- Organism
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
UniProt MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
1. Ensure you have Python 3.10 or higher installed
2. Clone this repository:
git clone https://github.com/TakumiY235/uniprot-mcp-server.git
cd uniprot-mcp-server
3. Install dependencies:
After configuring the server in Claude Desktop, you can ask questions like:
Can you get the protein information for UniProt accession number P98160?
For batch queries:
Can you get and compare the protein information for both P04637 and P02747?
1. Clone the repository
2. Create a virtual environment:
bashpython -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
3. Install development dependencies:
bashpip install -e ".[dev]"
bashpytest
```
uniprot_search_proteins
Search UniProtKB and return curated protein records. Pass text_search for a plain-language query (the 80% case) or query for the full Lucene field syntax (gene:TP53 AND organism_id:9606 AND reviewed:true) — exactly one is required. Reviewed (Swiss-Prot) entries are manually curated; unreviewed (TrEMBL) are computationally predicted and ~30x more numerous, so reviewed defaults to true to avoid drowning in predictions — set it false to include TrEMBL. Request facets (e.g. reviewed, model_organi…
uniprot_get_entry
Fetch full curated UniProtKB entries by accession in one batch (up to 20). Each entry carries function, catalytic activity, cofactors, subcellular location, disease involvement, PTMs, natural variants, isoforms, domains, GO terms, keywords, and cross-references. Partial failures do not abort the batch — resolved entries land in succeeded[] and unknown/withdrawn accessions in failed[]. Pass fields to trim the upstream projection. A single oversized record returns kind: "outline" (a section lis…
uniprot_map_ids
Translate identifiers across databases via UniProt's ID-mapping service — gene names to accessions, accession to PDB / Ensembl / RefSeq / ChEMBL / GeneID, and back. The job runs asynchronously; this tool submits it and polls within a budget. If it finishes in time you get status "finished" with the mappings; if it runs long you get status "running" with a ticket — re-call with that ticket (and no other inputs) to fetch the result without re-submitting. A gene name often maps to one reviewed S…
uniprot_get_proteome
Fetch the reference proteome for an organism by UPID (e.g. "UP000005640") or NCBI taxon ID (e.g. 9606) — provide exactly one. Returns metadata inline: proteome type, total protein count, BUSCO completeness (score, complete/fragmented/missing counts, lineage dataset), and the genome assembly accession. The protein set is opt-in via include_proteins (it is large — human is ~147,506) and returns a capped page with a forward cursor; narrow it with the query filter (UniProtKB Lucene syntax) for a …
uniprot_get_taxonomy
Resolve a taxonomy record by NCBI taxon ID (e.g. 9606) or scientific name (e.g. "Homo sapiens") — provide exactly one. Returns the scientific and common name, mnemonic, rank, parent, and the full lineage. Set include_children to also fetch immediate child taxa (a separate lookup — not inline on the record). Use this to turn an organism name into the taxon ID that uniprot_search_proteins (organism_id) and uniprot_get_proteome (taxon_id) expect.
uniprot_get_sequence
Fetch the canonical amino-acid sequence (FASTA) for a UniProtKB accession, with length and the parsed header. Set include_isoforms to also return the alternatively-spliced isoform sequences. This is the cheap sequence-only path — for the full functional record use uniprot_get_entry. Accessions come from uniprot_search_proteins or uniprot_map_ids; strip any "-N" isoform suffix (P04637-2 to P04637) before calling.
1. get_protein_info
- Get information for a single protein
- Required parameter: accession (UniProt accession number)
- Example response:
{
"accession": "P12345",
"protein_name": "Example protein",
"function": ["Description of protein function"],
"sequence": "MLTVX...",
"length": 123,
"organism": "Homo sapiens"
}
2. get_batch_protein_info
- Get information for multiple proteins
- Required parameter: accessions (array of UniProt accession numbers)
- Returns an array of protein information objects
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"uniprot mcp server": {
"uniprot-mcp-server": {
"command": "uv",
"args": [
"pip",
"install",
"-r",
"requirements.txt"
]
}
}
}
}
McpServers
{
"uniprot-mcp-server": {
"command": "uv",
"args": [
"pip",
"install",
"-r",
"requirements.txt"
]
}
}
A Model Context Protocol (MCP) server that provides access to UniProt protein information. This server allows AI assistants to fetch protein function and sequence information directly from UniProt.
<a href="https://glama.ai/mcp/servers/ttjbai3lpx">
</a>
Features
- Get protein information by UniProt accession number
- Batch retrieval of multiple proteins
- Caching for improved performance (24-hour TTL)
- Error handling and logging
- Information includes:
- Protein name
- Function description
- Full sequence
- Sequence length
- Organism
Quick Start
1. Ensure you have Python 3.10 or higher installed
2. Clone this repository:
git clone https://github.com/TakumiY235/uniprot-mcp-server.git
cd uniprot-mcp-server
3. Install dependencies:
# Using uv (recommended)
uv pip install -r requirements.txt
# Or using pip
pip install -r requirements.txt
Configuration
Add to your Claude Desktop config file:
- Windows: %APPDATA%\Claude\claude_desktop_config.json
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"uniprot": {
"command": "uv",
"args": ["--directory", "path/to/uniprot-mcp-server", "run", "uniprot-mcp-server"]
}
}
}
Usage Examples
After configuring the server in Claude Desktop, you can ask questions like:
Can you get the protein information for UniProt accession number P98160?
For batch queries:
Can you get and compare the protein information for both P04637 and P02747?
API Reference
Tools
1. get_protein_info
- Get information for a single protein
- Required parameter: accession (UniProt accession number)
- Example response:
{
"accession": "P12345",
"protein_name": "Example protein",
"function": ["Description of protein function"],
"sequence": "MLTVX...",
"length": 123,
"organism": "Homo sapiens"
}
2. get_batch_protein_info
- Get information for multiple proteins
- Required parameter: accessions (array of UniProt accession numbers)
- Returns an array of protein information objects
Development
Setting up development environment
1. Clone the repository
2. Create a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
3. Install development dependencies:
pip install -e ".[dev]"
Running tests
pytest
Code style
This project uses:
- Black for code formatting
- isort for import sorting
- flake8 for linting
- mypy for type checking
- bandit for security checks
- safety for dependency vulnerability checks
Run all checks:
black .
isort .
flake8 .
mypy .
bandit -r src/
safety check
Technical Details
- Built using the MCP Python SDK
- Uses httpx for async HTTP requests
- Implements caching with 24-hour TTL using an OrderedDict-based cache
- Handles rate limiting and retries
- Provides detailed error messages
Error Handling
The server handles various error scenarios:
- Invalid accession numbers (404 responses)
- API connection issues (network errors)
- Rate limiting (429 responses)
- Malformed responses (JSON parsing errors)
- Cache management (TTL and size limits)
Contributing
We welcome contributions! Please feel free to submit a Pull Request. Here's how you can contribute:
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'Add some amazing feature')
4. Push to the branch (git push origin feature/amazing-feature)
5. Open a Pull Request
Please make sure to update tests as appropriate and adhere to the existing coding style.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- UniProt for providing the protein data API
- Anthropic for the Model Context Protocol specification
- Contributors who help improve this project
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



