Skip to main content
Glama

foldseek-mcp

独立的 FastMCP 服务端,用 MCP 工具封装 FoldSeek easy-search

本项目面向 ProteinMCP / Claude / Agent Runtime 使用。MCP 负责参数校验、路径安全、Docker/FoldSeek 调用、结果解析、日志、artifact、command.jsonmanifest.json 记录。

MCP Tools

  • foldseek_search_structure:用 PDB/mmCIF 结构文件搜索官方 FoldSeek 数据库。

  • foldseek_search_sequence:用 FASTA 文本或 FASTA 文件搜索结构数据库。

  • foldseek_list_databases:列出已安装数据库、可用官方数据库、模型状态和 Agent 建议。

  • foldseek_download_database:显式下载官方 FoldSeek 数据库。

  • foldseek_validate_environment:检查 Docker/FoldSeek、数据库目录、模型目录和运行目录。

Related MCP server: ESMfold MCP Server

默认数据库策略

默认官方数据库 alias:

afdb_uniprot50_minimal

对应 FoldSeek 官方数据库名:

Alphafold/UniProt50-minimal

注意:该官方库约 114GB,不会在普通安装时静默下载。需要显式确认后下载,或由外部流程提前下载好并挂载/配置给 MCP。

不再把自建 fixture 数据库作为默认科学搜索数据库。fixture 只能用于链路 smoke test,不能替代官方数据库。

推荐部署方式

大型 FoldSeek 数据库不要打进 MCP Docker 镜像。推荐:

  • MCP 镜像只包含运行环境、FoldSeek runtime、MCP 代码。

  • 官方数据库放在服务器持久化目录。

  • 运行时通过 volume 或环境变量挂载。

示例目录:

/opt/mgi/foldseek-mcp/
/data/foldseek/databases/afdb_uniprot50_minimal/
/data/foldseek/models/
/data/foldseek/runs/

如果你先在 Windows 下载到 E:\download\foldseek,服务器上可以拷贝成:

/data/foldseek/databases/afdb_uniprot50_minimal/

然后设置:

FOLDSEEK_MCP_DATABASE_ROOT=/data/foldseek/databases
FOLDSEEK_MCP_MODEL_ROOT=/data/foldseek/models
FOLDSEEK_MCP_RUN_ROOT=/data/foldseek/runs
FOLDSEEK_MCP_BACKEND=docker
FOLDSEEK_MCP_DOCKER_IMAGE=openeuler/foldseek:10-941cd33-oe2403sp3
FOLDSEEK_MCP_AUTO_DOWNLOAD=false

数据库 prefix 应为:

<DATABASE_ROOT>/afdb_uniprot50_minimal/afdb_uniprot50_minimal

下载官方数据库

通过 MCP 工具下载时,需要显式确认大体积下载:

{
  "database": "afdb_uniprot50_minimal",
  "confirm_large": true
}

也可以直接用 Docker 下载到外部目录:

$ROOT = "E:\download\foldseek"
New-Item -ItemType Directory -Force -Path "$ROOT\databases\afdb_uniprot50_minimal\tmp"

docker pull openeuler/foldseek:10-941cd33-oe2403sp3

docker run --rm `
  -v "${ROOT}:/data" `
  openeuler/foldseek:10-941cd33-oe2403sp3 `
  foldseek databases "Alphafold/UniProt50-minimal" `
  /data/databases/afdb_uniprot50_minimal/afdb_uniprot50_minimal `
  /data/databases/afdb_uniprot50_minimal/tmp `
  --threads 8

安装

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

或:

bash quick_setup.sh

Windows 默认使用 Docker 后端。如果 Docker Desktop 未启动,MCP 会返回结构化错误 docker_unavailable,提示用户启动 Docker。

运行

python -m foldseek_mcp.server

Local-first remote fallback

Search tools use local-first, remote-fallback:

  1. If the requested database is installed or mounted locally, MCP runs local foldseek easy-search.

  2. If the local database is missing and FOLDSEEK_MCP_REMOTE_FALLBACK=true, MCP calls the official Foldseek Web API.

  3. If the remote API also fails, MCP returns a structured error with a local database remediation hint.

