nf-core MCP 服务器
用于管理和导航 nf-core 管道存储库的 MCP 服务器。
特征
- 列出本地 nf-core 存储库(rnaseq、sarek、模块、工具)
- 访问管道配置和工作流程
- 搜索管道文件
- 探索管道模块
安装
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 管道存储库添加到工作区:
- 克隆存储库:
# Navigate to your workspace directory (example for Windows)
cd /path/to/your/workspace
# Clone desired nf-core repositories
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
# Add any other nf-core pipeline you want to manage
- 目录结构:您的工作区应如下所示:
workspace/
├── rnaseq/
├── sarek/
├── modules/
└── your-new-pipeline/
- 验证安装:启动 MCP 服务器后,使用
list-pipelines
命令验证是否检测到新管道:
注意:MCP 服务器将自动检测并管理工作区目录中的任何 nf-core 管道存储库。
可用工具
list-pipelines
- 列出工作区中的所有 nf-core 管道
- 显示配置文件状态
- 无需参数
get-pipeline-modules
- 从管道获取模块信息
- 参数:
pipeline
:管道名称(rnaseq、sarek 或模块)
search-pipelines
- 搜索管道文件
- 参数:
query
:搜索查询pipeline
(可选):要搜索的特定管道
可用资源
pipeline-config
- 获取管道配置
- URI 格式:
pipeline://{name}/config
- 参数:
name
:管道名称(rnaseq、sarek 或模块)
pipeline-workflow
- 获取管道工作流程
- URI 格式:
pipeline://{name}/workflow
- 参数:
name
:管道名称(rnaseq、sarek 或模块)
与 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
执照
麻省理工学院