STRING Database MCP Server

org.string-db由 string-db.org 發布官方發布者v1.13.1更新於 Oct 30, 2026

Query STRING interactions, enrichment, annotations, homology, and PPI networks.

已驗證Streamable HTTP可網頁執行資料與分析AI 與機器學習

概覽

AI 產生的概覽

STRING 資料庫官方伺服器,讓助理解析蛋白質識別碼、查詢交互作用、進行富集分析並產生蛋白質交互作用網路。

可以做什麼
  • 將蛋白質識別碼解析為 STRING 中繼資料,並查詢物種或 NCBI 分類學 ID
  • 取得交互作用夥伴、查詢集合內的交互作用、證據連結以及跨物種同源相似度
  • 對交互作用網路進行分群與視覺化,回傳圖片與互動式網路連結
  • 執行功能富集與蛋白質交互作用富集分析,並取得富集圖
  • 取得整理好的功能註解,依詞彙、疾病或路徑查找相關蛋白質
  • 依胺基酸序列檢索,並將結果建立為可下載檔案
適用情境
適合需要依據 STRING 回答蛋白質交互作用、功能富集、同源性與註解問題,並產生網路圖或可匯出結果檔案供分析報告使用的場合。
執行需求
遠端端點 mcp.string-db.org,未宣告需要驗證。自行架設需 Python 3.11 以上版本、所列相依套件(FastMCP、mcp、httpx、pydantic),以及指向 STRING API 的設定檔;亦支援 Docker。
安裝前請注意
結果來自 STRING 資料庫及其 API,查詢內容與識別碼會傳送給 STRING。檔案建立工具會產生可下載的輸出,網路相關工具會回傳外部圖片與互動式連結。不需要任何憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 STRING Database MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/org.string-db%2Fstring-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "string-database": {
      "type": "http",
      "url": "https://mcp.string-db.org/"
    }
  }
}

README

Official STRING Database MCP Server

[MCP Queen operational grade] [Glama score]

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.)

Requirements

  • Python ≥ 3.11 (with Python 3.10, optional parameter descriptions are misplaced in the tool schemas)
  • Dependencies (see requirements.txt):
    • fastmcp==2.14.7
    • mcp==1.29.0
    • httpx>=0.28,<0.29
    • pydantic>=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:

json
{  "base_url": "https://string-db.org",  "server_port": 57416,  "verbosity": "low"}

Installation

bash
git clone https://github.com/meringlab/string-mcp.gitcd string-mcppip install -r requirements.txt

Running

python server.py

To serve over standard input/output instead of HTTP, for example when a local MCP client starts the server itself:

python server.py --stdio

The stdio mode also reads config/server.config for the STRING API endpoint.

Testing

bash
curl -v -H "Accept: text/event-stream" http://localhost:[port]/mcp

You 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

  1. Ensure you have a config/server.config file (copy from config/server.config.example if needed):

    bash
    cp config/server.config.example config/server.config
  2. Build the image:

    bash
    docker build -t string-mcp .
  3. Run the container:

    Linux/macOS:

    bash
    docker run -p 57416:57416 -v $(pwd)/config:/app/config:ro string-mcp

    Windows PowerShell:

    powershell
    docker run -p 57416:57416 -v ${PWD}/config:/app/config:ro string-mcp

    Windows Command Prompt:

    cmd
    docker run -p 57416:57416 -v %cd%/config:/app/config:ro string-mcp

    To run in detached mode:

    bash
    # Linux/macOSdocker run -d -p 57416:57416 -v $(pwd)/config:/app/config:ro --name string-mcp-server string-mcp
    # Windows PowerShelldocker run -d -p 57416:57416 -v ${PWD}/config:/app/config:ro --name string-mcp-server string-mcp

    The -v flag 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.

  4. Stop the container (if running in detached mode):

    bash
    docker stop string-mcp-serverdocker 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.

來源:README.md,提交 8872a28

工具

17

string_resolve_proteins

STRING: Resolves protein identifiers to metadata

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"

輸入參數speciesproteins必填show_sequence

string_interactions_query_set

STRING: Get interactions within query set

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)

輸入參數speciesproteins必填network_typeextend_networknetwork_flavorrequired_score

string_all_interaction_partners

STRING: Get all interaction partners for proteins

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)

輸入參數speciesidentifiers必填network_typenetwork_flavorrequired_score

string_visual_network

STRING: Get interaction network image (image URL)

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.

輸入參數speciesproteins必填network_typeextend_networknetwork_flavorrequired_scorecenter_node_labelsdo_not_show_structureshide_disconnected_nodes

string_network_clustering

STRING: Perform network clustering

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_score` parameter 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.

輸入參數speciesproteins必填network_typeextend_networknetwork_flavorrequired_scorecenter_node_labelsshow_cluster_namescluster_aware_layoutclustering_algorithmclustering_parameterhide_disconnected_nodes另有 1 個

string_homology

STRING: Get homologs in specified target species

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.

輸入參數speciesproteins必填species_b

string_interaction_evidence

STRING: Get links to interaction evidence pages

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 `%0d` - **species**: NCBI taxonomy ID (e.g. `9606` for human or `10090` for mouse) - **network_type**: Set to `physical` for physical evidence or `regulatory` for 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?"

輸入參數speciesidentifier_a必填network_typeidentifiers_b必填

string_enrichment

STRING: Functional enrichment analysis

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_category` to 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. Use `string_functional_annotation` with the same proteins/species and `detail_for_term` set 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) - descripti

輸入參數speciesproteins必填expand_category

string_functional_annotation

STRING: Retrieve functional annotations for proteins

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

輸入參數speciesidentifiers必填detail_for_term

string_enrichment_image_url

STRING: Get enrichment result figure (image URL)

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 `category` to 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.

輸入參數x_axisspeciescategorygraph_typeidentifiers必填color_palettegroup_by_similaritynumber_of_terms_shown

string_ppi_enrichment

STRING: Protein–protein interaction (PPI) enrichment

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"

輸入參數speciesidentifiers必填required_score

string_proteins_for_term

STRING: Retrieve proteins associated with a functional term

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_term` is set - stringIds: STRING protein identifiers when returned - preferredNames_omitted: True when a row omits the protein-name list - stringIds_omitted: True when STRING identifiers are omitted

輸入參數speciesterm_text必填detail_for_term

string_query_species

STRING: Query species and clades in STRING

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'**.

輸入參數species_text必填

string_create_file

STRING: Create a downloadable STRING result file

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.

輸入參數content必填filename必填

string_help

STRING: Help / FAQ

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)

輸入參數topic

版本歷史

2
  1. v1.13.1最新Oct 30, 2026
  2. v1.0.0Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 String-Db 整合