The MCP Server Make provides a Model Context Protocol server that allows Large Language Models to safely execute make targets from any Makefile. This enables LLMs like Claude to run build commands, manage development tasks, and interact with your project's build system in a controlled manner.
uv pip install mcp-server-make
pip install mcp-server-make
To run the server with the default Makefile in your current directory:
uvx mcp-server-make
To specify a custom Makefile and working directory:
uvx mcp-server-make --make-path /path/to/Makefile --working-dir /path/to/working/dir
To use with Claude Desktop, add the server to your Claude configuration file (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"
]
}
}
}
Since the server doesn't automatically discover available targets in your Makefile, here are some best practices for effective use:
Start by running the help target to see available commands:
Human: Please run make help to see what commands are available.
Most well-designed Makefiles include these standard targets:
make test
- Run testsmake lint
- Check code qualitymake format
- Format codemake build
- Build the projectmake clean
- Clean build artifactsFor best results, explicitly tell the model about available targets:
Human: Our project has these make targets: test, lint, format, build, and clean.
Here's an example interaction showing how Claude can help with development tasks:
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.
The server exposes a single tool:
target
(string, required): Target name to executeTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "make" '{"command":"uvx","args":["mcp-server-make","--make-path","/absolute/path/to/Makefile","--working-dir","/absolute/path/to/working/dir"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"make": {
"command": "uvx",
"args": [
"mcp-server-make",
"--make-path",
"/absolute/path/to/Makefile",
"--working-dir",
"/absolute/path/to/working/dir"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"make": {
"command": "uvx",
"args": [
"mcp-server-make",
"--make-path",
"/absolute/path/to/Makefile",
"--working-dir",
"/absolute/path/to/working/dir"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect