将任何shell命令转换为MCP服务器
为何要为每个需求编写长篇的MCP服务器代码,当你可以使用MCP-Ables时?
MCP-Ables弥合了命令行工具与AI代理(如Claude Code)之间的差距。只需编写一个简单的YAML文件来描述你的shell命令,MCP-Ables会自动生成一个AI代理可以调用的MCP(模型上下文协议)服务器。

无需Python编程。无需复杂设置。只需YAML → MCP → 可供AI调用的工具。
nuclei, nmap, kubectl 等)git clone https://github.com/mfakbar127/MCP-Ables.git
cd MCP-Ables
pip install -r requirements.txt
# 单个文件
python mcpables-main.py examples/nuclei.yaml
# 目录(递归扫描.yaml/.yml文件)
python mcpables-main.py examples/
examples/tools/echo.yaml:
name: echo_message
description: 将消息回显到标准输出(简单测试工具)
run:
kind: shell
cmd: "echo {{message}}"
args:
message:
type: string
description: "要回显的消息"
required: true
运行它:
python mcpables-main.py examples/tools/echo.yaml
| 工具名称 | 描述 | 类别 | 位置 |
|---|---|---|---|
| cloudlist | 跨云提供商枚举资产(ProjectDiscovery) | 安全 | tools/security/pd/cloudlist.yaml |
| subfinder | 被动子域枚举(ProjectDiscovery) | 安全 | tools/security/pd/subfinder.yaml |
| naabu | 主机快速端口扫描(ProjectDiscovery) | 安全 | tools/security/pd/naabu.yaml |
| asnmap | 查找ASN、域名、IP和组织网络范围(ProjectDiscovery) | 安全 | tools/security/pd/asnmap.yaml |
| mapcidr | CIDR/IP处理和切片用于批量扫描(ProjectDiscovery) | 安全 | tools/security/pd/mapcidr.yaml |
| hacking-tools | 包含攻击性工具(sqlmap, hydra, gobuster, nikto) | 安全 | tools/security/hacking-tools.yaml |
从聊天中运行安全扫描器以枚举资产、发现漏洞并绘制攻击面;你可以运行如nmap、nuclei和subfinder等命令。
触发SQL注入测试、暴力破解、内容发现和Web扫描等进攻性工作流程;你可以运行如sqlmap、hydra、gobuster和nikto等命令。
通过聊天控制基础设施进行部署、集群操作、配置管理和打包;你可以运行如kubectl、terraform、ansible和helm等命令。
通过聊天管理服务器,包括服务、容器、日志和防火墙规则;你可以运行如systemctl、docker、journalctl和iptables等命令。
运行网络诊断,如连通性测试、路径追踪、DNS查询和域名查找;你可以运行如ping、traceroute、dig和whois等命令。
从CLI处理数据,包括JSON解析、HTTP请求、文本过滤和媒体转换;你可以运行如jq、curl、grep/awk和ffmpeg等命令。
参见examples/
name: <tool_name>
description: <简短描述供AI代理理解>
run:
kind: shell
cmd: "命令 {{arg1}} {{arg2}}"
args:
arg1:
type: string|int|float|bool
description: "此参数的作用"
required: true|false
default: <可选默认值>
在一个YAML文件中定义多个工具:
tools:
- name: tool1
description: 第一个工具描述
run:
kind: shell
cmd: "命令1 {{arg1}}"
args:
arg1:
type: string
description: "参数描述"
required: true
- name: tool2
description: 第二个工具描述
run:
kind: shell
cmd: "命令2 {{arg2}}"
args:
arg2:
type: int
description: "参数描述"
required: false
default: 10
string, int, float, bool)true 或 false)examples/tools/nuclei.yaml:
name: nuclei_scan
description: 对目标URL或IP地址运行Nuclei漏洞扫描器
run:
kind: shell
cmd: "nuclei -c {{concurrency}} -t {{target}} -t {{template_path}}"
args:
target:
type: string
description: "要扫描的目标URL或IP地址(例如:https://example.com)"
required: true
template_path:
type: string
description: "Nuclei模板目录路径(例如:~/nuclei-templates/)"
required: true
concurrency:
type: int
description: "并发请求数量(1-100)"
required: false
default: 10
examples/security-tools.yaml:
tools:
- name: nmap_scan
description: 对目标运行Nmap网络扫描器
run:
kind: shell
cmd: "nmap {{scan_type}} {{target}}"
args:
target:
type: string
description: "目标IP或主机名"
required: true
scan_type:
type: string
description: "扫描类型标志(例如:-sV)"
required: false
default: "-sV"
- name: whois_lookup
description: 对域名执行WHOIS查询
run:
kind: shell
cmd: "whois {{domain}}"
args:
domain:
type: string
description: "要查询的域名"
required: true
- name: dig_dns
description: 使用dig命令进行DNS查询
run:
kind: shell
cmd: "dig {{record_type}} {{domain}}"
args:
domain:
type: string
description: "要查询的域名"
required: true
record_type:
type: string
description: "DNS记录类型(A, MX, TXT等)"
required: false
default: "A"
运行它:
python mcpables-main.py examples/security-tools.yaml
# 加载3个工具:nmap_scan, whois_lookup, dig_dns
将工具组织在单独的文件中:
examples/tools/
├── ping.yaml (ping_host工具)
├── curl.yaml (http_request工具)
└── ...
从目录运行所有工具:
python mcpables-main.py examples/tools/
# 递归加载所有.yaml/.yml文件
将MCP-Ables连接到Claude Desktop,使AI可以直接从聊天中使用你的工具。
定位Claude Desktop配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json添加MCP-Ables服务器:
{
"mcpServers": {
"mcpables": {
"command": "python",
"args": [
"/绝对路径/to/mcpables-main.py",
"/绝对路径/to/examples/"
]
}
}
}
单个文件(特定氛围):
{
"mcpServers": {
"secops": {
"command": "python",
"args": ["/路径/to/mcpables-main.py", "/路径/to/examples/secops-tools.yaml"]
}
}
}
目录(所有工具):
{
"mcpServers": {
"mcpables-all": {
"command": "python",
"args": ["/路径/to/mcpables-main.py", "/路径/to/examples/"]
}
}
}
多个配置(不同氛围):
{
"mcpServers": {
"secops": {
"command": "python",
"args": ["/路径/to/mcpables-main.py", "/路径/to/examples/secops-tools.yaml"]
},
"devops": {
"command": "python",
"args": ["/路径/to/mcpables-main.py", "/路径/to/examples/devops-tools.yaml"]
},
"netops": {
"command": "python",
"args": ["/路径/to/mcpables-main.py", "/路径/to/examples/netops-tools.yaml"]
}
}
}
重启Claude Desktop后,可以通过以下方式验证工具是否可用:
nuclei_scan, nmap_scan等名字出现由Muh. Fani "Rama" Akbar创建 linkedin.com/in/mf-akbar/