bio-data-retrieval-service-uniprot
Interface for querying the comprehensive UniProt repository to obtain detailed protein attributes, including molecular sequences, functional descriptions, and structural coordinates. Designed for seamless interoperability within MCP-enabled intelligent systems for advanced biological modeling.
Author

vitamin3615
Quick Info
Actions
Tags
UniProt Data Access Agent for Model Context Protocol (MCP)
This implementation serves as an MCP endpoint, providing sophisticated language models and associated AI frameworks (like Claude Desktop) with programmatic access to the vast information contained within the UniProt knowledgebase.
Core Capabilities
- Targeted Protein Lookup: Execute complex searches against UniProt using identifiers, nomenclature, or descriptive terms.
- Attribute Extraction: Securely retrieve granular data points pertaining to any given protein entity.
- Sequence Retrieval: Obtain the canonical primary amino acid sequence.
- Functional Annotation Fetching: Download associated Gene Ontology (GO) terms and metabolic pathway information.
- Structural Data Linkage: Identify and report references to solved three-dimensional molecular structures (e.g., PDB entries).
Deployment Guide
-
Source Acquisition:
bash git clone https://github.com/yourusername/uniprot-mcp-server.git cd uniprot-mcp-server -
Environment Setup (Recommended):
bash python -m venv execution_env source execution_env/bin/activate # Linux/macOS . execution_env\Scripts\activate # Windows PowerShell -
Dependency Resolution:
bash pip install -r requirements.txt
Integration with Local AI Environments (e.g., Claude Desktop)
-
Ensure the primary execution file is executable:
bash chmod +x server.py -
Modify the configuration file used by your local AI client. The location varies by operating system:
macOS/Linux Path Modification:
bash code ~/Library/Application\ Support/Claude/claude_desktop_config.jsonWindows Path Modification:
powershell code $env:AppData\Claude\claude_desktop_config.json -
Insert or update the server definition within the
mcpServersblock, ensuring the path points precisely to your deployedserver.py:json { "mcpServers": { "uniprot_access": { "command": "python", "args": [ "/ABSOLUTE/PATH/TO/uniprot-mcp-server/server.py" ] } } } -
A full restart of the Claude Desktop application is required for the new tool endpoint to be recognized.
Operational Examples
After successful provisioning, the model can issue requests such as:
- "Query protein targets implicated in neurodegenerative pathways like Alzheimer's."
- "Deliver the complete primary structure for accession P05067 (APP)."
- "Summarize the known biochemical roles and pathways for the TP53 gene product."
- "Identify any resolved macromolecular structures associated with the BRCA1 protein."
Development and Verification
To initiate the service for local debugging:
python server.py
Quality Assurance Utilities
These scripts validate the service readiness and external connectivity:
1. Service Operational Check
Confirms successful initialization of the MCP server instance:
python server_health_check.py
2. External API Validation
Tests bidirectional communication with the live UniProt data sources to ensure all expected request methods function correctly:
python test_server.py
Execute the QA routines prior to production use to guarantee correct configuration.
Governance
License: MIT
Contribution Guidelines
We welcome community enhancements. To submit improvements:
- Fork the main repository.
- Establish a dedicated feature branch (e.g.,
git checkout -b enhancement/faster-lookup). - Commit all modifications (
git commit -m 'Implement performance boost for sequence fetch'). - Push the branch to your fork (
git push origin enhancement/faster-lookup). - Open a formal Pull Request against the primary branch.
