netmhcpan_mcp:基于 Docker 与 MCP 协议的 MHC I 类肽结合预测服务项目

可用于 MHC I 类肽结合预测和表位分析,提供15种工具,包括肽结合预测、蛋白表位扫描、亲和力预测等,支持批量处理和结果导出,通过 Docker 快速部署,集成 MCP 协议便于管理和使用。【此简介由AI生成】

Branch1Tags0
This repository is empty

NetMHCpan MCP

通过 Docker 使用 NetMHCpan-4.2 进行 MHC I 类分子结合预测

一个用于 MHC I 类肽结合预测和表位分析的 MCP(模型上下文协议)服务器,包含 15 个工具:

  • predict_peptide_binding -- 预测单个肽段与 MHC I 类分子的结合
  • predict_protein_epitopes -- 扫描蛋白质序列以寻找 T 细胞表位
  • predict_binding_affinity -- 带有 IC50 值的增强型 EL+BA 预测
  • predict_custom_mhc_binding -- 针对自定义/新型 MHC 等位基因的结合预测
  • export_predictions_to_excel -- 多等位基因比较并导出至 Excel
  • submit_batch_protein_analysis -- 对多个蛋白质进行后台批量处理
  • submit_multi_allele_screening -- 跨等位基因的 HLA 多样性筛选
  • submit_large_peptide_screening -- 大规模肽库分析
  • get_job_status / get_job_result / get_job_log / cancel_job / list_jobs -- 作业管理
  • analyze_netmhcpan_output -- 解析原始 NetMHCpan 输出
  • get_server_info -- 服务器功能和支持的等位基因

Docker 快速入门

方法 1:从 GitHub 拉取预构建镜像

这是最快的入门方式。每次发布时,预构建的 Docker 镜像都会自动发布到 GitHub Container Registry。

# Pull the latest image
docker pull ghcr.io/macromnex/netmhcpan_mcp:latest

# Register with Claude Code (runs as current user to avoid permission issues)
claude mcp add netmhcpan_mcp -- docker run -i --rm --user `id -u`:`id -g` -v `pwd`:`pwd` ghcr.io/macromnex/netmhcpan_mcp:latest

注意: 请从您的项目目录运行。`pwd` 会展开为当前工作目录。

要求:

  • Docker
  • 已安装 Claude Code

就是这样!NetMHCpan MCP 服务器现已在 Claude Code 中可用。


方法 2:本地构建 Docker 镜像

自行构建镜像并将其安装到 Claude Code 中。此方法适用于需要自定义或在离线环境中使用的场景。

# Clone the repository
git clone https://github.com/MacromNex/netmhcpan_mcp.git
cd netmhcpan_mcp

# Build the Docker image
docker build -t netmhcpan_mcp:latest .

# Register with Claude Code (runs as current user to avoid permission issues)
claude mcp add netmhcpan_mcp -- docker run -i --rm --user `id -u`:`id -g` -v `pwd`:`pwd` netmhcpan_mcp:latest

关于 Docker 标志:

  • -i -- Claude Code 的交互模式
  • --rm -- 退出后自动删除容器
  • --user `id -u`:`id -g` -- 以当前用户身份运行容器
  • -v -- 挂载项目目录

验证安装

claude mcp list
# You should see 'netmhcpan_mcp' in the output

在 Claude Code 中,您现在可以使用全部 15 个工具:

  • predict_peptide_binding
  • predict_protein_epitopes
  • predict_binding_affinity
  • predict_custom_mhc_binding
  • export_predictions_to_excel
  • submit_batch_protein_analysissubmit_multi_allele_screeningsubmit_large_peptide_screening
  • get_job_statusget_job_resultget_job_logcancel_joblist_jobs
  • analyze_netmhcpan_outputget_server_info

后续步骤

  • 详细文档:请参阅 detail.md 获取全面指南,包括本地安装、脚本使用、配置文件、演示数据和性能基准测试

使用示例

预测肽结合

Use predict_peptide_binding to analyze @peptides.pep for HLA-A02:01 binding and filter by rank threshold 2.0

扫描蛋白质中的表位

Run predict_protein_epitopes on @my_protein.fasta for peptide lengths 8,9,10 using HLA-A24:02, sort by binding affinity

多等位基因群体覆盖度

Use export_predictions_to_excel with @peptides.pep for alleles HLA-A02:01, HLA-A01:01, HLA-B07:02 and export to results/comparison.xlsx

故障排除

Docker 问题

问题: 容器未找到或拉取失败

# Verify Docker is running
docker info

# Pull with explicit tag
docker pull ghcr.io/macromnex/netmhcpan_mcp:latest

问题: 输出文件权限被拒绝

# Ensure you're using the --user flag
docker run -i --rm --user `id -u`:`id -g` -v `pwd`:`pwd` ghcr.io/macromnex/netmhcpan_mcp:latest

问题: MCP 服务器无响应

# Re-register with Claude Code
claude mcp remove netmhcpan_mcp
claude mcp add netmhcpan_mcp -- docker run -i --rm --user `id -u`:`id -g` -v `pwd`:`pwd` ghcr.io/macromnex/netmhcpan_mcp:latest

问题: 容器内未找到文件路径

# Make sure to run Claude Code from the directory containing your files
# The -v `pwd`:`pwd` flag mounts only the current directory
cd /path/to/your/project
claude

问题: 容器内的 NetMHCpan 二进制文件错误

# Test the container directly
docker run --rm ghcr.io/macromnex/netmhcpan_mcp:latest --help

# If the binary fails, rebuild the image
docker build --no-cache -t netmhcpan_mcp:latest .

许可协议

学术许可协议——基于DTU Bioinformatics的NetMHCpan-4.2。商业用途需从DTU Health Tech获取许可。

致谢

  • NetMHCpan-4.2:原始软件由DTU Bioinformatics开发
  • MCP集成:基于FastMCP框架构建

Introduction

可用于 MHC I 类肽结合预测和表位分析,提供15种工具,包括肽结合预测、蛋白表位扫描、亲和力预测等,支持批量处理和结果导出,通过 Docker 快速部署,集成 MCP 协议便于管理和使用。【此简介由AI生成】

Customize your domain