一个提供构建功能的 Model Context Protocol 服务器。此服务器允许大语言模型(LLM)按照 Makefile 执行 make 目标,以安全、受控的方式运行,助力开发工作。
该服务器通过 Model Context Protocol 提供构建功能,使 LLM 能够:
uv(推荐)uv pip install mcp-server-make
pip install mcp-server-make
# 使用当前目录中的默认 Makefile
uvx mcp-server-make
# 使用特定的 Makefile 和工作目录
uvx mcp-server-make --make-path /path/to/Makefile --working-dir /path/to/working/dir
要在 Claude Desktop 中使用,请将其添加到您的 Claude 配置文件(claude_desktop_config.json)中:
{
"mcpServers": {
"make": {
"command": "uvx",
"args": [
"mcp-server-make",
"--make-path", "/absolute/path/to/Makefile",
"--working-dir", "/absolute/path/to/working/dir"
]
}
}
}
# 示例:使用自定义 Makefile 和工作目录
uvx mcp-server-make --make-path ./custom_make/Makefile --working-dir ./workdir
该服务器通过赋予 LLM 直接访问 make 功能的能力,实现强大的开发工作流程:
make testmake lintmake formatmake checkmake xmake zmake r该服务器提供一个工具:
make - 从 Makefile 执行 make 目标
--make-path <路径>: 指定要执行的 Makefile 路径,默认为当前目录中的 Makefile。--working-dir <路径>: 设置工作目录,影响命令的执行环境。FileNotFoundError: [Errno 2] No such file or directory: 'Makefile'--working-dir 参数可以更改工作目录。本项目采用 MIT License,详细内容请查看 LICENSE 文件。