samtools_mcp
SAMtools MCP(模型控制协议)
SAMtools 的模型控制协议实现,为处理 SAM/BAM/CRAM 文件提供了标准化接口。
特征
查看和转换 SAM/BAM/CRAM 文件
对比准文件进行排序
索引 BAM/CRAM 文件
生成统计数据
合并多个 BAM 文件
计算读取深度
索引 FASTA 文件
还有更多...
核心能力
文件格式支持:处理 SAM(文本)、BAM(二进制)和 CRAM(压缩)对齐文件
格式转换:在 SAM、BAM 和 CRAM 格式之间无缝转换
区域特定分析:提取并分析特定基因组区域
基于标志的过滤:根据 SAM 标志过滤读取
性能优化:排序和合并的多线程操作
统计分析:生成全面的比对统计数据
工具概述
工具 | 描述 | 主要特点 |
| 查看和转换对齐文件 | - 格式转换(SAM/BAM/CRAM)- 区域过滤- 基于标志的过滤- 标题操作 |
| 对比准文件进行排序 | - 基于坐标的排序 - 基于名称的排序 - 每个线程的内存控制 - 多线程支持 |
| 索引 BAM/CRAM 文件 | - BAI 指数生成 - CSI 指数支持 - CRAM 指数创建 |
| 合并多个 BAM/CRAM 文件 | - 多文件合并 - 线程启用处理 - 标题协调 |
| 计算读取深度 | - 每个基础深度计算 - 特定区域分析 - 多文件支持 |
| 生成比对统计数据 | - 综合标志统计 - 质量检查 - 双端指标 |
| BAM/CRAM 索引统计 | - 参考序列统计 - 映射/未映射计数 - 长度信息 |
| 索引 FASTA 文件 | - FASTA 索引 - 区域提取 - 序列检索 |
Related MCP server: Maya MCP
安装
使用 Docker(推荐)
使用 SAMtools MCP 最简单的方法是通过 Docker:
# Pull the Docker image
docker pull nadhir/samtools-mcp:latest
# Run the container
docker run -it --rm nadhir/samtools-mcp:latest
# To process BAM files, mount a volume:
docker run -it --rm -v /path/to/your/bam/files:/data nadhir/samtools-mcp:latest本地安装
克隆存储库:
git clone https://github.com/your-username/samtools_mcp.git
cd samtools_mcp安装依赖项:
pip install uv
uv pip install -r requirements.txt配置
MCP 服务器配置
要配置 MCP 服务器以使用 Docker 镜像,请将以下内容添加到您的 MCP 配置文件中:
{
"servers": {
"samtools": {
"type": "docker",
"image": "nadhir/samtools-mcp:latest",
"volumes": [
{
"source": "/path/to/your/data",
"target": "/data"
}
]
}
}
}本地 MCP 配置
要配置 MCP 使用uv运行,请将以下内容添加到您的~/.cursor/mcp.json :
{
"samtools_mcp": {
"command": "uv",
"args": ["run", "--with", "fastmcp", "fastmcp", "run", "/path/to/samtools_mcp.py"]
}
}将/path/to/samtools_mcp.py替换为samtools_mcp.py文件的实际路径。
用法
基本命令
查看BAM文件:
from samtools_mcp import SamtoolsMCP
mcp = SamtoolsMCP()
result = mcp.view(input_file="/data/example.bam")对 BAM 文件进行排序:
result = mcp.sort(input_file="/data/example.bam", output_file="/data/sorted.bam")索引BAM文件:
result = mcp.index(input_file="/data/sorted.bam")高级用法
查看带有标志的特定区域:
result = mcp.view(
input_file="/data/example.bam",
region="chr1:1000-2000",
flags_required="0x2",
output_format="SAM"
)按阅读名称排序:
result = mcp.sort(
input_file="/data/example.bam",
output_file="/data/namesorted.bam",
sort_by_name=True
)使用多个输入文件计算深度:
result = mcp.depth(
input_files=["/data/sample1.bam", "/data/sample2.bam"],
region="chr1:1-1000000"
)贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
BGG MCP provides access to the BoardGameGeek API through the Model Context Protocol, enabling retr…
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP gateway federating 22 biomedical MCP servers behind one endpoint: gnomAD, ClinVar, HPO, VEP.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that provides file system operations, analysis, and manipulation capabilities through a standardized tool interface.6MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol (MCP) server implementation for Autodesk Maya98MIT
- FlicenseAqualityDmaintenanceModel Context Protocol server for accessing Reactome pathway and systems biology data.812-
- FlicenseNot gradedqualityDmaintenanceA model-agnostic Model Context Protocol server implementation that works with any compatible AI model or client, allowing tools like file operations to be accessed through the MCP standard.1-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sirusb/samtools_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server