MHC I类肽结合预测工具

NetMHCpan MCP是一个基于Docker的MHC I类肽结合预测和表位分析服务器,提供15种工具支持个体肽预测、蛋白质序列扫描、自定义MHC等位基因分析等功能。

  • by MacromNex
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 Biomolecular-Design-Nexus/netmhcpan_mcp

使用说明

NetMHCpan MCP

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

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

  • 预测肽结合 --预测单个肽的MHC I类结合
  • 预测蛋白质表位 --扫描T细胞表位的蛋白质序列
  • 预测结合亲和力 --通过IC50值增强EL+BA预测
  • predict_custom_mhc_绑定 --定制/新型MHC等位基因的结合预测
  • export_预测_to_excel --Excel导出多等位基因比较
  • 提交批次蛋白质分析 --多种蛋白质的背景批处理
  • submit_multi_allele_筛选 --HLA跨等位基因多样性筛查
  • 提交大肽筛选 --大规模肽库分析
  • get_job_status/get_job_result/get_job_log/cancel_job/list_jobs --作业管理
  • 分析netmhcpan输出 --解析原始NetMHCpan输出
  • get_server_info --服务器功能和支持的等位基因

Docker快速入门

方法1:从GitHub中提取预构建映像

最快的开始方式。每次发布时,预构建的Docker镜像都会自动发布到GitHub容器注册表。

# 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` 展开到当前工作目录。

要求:

  • 码头工人
  • 已安装克劳德代码

就是这样!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_analysis, submit_multi_allele_screening, submit_large_peptide_screening
  • get_job_status, get_job_result, get_job_log, cancel_job, list_jobs
  • analyze_netmhcpan_output, get_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生物信息学的NetMHCpan-4.2。对于商业用途,请从以下机构获得许可证 DTU健康技术.

学分

  • NetMHCpan-4.2:原始软件由 DTU生物信息学
  • MCP集成:采用FastMCP框架构建