A Model Context Protocol (MCP) server for accessing the UniProt protein database API. This server enables LLMs like Claude to retrieve information about proteins and proteomics data directly from UniProt.
The UniProt MCP server provides a bridge between LLMs and the UniProt REST API, allowing Claude and other LLMs to:
- Retrieve detailed protein information by accession number
- Search for proteins by keywords, genes, or organisms
- Get protein sequences in FASTA format
- Access proteomics data such as domains, variants, and post-translational modifications
- Python 3.10 or higher
- Claude for Desktop (for easy integration) or another MCP client
- Clone this repository:
git clone https://github.com/yourusername/UniProt-MCP.git
cd UniProt-MCP- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install the dependencies:
pip install -e '.[dev]'To run the UniProt MCP server in development mode:
# Run with stdio transport (for Claude Desktop)
python -m mcp_server --stdio
# Or run as an HTTP server
python -m mcp_server --transport http --host 127.0.0.1 --port 8000-
Make sure you have Claude for Desktop installed and updated to the latest version.
-
Configure Claude for Desktop to use the UniProt MCP server by editing the configuration file:
# macOS
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Windows
code %APPDATA%\Claude\claude_desktop_config.json- Add the UniProt server to the configuration:
{
"mcpServers": {
"uniprot": {
"command": "python",
"args": [
"-m",
"mcp_server",
"--stdio"
]
}
}
}- Restart Claude for Desktop and look for the hammer icon to verify your server is available.
Retrieves detailed information about a protein by its UniProt accession number.
Example in Claude:
Can you please get information about the insulin protein with accession P01308?
Searches for proteins matching a given query.
Example in Claude:
Search UniProt for proteins related to "BRCA1 cancer" and show me the top 5 results.
Retrieves the amino acid sequences for one or more proteins in FASTA format.
Example in Claude:
Get the protein sequence for P01308 (human insulin).
Retrieves proteomics data such as domains, variants, or post-translational modifications.
Example in Claude:
What are the domain features of the BRCA1 protein (P38398)?
The UniProt MCP server uses the UniProt REST API to fetch data. For more details on the underlying API, refer to the official UniProt API documentation.
Run the test suite to verify the implementation:
pytestYou can also use the included test client to manually test the server:
python test_client.pyThis server includes Smithery configuration for easy deployment. See the Smithery documentation for deployment details.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.