Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@STRING-MCPshow me the interaction network for human proteins TP53 and BRCA1"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
STRING-MCP
A comprehensive Python package for interacting with the STRING database API through a Model Context Protocol (MCP) bridge.
Installation
Install the package in development mode:
Or install from PyPI (when available):
Claude config
Usage
MCP Server (Primary Use Case)
The package provides an MCP server for integration with MCP-compatible clients:
The MCP server provides the following tools:
map_identifiers: Map protein identifiers to STRING IDs
get_network_interactions: Get network interactions data
get_functional_enrichment: Perform functional enrichment analysis
get_network_image: Generate network visualization images
get_version_info: Get STRING database version information
Command Line Interface
The package also provides a string-mcp command for standalone usage:
Python API
Features
Protein Identifier Mapping: Convert various protein identifiers to STRING IDs
Network Analysis: Retrieve protein-protein interaction networks
Functional Enrichment: Perform gene ontology and pathway enrichment analysis
Network Visualization: Generate network images in various formats
Interaction Partners: Find all interaction partners for proteins
Functional Annotations: Get detailed functional annotations
Protein Similarity: Calculate similarity scores between proteins
PPI Enrichment: Test for protein-protein interaction enrichment
MCP Integration: Full Model Context Protocol server implementation
API Methods
Core Methods
map_identifiers(): Map protein identifiers to STRING IDsget_network_interactions(): Get network interaction dataget_network_image(): Generate network visualization imagesget_interaction_partners(): Find all interaction partnersget_functional_enrichment(): Perform enrichment analysisget_functional_annotation(): Get functional annotationsget_protein_similarity(): Calculate similarity scoresget_ppi_enrichment(): Test for PPI enrichmentget_version_info(): Get STRING database version
Configuration
The package uses a StringConfig class for configuration:
Output Formats
The package supports multiple output formats:
JSON: Structured data (default)TSV: Tab-separated valuesXML: XML formatIMAGE: Network visualization imagesSVG: Scalable vector graphicsPSI_MI: PSI-MI format
Species Support
The package supports all species available in STRING. Common species IDs:
Human: 9606
Mouse: 10090
Rat: 10116
Yeast: 4932
E. coli: 511145
MCP Server Configuration
To use the MCP server with an MCP client, configure it as follows:
The server will automatically handle:
JSON-RPC communication
Tool discovery and invocation
Error handling and reporting
Base64 encoding for image data
Development
Setup Development Environment
Note: Test files are not currently included in this repository. To add tests, create a tests/ directory and add test files following the pytest configuration in pyproject.toml.
Project Structure
License
MIT License - see LICENSE file for details.
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests
Run the test suite
Submit a pull request
Support
For issues and questions, please use the GitHub issue tracker.
Example Usage
Complete DNA Repair Protein Analysis
This example demonstrates the comprehensive functionality of the STRING-DB MCP bridge by analyzing a set of well-known human DNA repair proteins: TP53, BRCA1, BRCA2, ATM, and ATR.
2. Protein Identifier Mapping
Map gene symbols to STRING identifiers:
3. Protein-Protein Interaction Network
Examine network interactions between these proteins:
Key Findings: All interactions show very high confidence scores (>0.8), with most exceeding 0.99, indicating these proteins form a tightly interconnected functional module.
4. Network Statistics
Check if this network is significantly enriched for interactions:
Statistical Significance: The network shows perfect clustering (coefficient = 1.0) and is significantly enriched for interactions (p = 0.0122), with twice as many edges as expected by chance.
5. Functional Enrichment Analysis
Analyze which biological pathways are enriched in this protein set:
Top DNA Repair Pathways (Selected Results):
Disease Associations:
The package can generate protein interaction network visualizations showing evidence-based functional associations.
Example Network Visualization: View Protein Interaction Network
This visualization shows the protein-protein interaction network for TP53, BRCA1, BRCA2, ATM, and ATR with high-confidence interactions (score ≥ 400).
7. Functional Enrichment Visualization
The package can also create enrichment scatter plots showing the most significantly enriched biological processes.
Example Enrichment Visualization: View Functional Enrichment Plot
This visualization displays the top 10 most significantly enriched biological processes and pathways for the DNA repair protein set, showing p-values and gene counts for each enriched term.
Summary
This comprehensive analysis demonstrates that the STRING-DB MCP bridge successfully:
Identified all 5 DNA repair proteins with detailed annotations
Discovered 10 high-confidence protein interactions (all >0.8 score)
Revealed significant pathway enrichments with p-values < 1e-8
Confirmed statistical significance of the network (p = 0.0122)
Generated both network and enrichment visualizations
The results validate these proteins as a core DNA damage response module, with exceptionally strong enrichment for:
Cellular response to ionizing radiation (p = 1.52e-8)
DNA damage signaling (p = 1.32e-7)
Homologous recombination (p = 2.8e-5)
p53 signaling pathway (p = 5.44e-5)
Breast cancer associations (p = 2.02e-6)v This showcases the complete functionality of the STRING-DB MCP bridge for protein interaction network analysis and functional annotation.