Remote fallback configuration:

FOLDSEEK_MCP_REMOTE_FALLBACK=true
FOLDSEEK_MCP_REMOTE_BASE_URL=https://search.foldseek.com
FOLDSEEK_MCP_REMOTE_TIMEOUT_SECONDS=900
FOLDSEEK_MCP_REMOTE_POLL_INTERVAL_SECONDS=2.0

Remote alias mapping:

afdb_uniprot50_minimal -> afdb50
afdb_swissprot -> afdb-swissprot
afdb_proteome -> afdb-proteome
pdb -> pdb100
cath50 -> cath50

search.foldseek.com is suitable as a free fallback path, but it is a public web server API rather than a production SLA service. For reproducibility, compliance, or private structures, mount local databases and set:

FOLDSEEK_MCP_REMOTE_FALLBACK=false

Artifacts

每次搜索会创建:

runs/jobs/<job_id>/
  query.pdb 或 query.fasta
  results.tsv
  results.json
  stdout.log
  stderr.log
  command.json
  manifest.json

manifest.json 记录 query hash、数据库 alias、数据库 path/prefix、FoldSeek 版本、命令参数、时间戳、状态和 artifact 路径。

常见错误

  • docker_unavailable:Windows Docker 后端不可用,启动 Docker Desktop 后重试。

  • docker_image_missing:本地没有 FoldSeek Docker 镜像,运行 quick_setup.shdocker pull openeuler/foldseek:10-941cd33-oe2403sp3

  • auto_download_limit_exceeded:官方库体积超过自动下载阈值,需要显式 confirm_large=true

  • database_missing:官方数据库未下载或未挂载到 FOLDSEEK_MCP_DATABASE_ROOT

  • foldseek_nonzero_exit:FoldSeek 命令执行失败,查看该 job 的 stderr.logcommand.json

Available Tools

5 tools
foldseek_download_databaseC

Download or prepare a catalog-listed FoldSeek database.

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYes
confirm_largeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits. It only mentions 'download or prepare', lacking details on network requirements, destructive potential, or permission needs. This is insufficient for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise. However, it under-delivers on informativeness; while there is no fluff, the brevity sacrifices necessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has two parameters, no annotations, and an output schema (not described), the description is incomplete. It fails to cover parameter semantics, usage context, or behavioral traits, leaving significant gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description provides no explanation of the 'database' string parameter or the 'confirm_large' boolean. The agent cannot infer what values are valid or how to use them.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'download' or 'prepare' and the resource 'catalog-listed FoldSeek database', distinguishing it from sibling tools that list, search, or validate. However, 'prepare' is somewhat ambiguous, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., foldseek_list_databases). Description implies use for downloading but does not specify prerequisites or conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

foldseek_list_databasesA

List installed and available FoldSeek databases and model resources.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. 'List' implies a read-only operation, but the description does not disclose whether network calls are involved or any potential side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It front-loads the core action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter list tool, the description is adequate. An output schema exists, so return values are handled. Minor improvement could mention output format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so the description does not need to add parameter meaning. The schema coverage is 100%, meeting the baseline for zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists installed and available FoldSeek databases and model resources, matching the name and distinguishing from sibling tools that perform downloads, searches, or validation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context (listing resources) with no need for exclusions. It implicitly suggests using this before downloading or searching, though lacks explicit when-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

foldseek_search_sequenceC

