Skip to main content
Glama

MCP Server Make

CI Release PyPI version

一个提供 make 功能的模型上下文协议(MCP)服务器。该服务器使 LLM 能够以安全、受控的方式执行任何 Makefile 中的 make 目标。

概述

该服务器通过模型上下文协议公开 make 功能,允许像 Claude 这样的 LLM 执行以下操作:

  • 安全地运行 make 目标并捕获输出

  • 理解并导航构建过程

  • 协助开发任务

  • 适当地处理错误

  • 尊重工作目录上下文

MCP Server Make 适用于任何有效的 Makefile - 您可以使用随附的规范化 Makefile,也可以使用您自己的自定义构建脚本。

Related MCP server: MCP Python Toolbox

快速入门

安装

使用 uv(推荐):

uv pip install mcp-server-make

使用 pip:

pip install mcp-server-make

基本用法

# Run with default Makefile in current directory
uvx mcp-server-make

# Run with specific Makefile and working directory
uvx mcp-server-make --make-path /path/to/Makefile --working-dir /path/to/working/dir

MCP 客户端配置

要与 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"
      ]
    }
  }
}

文档

有关使用 MCP Server Make 的详细信息,请参阅我们的文档:

增强开发工作流

该服务器通过让 LLM 直接访问 make 功能,实现了强大的开发工作流:

对于开发者

  1. 自动化辅助

    • 让 Claude 运行并解释测试结果

    • 获取构建系统的建议和改进

    • 自动化重复性的开发任务

  2. 项目管理

    • 让 Claude 处理依赖项更新

    • 自动化发布流程

    • 保持一致的代码质量

使用 Make 目标

MCP Server Make 不会自动发现 Makefile 中可用的目标。为了有效地与 Claude 一起使用它:

  1. 从 make help 开始:大多数设计良好的 Makefile 都包含一个 help 目标

    Human: Please run make help to see what commands are available.
  2. 告诉 Claude 您的目标:明确说明可用的目标及其用途

    Human: Our project has these make targets: test, lint, format, build, and clean.
  3. 使用标准约定:许多 Makefile 中包含的常见目标:

    • make test - 运行测试

    • make lint - 检查代码质量

    • make format - 格式化代码

    • make build - 构建项目

    • make clean - 清理构建产物

该存储库包含一个带有额外实用目标的规范化 Makefile - 有关这些扩展功能的详细信息或创建您自己的自定义目标,请参阅用户指南。

注意:Claude 不会在对话之间记住可用的目标。您需要在每次对话开始时向它介绍这些目标。

集成示例

以下是 Claude 如何协助开发任务的示例:

Human: Can you run our test suite and format any code that needs it?

Claude: I'll help run the tests and format the code:

1. First, let's format the code:
[Calling make tool with args {"target": "format"}]
2 files reformatted, 3 files left unchanged

2. Now let's run the tests:
[Calling make tool with args {"target": "test"}]
Running tests...
4 passed, 0 failed

All formatting and tests completed successfully. The code is now properly formatted and all tests are passing.

可用工具

该服务器公开了一个单一工具:

  • make - 从 Makefile 运行 make 目标

    • target (string, required): 要执行的目标名称

贡献

我们欢迎有助于改进 mcp-server-make 的贡献!请参阅 CONTRIBUTING.md 以获取有关设置开发环境、使用项目工具和提交更改的详细说明。

许可证

MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件

Available Tools

1 tool
makeA

Run a make target from the Makefile

Inputs: target (required), args.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is no possibility of confusion between tools. The single tool 'make' is clearly distinct by default.

    Naming Consistency5/5

    With only one tool, naming consistency is perfect. The name 'make' directly describes the action, though it's a verb alone rather than verb_noun pattern.

    Tool Count3/5

    A single tool for a server named 'MCP Server Make' is borderline. While it directly serves the core purpose, the domain could benefit from additional tools like listing targets or showing help.

    Completeness4/5

    The tool fulfills its stated function of running a make target. Minor gaps exist (e.g., no way to list targets or specify options), but the core workflow is supported.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.
      9
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
      2
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that enables LLMs to run ANY code safely in isolated Docker containers.
      125
      MIT