UniProt MCP Server
A Model Context Protocol (MCP) server that provides seamless access to UniProtKB protein data. Query protein entries, sequences, Gene Ontology annotations, and perform ID mappings through a typed, resilient interface designed for LLM agents.
⨠Features
š Dual Transport: Stdio for local development and Streamable HTTP for remote deployments
š Rich Data Access: Fetch complete protein entries with sequences, features, GO annotations, cross-references, and taxonomy
š Advanced Search: Full-text search with filtering by review status, organism, keywords, and more
š ID Mapping: Convert between 200+ database identifier types with progress tracking
š”ļø Production Ready: Automatic retries with exponential backoff, CORS support, Prometheus metrics
š Typed Responses: Structured Pydantic models ensure data consistency
šÆ MCP Primitives: Resources, tools, and prompts designed for agent workflows
š Quick Start
Installation
Run the Server
Local development (stdio):
Remote deployment (HTTP):
The HTTP server provides:
MCP endpoint:
http://localhost:8000/mcpHealth check:
http://localhost:8000/healthzMetrics:
http://localhost:8000/metrics(Prometheus format)
Test with MCP Inspector
š MCP Primitives
Resources
Access static or dynamic data through URI patterns:
URI | Description |
| Raw UniProtKB entry JSON for any accession |
| Documentation for search query syntax |
Tools
Execute actions and retrieve typed data:
Tool | Parameters | Returns | Description |
|
,
|
| Fetch complete protein entry with all annotations |
|
|
| Get protein sequence with length and metadata |
|
,
,
,
,
,
|
| Full-text search with advanced filtering |
|
,
,
|
| Convert identifiers between 200+ databases |
|
,
,
|
| Retrieve historical entry versions (txt/fasta) |
Progress tracking: map_ids reports progress (0.0 ā 1.0) for long-running jobs.
Prompts
Pre-built templates for common workflows:
Summarize Protein: Generate a structured summary from a UniProt accession, including organism, function, GO terms, and notable features.
š§ Configuration
Environment Variables
Variable | Default | Description |
| unset | Request minimal field subsets to reduce payload size |
|
| Logging level:
,
,
,
|
|
| Log format:
or
|
|
| Max concurrent UniProt API requests |
|
| HTTP server bind address |
|
| HTTP server port |
|
| Uvicorn log level |
|
| Enable auto-reload:
or
|
|
| CORS allowed origins (comma-separated) |
|
| CORS allowed methods |
|
| CORS allowed headers |
CLI Flags
š Usage Examples
Fetching a Protein Entry
Searching for Proteins
Mapping Identifiers
š ļø Development
Prerequisites
Python 3.11 or 3.12
uv (recommended) or pip
Setup
Running Tests
Code Quality
Local Development Server
šļø Architecture
š¦ Publishing
This server is published to:
PyPI: uniprot-mcp
MCP Registry: io.github.josefdc/uniprot-mcp
Building and Publishing
See docs/registry.md for detailed registry publishing instructions.
š¤ Contributing
Contributions are welcome! Please:
Read our Contributing Guidelines
Follow our Code of Conduct
Check the Security Policy for vulnerability reporting
Review the Changelog for recent changes
Quick start for contributors:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes with tests
Run quality checks:
uv tool run ruff check . && uv tool run mypy src && uv run pytestCommit using Conventional Commits (
feat:,fix:,docs:, etc.)Push and open a Pull Request
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgments
UniProt Consortium: For providing comprehensive, high-quality protein data through their REST API
Anthropic: For the Model Context Protocol specification and Python SDK
Community: For feedback, bug reports, and contributions
š Links
Documentation: GitHub Repository
UniProt API: REST API Documentation
MCP Specification: Model Context Protocol
Issues & Support: GitHub Issues
ā ļø Disclaimer
This is an independent project and is not officially affiliated with or endorsed by the UniProt Consortium. Please review UniProt's terms of use when using their data.
Built with ā¤ļø for the bioinformatics and AI communities
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Provides seamless access to UniProtKB protein database, enabling queries for protein entries, sequences, Gene Ontology annotations, full-text search, and ID mapping across 200+ database types.