Run FoldSeek easy-search with a FASTA query and configured ProstT5 model.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoprostt5-q4_0-gguf
evalueNo
threadsNo
use_gpuNo
databaseNoafdb_uniprot50_minimal
max_hitsNo
fasta_pathNo
fasta_textNo
sensitivityNo
output_modesNo
alignment_typeNo
timeout_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description is minimal and does not disclose behavioral traits beyond the basic action. No annotations are provided, so the description carries the full burden. There is no mention of prerequisites, side effects, auth needs, or performance considerations. A score of 2 indicates significant missing transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, which is concise but lacks structure. It is not overly verbose, but it sacrifices completeness. A score of 3 reflects that it is adequately concise but not well-structured for an AI agent to parse efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 12 parameters, no schema descriptions, and no annotations, the description is severely incomplete. It does not explain what FoldSeek easy-search does, how the query is processed, what the return format is (despite having an output schema), or any other contextual information. This is inadequate for an AI agent to use effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must add extensive parameter meaning. However, it only mentions 'FASTA query' (vaguely covering fasta_path/fasta_text) and 'configured ProstT5 model' (covering the model parameter). The other 10 parameters (evalue, threads, database, etc.) are completely undocumented. This is insufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action (Run) and resource (FoldSeek easy-search) with a FASTA query and ProstT5 model. This is clear enough, but it does not differentiate from sibling tool foldseek_search_structure, which likely searches by structure instead of sequence. A 5 would require explicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like foldseek_search_structure or foldseek_validate_environment. The agent is left to infer from the name. This is a significant gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

foldseek_search_structureC

Run FoldSeek easy-search with a PDB/mmCIF structure query.

ParametersJSON Schema
NameRequiredDescriptionDefault
evalueNo
threadsNo
use_gpuNo
databaseNoafdb_uniprot50_minimal
max_hitsNo
query_pathYes
sensitivityNo
output_modesNo
alignment_typeNo
timeout_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description should disclose behavioral traits. It mentions 'easy-search' but does not explain the computational cost, GPU usage, or what the tool does beyond a vague term.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with one sentence, but it sacrifices necessary detail. It is not verbose but is underinformative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (10 parameters, no annotations, output schema), the description is severely incomplete. It fails to cover purpose relative to siblings, parameter meanings, or behavioral context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, yet the description adds no explanation for any of the 10 parameters. Parameters like evalue, sensitivity, and alignment_type are left completely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Run' and the resource 'FoldSeek easy-search with a PDB/mmCIF structure query'. However, it does not explicitly distinguish from the sibling tool foldseek_search_sequence which uses a sequence query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like foldseek_search_sequence or prerequisites such as needing a valid PDB file.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

foldseek_validate_environmentA

Validate the local FoldSeek MCP runtime environment.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries full burden for behavioral transparency, but only states 'validate' without describing side effects, authorization needs, or what happens on success/failure. No annotation contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, front-loaded with the verb, with no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no parameters and an output schema, the description is adequate but minimal. It does not explain what 'validate' checks or what the output indicates, though the output schema likely covers return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 0 parameters, so schema coverage is 100%. The description adds context by mentioning 'local FoldSeek MCP runtime environment', which is a baseline 4 for zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool validates the local FoldSeek MCP runtime environment, using a specific verb and resource. It distinguishes from sibling tools which handle searching, downloading, and listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives or prerequisites. It is implied to be a prerequisite but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedfoldseek_download_database
    • First observedfoldseek_list_databases
    • First observedfoldseek_search_sequence
    • First observedfoldseek_search_structure
    • First observedfoldseek_validate_environment

TDQS

B3.4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct operation: database download, listing, sequence search, structure search, and environment validation. No functional overlap.

Naming Consistency5/5

All tools follow the consistent pattern 'foldseek_verb_noun' with clear, descriptive names (e.g., foldseek_download_database, foldseek_search_sequence).

Tool Count5/5

Five tools is appropriate for a focused scientific server covering database management, two search modalities, and environment checks.

Completeness4/5

Core workflows are covered, but missing a tool to delete or update databases, which is a minor gap for full lifecycle management.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables searching, retrieving, and downloading protein structure data from the RCSB Protein Data Bank. Supports intelligent protein structure search, comprehensive data retrieval, and multiple file format downloads for bioinformatics research.
    3
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables protein sequence analysis and structure prediction by extracting ESM-2 embeddings and batch processing FASTA files via Docker. It provides tools for large-scale embedding extraction, job monitoring, and model management within an MCP-compatible environment.
    -
  • F
    license
    B
    quality
    D
    maintenance
    Provides programmatic access to AlphaFold protein structure predictions and UniProt data, enabling users to retrieve protein structures, summaries, and annotations through natural language.
    3
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-powered protein structure prediction and variant analysis via Docker, with tools for submitting predictions, batch processing variants, and monitoring jobs.
    1
    -