NetMHCIPan MCP
通过Docker使用NetMHCIIpan-4.3预测MHC II类结合
MCP(模型上下文协议)服务器,用于MHC II类肽结合预测和免疫原性评估,具有18个工具:
- 预测肽结合 --预测肽的MHC II结合
- 蛋白质序列分析 --绘制蛋白质中的免疫原性表位区域
- predict_custom_mhc_绑定 --使用自定义阿尔法/贝塔链进行绑定预测
- 预测结合亲和力 --多等位基因结合筛查
- submit_peptide \_药物/submit_proteinanalysis/submit_custom_mhc_药物 --异步作业提交
- submit_batch_multi_allele_screating/submit_large_pptide筛选/submit_multi_allele_Screating --批量处理
- get_job_status/get_job_result/get_job_log/cancel_job/list_jobs --作业管理
- export_预测_to_excel --将结果导出为Excel格式
- 分析netmhcpan输出 --解析原始NetMHCIPan输出
- get_server_info --服务器功能和支持的等位基因
Docker快速入门
方法1:从GitHub中提取预构建映像
最快的开始方式。每次发布时,预构建的Docker镜像都会自动发布到GitHub容器注册表。
# Pull the latest image
docker pull ghcr.io/macromnex/netmhc2pan_mcp:latest
# Register with Claude Code (runs as current user to avoid permission issues)
claude mcp add netmhc2pan_mcp -- docker run -i --rm --user `id -u`:`id -g` -v `pwd`:`pwd` ghcr.io/macromnex/netmhc2pan_mcp:latest注: 从项目目录运行。 ` pwd ` 展开到当前工作目录。
要求:
- 码头工人
- 已安装克劳德代码
就是这样!NetMHCIPan MCP服务器现在以克劳德代码提供。
______________________________________________________________________
方法2:在本地构建Docker镜像
自己构建映像并将其安装到Claude Code中。适用于自定义或离线环境。
# Clone the repository
git clone https://github.com/MacromNex/netmhc2pan_mcp.git
cd netmhc2pan_mcp
# Build the Docker image
docker build -t netmhc2pan_mcp:latest .
# Register with Claude Code (runs as current user to avoid permission issues)
claude mcp add netmhc2pan_mcp -- docker run -i --rm --user `id -u`:`id -g` -v `pwd`:`pwd` netmhc2pan_mcp:latest关于Docker标志:
-i--Claude Code的交互模式--rm--退出后自动移除容器- `
--userid -u:id -g` --以当前用户身份运行容器 -v--装载项目目录
______________________________________________________________________
验证安装
claude mcp list
# You should see 'netmhc2pan_mcp' in the output在Claude Code中,您现在可以使用所有18个工具:
predict_peptide_binding,analyze_protein_sequence,predict_custom_mhc_binding,predict_binding_affinitysubmit_peptide_prediction,submit_protein_analysis,submit_custom_mhc_predictionsubmit_batch_multi_allele_screening,submit_large_peptide_screening,submit_multi_allele_screeningget_job_status,get_job_result,get_job_log,cancel_job,list_jobsexport_predictions_to_excel,analyze_netmhcpan_output,get_server_info
______________________________________________________________________
后续步骤
- 详细文件:参见 detail.md 获取全面的指南,包括本地安装、脚本使用、配置文件、演示数据、等位基因列表和故障排除
______________________________________________________________________
使用示例
预测肽与MHC II的结合
Use predict_peptide_binding with peptides "AAAGAEAGKATTE,AALAAAAGVPPADKY" for allele DRB1_0101 and include summary statistics绘制蛋白质表位
Run analyze_protein_sequence on @my_protein.fasta using allele DRB1_0101 with context-aware prediction enabled人口覆盖筛查
Run predict_binding_affinity on @peptides.txt across alleles "DRB1_0101,DRB1_0301,DRB1_1501" and generate Excel output______________________________________________________________________
故障排除
Docker问题
问题: 找不到容器或拉取失败
# Verify Docker is running
docker info
# Pull with explicit tag
docker pull ghcr.io/macromnex/netmhc2pan_mcp:latest问题: 输出文件的权限被拒绝
# Ensure you're using the --user flag
docker run -i --rm --user `id -u`:`id -g` -v `pwd`:`pwd` ghcr.io/macromnex/netmhc2pan_mcp:latest问题: MCP服务器没有响应
# Re-register with Claude Code
claude mcp remove netmhc2pan_mcp
claude mcp add netmhc2pan_mcp -- docker run -i --rm --user `id -u`:`id -g` -v `pwd`:`pwd` ghcr.io/macromnex/netmhc2pan_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问题: 容器内出现NetMHCIPan二进制错误
# Test the container directly
docker run --rm ghcr.io/macromnex/netmhc2pan_mcp:latest --help
# If the binary fails, rebuild the image
docker build --no-cache -t netmhc2pan_mcp:latest .______________________________________________________________________
许可证
学术许可证——基于DTU生物信息学的NetMHCIIpan-4.3。对于商业用途,请从以下机构获得许可证 DTU健康技术.
学分
- NetMHCIIpan-4.3:原始软件由 DTU生物信息学
- MCP集成:采用FastMCP框架构建
