nf-core 配置管理工具
启用用户管理和导航 nf-core 生物信息学管道存储库,允许对管道配置、工作流和模块进行列表、搜索和探索操作。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"nf-core": {
"args": [
"-y",
"nf-core-mcp"
],
"command": "npx"
}
}
}
服务介绍
nf-core MCP 服务器
一个用于管理和导航 nf-core 管道仓库的 MCP 服务器。
功能
- 列出本地的 nf-core 仓库(如 rnaseq, sarek, modules, tools)
- 访问管道配置和工作流
- 搜索管道文件
- 探索管道模块
安装
NPM 版本
cd nf-core_mcp
npm install
# Build TypeScript
npm run build
# Start the server
npm start
Docker 版本
# Build the Docker image
cd nf-core_mcp
docker build -t nf-core-mcp .
# Run the container
docker run -i --rm \
-v "/path/to/your/workspace:/app/workspace" \
nf-core-mcp
添加 nf-core 仓库
要将新的 nf-core 管道仓库添加到工作区:
-
克隆仓库:
# 导航到您的工作区目录(以 Windows 为例) cd /path/to/your/workspace # 克隆所需的 nf-core 仓库 git clone https://github.com/nf-core/rnaseq.git git clone https://github.com/nf-core/sarek.git git clone https://github.com/nf-core/modules.git # 添加您想要管理的任何其他 nf-core 管道 -
目录结构:
您的工作区应如下所示:workspace/ ├── rnaseq/ ├── sarek/ ├── modules/ └── your-new-pipeline/ -
验证安装:
启动 MCP 服务器后,使用list-pipelines命令来验证您的新管道是否被检测到:list-pipelines
注意:MCP 服务器将自动检测并管理工作区目录中的所有 nf-core 管道仓库。
可用工具
-
list-pipelines- 列出工作区中所有的 nf-core 管道
- 显示配置文件状态
- 不需要参数
-
get-pipeline-modules- 从管道获取模块信息
- 参数:
pipeline: 管道名称(如 rnaseq, sarek 或 modules)
-
search-pipelines- 搜索管道文件
- 参数:
query: 搜索查询pipeline(可选): 要搜索的具体管道
可用资源
-
pipeline-config- 获取管道配置
- URI 格式:
pipeline://{name}/config - 参数:
name: 管道名称(如 rnaseq, sarek 或 modules)
-
pipeline-workflow- 获取管道工作流
- URI 格式:
pipeline://{name}/workflow - 参数:
name: 管道名称(如 rnaseq, sarek 或 modules)
使用 Cursor IDE
使用 NPX(推荐)
在您的 mcp.json 中添加以下内容:
{
"mcpServers": {
"nf-core": {
"command": "npx",
"args": ["-y", "nf-core-mcp"]
}
}
}
使用 Docker
在您的 mcp.json 中添加以下内容:
{
"mcpServers": {
"nf-core": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/your/workspace:/app/workspace",
"nf-core-mcp"
]
}
}
}
示例用法
在 Cursor 中使用 MCP 服务器:
# List available pipelines
list-pipelines
# Get modules from rnaseq pipeline
get-pipeline-modules pipeline=rnaseq
# Search in all pipelines
search-pipelines query="fastqc"
# Search in specific pipeline
search-pipelines query="fastqc" pipeline=rnaseq
# Access pipeline configuration
pipeline://rnaseq/config
# Access workflow
pipeline://rnaseq/workflow
运行服务器
使用 NPM
# If installed globally
nf-core-mcp
# If installed locally
npx nf-core-mcp
# Using npx without installation
npx -y nf-core-mcp
使用 Docker
docker run -it --rm \
-v /path/to/your/workspace:/app/workspace \
nf-core-mcp
开发
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
# Run linter
npm run lint
许可证
MIT