MCP Server for GNU Make - providing controlled and secure access to Make systems from LLMs.
make://current/makefile- Access current Makefile content securelymake://targets- List available Make targets with documentation
list-targets: List available Make targets- Returns target names and documentation
- Optional pattern filtering for searching targets
run-target: Execute Make targets safely- Required: target name
- Optional: timeout (1-3600 seconds, default 300)
- Python 3.12+
- GNU Make
- pip or uv package manager
Using uv (recommended):
uvx mcp-server-makeUsing pip:
pip install mcp-server-makeAdd to your Claude Desktop configuration:
MacOS:
nano ~/Library/Application\ Support/Claude/claude_desktop_config.jsonWindows:
notepad %APPDATA%\Claude\claude_desktop_config.jsonAdd configuration:
{
"mcpServers": {
"mcp-server-make": {
"command": "uv",
"args": [
"--directory",
"/path/to/server",
"run",
"mcp-server-make",
"--makefile-dir", "/path/to/project"
]
}
}
}--directory: Path to the installed mcp-server-make package--makefile-dir: Directory containing the Makefile to manage
Restart Claude Desktop to activate the Make server.
I see you have a Makefile. Can you list the available targets?
What does the 'build' target do?
Please run the test target with a 2 minute timeout.
Show me the current Makefile content.
# Clone repository
git clone https://github.com/modelcontextprotocol/mcp-server-make
cd mcp-server-make
# Create virtual environment
uv venv
source .venv/bin/activate # Unix/MacOS
.venv\Scripts\activate # Windows
# Install dependencies
make dev-setup
# Run tests and checks
make checkTest the server using the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-server-make run mcp-server-make --makefile-dir /path/to/projectVersion 0.1.0 implements several security controls:
- Path validation and directory boundary enforcement
- Target name sanitization and command validation
- Resource and timeout limits for command execution
- Restricted environment access and cleanup
- Error isolation and safe propagation
- Makefile content is read-only and validated
- Target listing includes names and documentation
- Full path validation prevents traversal attacks
- Resources require proper make:// URIs
- Targets are sanitized and validated
- Execution occurs in controlled environment
- Timeouts prevent infinite execution
- Clear error messages for failures
- Resource cleanup after execution
- Type-safe error propagation
- Context-aware error messages
- Clean error isolation
- No error leakage
Version 0.1.0 has the following scope limitations:
- Read-only Makefile access
- Single Makefile per working directory
- No support for include directives
- Basic target pattern matching only
- No variable expansion in documentation
- Fork the repository
- Create a feature branch
- Add tests for new features
- Ensure all checks pass (
make check) - Submit a pull request
MIT - See LICENSE file for details.
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and community help
- Initial stable release
- Basic Makefile access and target execution
- Core security controls
- Claude Desktop integration
- Configurable Makefile directory