Official STRING Database MCP Server
Access STRING database functionality for protein interaction, enrichment, and annotation analysis through MCP tools.
Resolve protein identifiers to STRING metadata
Retrieve interaction networks within a query set or all partners
Generate network images, interactive links, and clustering results
Find homologs across species
Get interaction evidence links
Run functional enrichment and PPI enrichment
Retrieve functional annotations and proteins for a term
Search proteins by amino acid sequence
Query species/clades and create downloadable result files
Get help/FAQ on STRING features and limitations
Click on "Deploy 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., "@Official STRING Database MCP Server find interactions for human TP53"
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.
Official STRING Database MCP Server
Exposes STRING database functionality as a Model Context Protocol (MCP) server.
This implementation allows AI agents and other MCP-compatible clients to access STRING data through a structured and self-describing interface.
It is built on top of the STRING API but adapted specifically for model-based use, with emphasis on conciseness and context efficiency. The server controls the amount and type of data so that responses stay within the reasoning limits of large language models. It also adapts the structure and adds metadata to support more consistent parsing and interpretation by agentic systems.
The server is also available as a hosted remote MCP endpoint at https://mcp.string-db.org.
For a live demonstration of MCP capabilities, see STRING Chat.
For reproducible workflows and large-scale integration, use the STRING API.
For agentic workflows, use the optional agent skill at skills/string-database/SKILL.md.
Features
Resolve protein identifiers to STRING metadata
Retrieve interaction networks
Cluster and visualize interaction networks
Perform homology lookups across species
Access evidence links for protein–protein interactions
Run functional enrichment analysis (including enrichment plots)
Get curated functional annotations for proteins
Query proteins by function or disease (GO, KEGG, Reactome, DISEASES etc.)
Related MCP server: STRING-MCP
Requirements
Python ≥ 3.11 (with Python 3.10, optional parameter descriptions are misplaced in the tool schemas)
Dependencies (see
requirements.txt):fastmcp==2.14.7mcp==1.29.0httpx>=0.28,<0.29pydantic>=2.11,<3.0
Note: If the server crashes on startup, it is very likely due to an incompatible FastMCP version.
Configuration
The server reads settings from config/server.config (JSON). Example:
{
"base_url": "https://string-db.org",
"server_port": 57416,
"verbosity": "low"
}Installation
git clone https://github.com/meringlab/string-mcp.git
cd string-mcp
pip install -r requirements.txtRunning
python server.pyTo serve over standard input/output instead of HTTP, for example when a local MCP client starts the server itself:
python server.py --stdioThe stdio mode also reads config/server.config for the STRING API endpoint.
Testing
curl -v -H "Accept: text/event-stream" http://localhost:[port]/mcpYou should see a 200 OK response with content-type: text/event-stream.
Note: HTTP requests sent with default headers will trigger anyio.ClosedResourceError and 406 Not Acceptable. This is expected behavior for the MCP streaming protocol and does not indicate a problem.
Docker
Ensure you have a
config/server.configfile (copy fromconfig/server.config.exampleif needed):cp config/server.config.example config/server.configBuild the image:
docker build -t string-mcp .Run the container:
Linux/macOS:
docker run -p 57416:57416 -v $(pwd)/config:/app/config:ro string-mcpWindows PowerShell:
docker run -p 57416:57416 -v ${PWD}/config:/app/config:ro string-mcpWindows Command Prompt:
docker run -p 57416:57416 -v %cd%/config:/app/config:ro string-mcpTo run in detached mode:
# Linux/macOS docker run -d -p 57416:57416 -v $(pwd)/config:/app/config:ro --name string-mcp-server string-mcp # Windows PowerShell docker run -d -p 57416:57416 -v ${PWD}/config:/app/config:ro --name string-mcp-server string-mcpThe
-vflag mounts your local config directory so you can customize settings without rebuilding the image.Note: If you don't need to modify the config, you can omit the volume mount and the container will use the default config from the image.
Stop the container (if running in detached mode):
docker stop string-mcp-server docker rm string-mcp-server
Note: The Docker container will use the configuration from config/server.config. If this file doesn't exist, the container will copy from server.config.example on first run.
Frozen STRING releases are available under versioned paths: /12.0/ (STRING v12.0) and /12.5/ (STRING v12.5).
License / Citation
The STRING MCP server source code is released under the MIT License.
Associated data and outputs are released under the CC BY 4.0 License.
You are free to use, share, and modify the code with proper attribution.
If you use this code or data in your work, please also cite the latest STRING manuscript.
Available Tools
17 toolsstring_all_interaction_partnersSTRING: Get all interaction partners for proteinsAInspect
Retrieves all interaction partners for one or more proteins from STRING.
This tool returns all known interactions between your query protein(s) and any other proteins in the STRING database.
Use this when asking “What does TP53 interact with?”
It differs from
string_interactions_query_set, which only shows interactions within the input set or a limited extension of it.
You can filter for strong interactions using required_score.
Evidence scores:
nscore(neighborhood),fscore(fusion),pscore(phylogenetic profile),ascore(coexpression),escore(experimental),dscore(database),tscore(text mining)
Inputs: identifiers (required), species, network_type, network_flavor, +1 more. Returns: object
string_create_fileSTRING: Create a downloadable STRING result fileAInspect
Creates a downloadable file for STRING-derived results.
Use this tool when the user explicitly asks to download, save, export, or receive a file containing STRING data, tables, protein lists, enrichment results, networks, etc.
When a response would otherwise include a publication-style or supplementary result table, or another table clearly intended for reuse outside chat, mention that a downloadable TSV/CSV file can be generated on request. Ask whether they want the file, unless they already requested it. Do not create the file until the user asks for it.
Do not store unrelated data or full conversation transcripts.
Inputs: content (required), filename (required). Returns: object
string_enrichmentSTRING: Functional enrichment analysisAInspect
This tool retrieves functional enrichment for a set of proteins using STRING.
If queried with a single protein, the tool expands the query to include the protein’s 10 most likely interactors; enrichment is performed on this set, not the original single protein.
For two or more proteins, enrichment is performed on the exact input set.
When calling related tools, use the same input parameters unless otherwise specified.
Focus summaries on the top categories and most relevant terms for the results. Always report FDR for each claim.
Report FDR as a human-readable value (e.g. 2.3e-5 or 0.023).
IMPORTANT: Remember to suggest showing an enrichment graph for a specific category of user interest (e.g., GO, KEGG)
Very large responses are capped while preserving category diversity.
Use
expand_categoryto return only one category with expanded term coverage and per-term gene details.If a row has
preferredNames_omitted: true, do not infer which proteins are in that term from the returned rows. Usestring_functional_annotationwith the same proteins/species anddetail_for_termset to the exact term ID.
Output fields (per enriched term):
category: Term category (e.g., GO Process, KEGG pathway)
term: Enriched term (GO ID, domain, or pathway)
number_of_genes: Number of input genes with this term
number_of_genes_in_background: Number of background genes with this term
ncbiTaxonId: NCBI taxon ID
preferredNames: Canonical protein names, only when the full per-term list is short enough to show
proteinCount: Number of proteins matching this term
preferredNames_omitted: True when the gene list was omitted instead of showing a misleading partial list
p_value: Raw p-value
fdr: False Discovery Rate (B-H corrected p-value)
strength: Enrichment effect size, calculated as log10(observed genes / expected genes)
signal: Balanced enrichment-ranking metric combining the observed/expected ratio and -log(FDR)
description: Description of the enriched term
Response metadata:
input_gene_name_mapping: Only included when displayed gene lists contain submitted identifiers that differ from STRING preferred names.
category_summary: Total and returned term counts per category; use
expand_categoryfor categories wheretruncatedis true or where the user wants deeper category-specific detail.truncated_categories / omitted_categories: Categories with terms not shown in the current response.
Inputs: proteins (required), species, expand_category. Returns: object
string_enrichment_image_urlSTRING: Get enrichment result figure (image URL)AInspect
Retrieves a STRING enrichment figure (image URL) for a set of proteins. For the enriched terms and FDR values, use string_enrichment.
Each figure shows a single enrichment category; call again with another
categoryto show a different one.Use the same proteins and species as the network and enrichment results already shown to the user, so the figure matches them.
Inputs: identifiers (required), x_axis, species, category, +4 more. Returns: object
string_functional_annotationSTRING: Retrieve functional annotations for proteinsAInspect
This tool retrieves curated functional annotations for a set of proteins.
Each input protein is mapped to known biological terms from ontologies, pathway databases, tissues, compartments and domains — such as Gene Ontology (GO), KEGG, and UniProt Keywords.
Use this when the user asks what a protein does, where it's localized, expressed, or which pathways it participates in.
Keep the output short and focused by highlighting a few diverse and specific annotations for each protein.
This tool does not perform statistical enrichment — use the enrichment tool for that.
Output fields (per protein):
stringId: STRING protein identifier
preferredName: Gene name or alias
annotation: Functional description or keyword
category: Source category (e.g. GO, KEGG, Keyword)
term: Functional term or ID
Inputs: identifiers (required), species, detail_for_term. Returns: object
string_helpSTRING: Help / FAQAInspect
Provides explanatory text for STRING features and limitations.
Use this tool when the user question involves:
What is STRING is or how to use the tool (how_to_use_string, cytoscape)
functionality not available via MCP tools (e.g. GSEA or large datasets).
meaning of network edges and their visual encoding (network_edge_legend)
interpretation of enrichment strength and signal (enrichment_scores)
grouping of terms in enrichment figures (enrichment_grouping)
Inputs: topic. Returns: object
string_homologySTRING: Get homologs in specified target speciesAInspect
Retrieves pairwise protein similarity scores (Smith–Waterman bit scores) for the query proteins.
If no target species (
species_b) is provided, results are intra-species (within the query species).To retrieve homologs in other species or clades (e.g. vertebrates, yeast, plants), specify one or more NCBI taxon IDs in
species_b.Multiple target species are supported; ask the user to clarify if needed.
Always report species names together with their taxon IDs.
Bit scores < 50 are not reported.
Results are truncated to the top 50 proteins per input protein.
Inputs: proteins (required), species, species_b. Returns: object
string_interaction_evidenceSTRING: Get links to interaction evidence pagesAInspect
Retrieves direct links to STRING evidence pages for protein–protein interaction pairs.
Use this tool only when a STRING evidence page/link is needed. To determine whether
an interaction is supported, use string_interactions_query_set.
It returns URLs linking to STRING’s evidence pages, which display the underlying data sources
(experimental results, publications, and curated databases) supporting each predicted interaction.
A URL can be generated even for unsupported pairs; the URL is not itself an interaction verdict.
The returned page lets the user explore functional, physical, and regulatory relationship views through its tabs.
Parameters:
identifier_a: Query protein identifier (Protein A)
identifiers_b: One or more target protein identifiers (Protein B), separated by
%0dspecies: NCBI taxonomy ID (e.g.
9606for human or10090for mouse)network_type: Set to
physicalfor physical evidence orregulatoryfor directed regulatory evidence.
Typical user questions that should trigger this tool:
"Can you show me the STRING evidence for this interaction?"
"Show me the details supporting this interaction."
"What supports the interaction between TP53 and MDM2?"
"Where can I find the STRING evidence for this pair?"
Inputs: identifier_a (required), identifiers_b (required), species, network_type. Returns: object
string_interactions_query_setSTRING: Get interactions within query setAInspect
Retrieves the interactions between the query proteins. Use this method only when you specifically need to list the interactions between all proteins in your query set.
For a single protein, the network includes that protein and its top 10 most likely interaction partners, plus all interactions among those partners.
For multiple proteins, the network includes all direct interactions between them.
STRING does not store or report information about self-interactions/homomers; if asked, explain the limitation.
If few or no interactions are returned, consider reducing the required_score.
For large query sets (>50 proteins), consider increasing the required_score (e.g. ≥700)
to focus on high-confidence interactions and avoid overly dense networks.
Expand the names of score sources:
nscore(neighborhood),fscore(fusion),pscore(phylogenetic profile),ascore(coexpression),escore(experimental),dscore(database),tscore(text-mining)
Inputs: proteins (required), species, network_type, extend_network, +2 more. Returns: object
string_network_clusteringSTRING: Perform network clusteringAInspect
Performs network clustering on a STRING interaction network and returns a network image URL, an interactive STRING network URL, and details about each detected cluster.
Provide a table with each detected cluster’s color, STRING-derived functional description, and any returned features that distinguish it from the others.
Use the same parameters as in the network creation step to ensure consistency. If the network already contains disconnected subgraphs, the resulting number of clusters may differ from the requested value.
Inter-cluster edges are faded by default. Use inter_cluster_edge_visibility to select a different display style.
Notes:
For small queries (≤5 proteins), the
required_scoreparameter is automatically lowered to 0.If only a single cluster is produced, try increasing
required_score, adjusting the clustering parameter, or switching to a physical network for a sparser interaction map.
Inputs: proteins (required), species, network_type, extend_network, +9 more. Returns: object
string_network_linkSTRING: Get interactive network link (web UI)AInspect
Retrieves a stable URL to an interactive STRING network for one or more proteins.
For a single protein: includes the protein and its top 10 most likely interactors.
For multiple proteins: includes all known interactions within the query set.
The input may include one numeric value per protein, such as fold change, effect size, or score. These values are visualized as colored halos around the nodes, allowing overlay of protein-level measurements on the network.
Example: PTEN 2.1 SMO -1.3
If numeric values are provided:
positive values are shown in blue
negative values are shown in red
larger absolute values produce stronger halo intensity
If the user provides numeric values together with the proteins, preserve them in the query.
If few or no interactions are shown, consider lowering required_score.
For large queries (>100 proteins):
use
network_flavor="confidence"increase
required_score(e.g. 700)
Always display the link as a markdown hyperlink (hide the raw URL).
Input parameters should match those used in related STRING tools unless otherwise specified.
Inputs: proteins (required), species, network_type, extend_network, +3 more. Returns: object
string_ppi_enrichmentSTRING: Protein–protein interaction (PPI) enrichmentAInspect
This tool tests if your network is enriched in protein-protein interactions compared to the background proteome-wide distribution (i.e., if your proteins are more functionally connected than expected by chance).
The enrichment is assessed using the actual observed edges versus expected edges in a random network of the same size.
The p-value reflects the likelihood that your observed number of interactions would occur by chance.
Report the p-value as a human-readable value (e.g. 2.3e-5 or 0.023).
When calling related tools use the same input parameters unless otherwise specified.
Output fields:
number_of_nodes: Number of proteins in your network
number_of_edges: Number of observed edges/interactions
average_node_degree: Mean degree (average number of interactions per node)
local_clustering_coefficient: Average clustering coefficient in the network
expected_number_of_edges: Expected number of edges in a random network of the same size
p_value: p-value for network enrichment (smaller = more enriched)
Example identifiers: "SMO%0dTP53"
Inputs: identifiers (required), species, required_score. Returns: object
string_proteins_for_termSTRING: Retrieve proteins associated with a functional termAInspect
Retrieve proteins annotated with a functional term or descriptive text in a single species.
You can query for tissues, compartments, diseases, processes, pathways, and domains.
IMPORTANT: For cross-species comparisons, run this tool separately for each species.
Select relevant model organisms to search or ask user to provide the selection.
The results reflect annotation depth within each category; use caution when interpreting.
If no results are found, try simplifying the query.
For tissue queries, follow BRENDA tissue nomenclature and omit the word "tissue"
(e.g. use "skin" instead of "skin tissue").
Output fields:
category: Source database of the matched functional term (e.g. GO, KEGG, Reactome, Pfam, InterPro).
term: Exact identifier for the functional term.
description: The free text description of the term.
proteinCount: Number of proteins annotated with that term
preferredNames: Full protein-name list when
detail_for_termis setstringIds: STRING protein identifiers when returned
preferredNames_omitted: True when a row omits the protein-name list
stringIds_omitted: True when STRING identifiers are omitted
Inputs: term_text (required), species, detail_for_term. Returns: object
string_query_speciesSTRING: Query species and clades in STRINGAInspect
Search for species or clades available in STRING by free-text query and return their NCBI taxonomy IDs.
Use this when the user asks which species or clades are present in STRING, or when you need the correct NCBI taxon ID to pass to other tools.
use this to resolve NCBI taxons IDs to their scientific names.
Accepts up to 100 taxon IDs separated by
%0d.The results are limited to the top 50 matches per query.
When the user asks for a species list, do not list clades.
If the requested species cannot be matched (i.e. the correct species is not present in the results), immediately invoke the 'string_help' tool with topic='missing_species'.
Inputs: species_text (required). Returns: object
string_resolve_proteinsSTRING: Resolves protein identifiers to metadataAInspect
Maps one or more protein identifiers to their corresponding STRING metadata, including: gene symbol, description, sequence, domains, species, and internal STRING ID.
This method is useful for translating raw identifiers into readable, annotated protein entries.
Example input: "TP53%0dSMO"
Inputs: proteins (required), species, show_sequence. Returns: object
string_sequence_searchSTRING: Search proteins by amino acid sequenceAInspect
Searches the STRING database using amino acid sequences to identify matching proteins.
Accepts a single sequence or multiple sequences in FASTA format.
Returns the most similar STRING protein(s) for the specified species, based on sequence similarity.
Use this when the protein identifier is unknown or unresolvable by
string_resolve_proteins.
Inputs: sequences (required), species. Returns: object
string_visual_networkSTRING: Get interaction network image (image URL)AInspect
Retrieves a URL to a STRING interaction network image for one or more proteins.
For a single protein: includes the protein and its top 10 most likely interactors.
For multiple proteins: includes all known interactions within the query set.
The input may include one numeric value per protein, such as fold change, effect size, or score. These values are visualized as colored halos around the nodes, allowing overlay of protein-level measurements on the network.
Example: PTEN 2.1 SMO -1.3
If numeric values are provided:
positive values are shown in blue
negative values are shown in red
larger absolute values produce stronger halo intensity
If the user provides numeric values together with the proteins, preserve them in the query.
If few or no interactions are shown, consider lowering required_score.
For large queries (>100 proteins):
use
network_flavor="confidence"increase
required_score(e.g. 700)
Always ask if the user also wants a link to the interactive STRING network page.
Input parameters should match those used in related STRING tools (e.g. string_interactions_query_set), unless otherwise specified.
Inputs: proteins (required), species, network_type, extend_network, +5 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools have clearly distinct purposes, but several adjacent pairs (visual_network vs network_link, interactions_query_set vs all_interaction_partners, enrichment vs ppi_enrichment) share similar inputs and could be confused when the user's wording is vague. The descriptions clarify boundaries well enough to avoid major misselection.
All names use a consistent string_ snake_case prefix and are readable, but many are noun phrases (string_visual_network, string_enrichment) rather than following a uniform verb_noun pattern. The style is still predictable with only minor deviations.
17 tools is slightly heavy but reasonable for STRING's broad functionality: identifier resolution, interactions, visualization, enrichment, homology, species lookup, export, and help. Each tool appears to cover a distinct capability rather than being redundant.
The surface covers STRING's main workflows, including species lookup, protein resolution, sequence search, interaction retrieval, network visualization/link/clustering, evidence lookup, functional annotation, functional and PPI enrichment, term lookup, file export, and help. No obvious domain gap is apparent, though some visualization and enrichment tools are closely related.
Maintenance
Related MCP Connectors
STRING-DB MCP — protein-protein interaction networks.
MCP server for AI access to Swagger by SmartBear.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceA comprehensive Model Context Protocol (MCP) server for accessing the STRING protein interaction database. This server provides powerful tools for protein network analysis, functional enrichment, and comparative genomics through the STRING API.64MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides tools for interacting with the STRING database to analyze protein-protein interaction networks and functional enrichment. It enables users to map protein identifiers, retrieve interaction data, and generate biological network visualizations through natural language interfaces.114BSD 3-Clause
- AlicenseAqualityAmaintenanceAn MCP server that gives AI assistants access to biological and biomedical RDF databases via SPARQL at the RDF Portal, as well as selected REST APIs (NCBI E-utilities, UniProt, ChEMBL, PDB, Reactome, Rhea, MeSH, and more).23322MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for querying gene annotations, full-text gene search, and species taxonomy via MyGene.info. Enables AI agents to access gene data through natural language questions.70 npmMIT