Exposes Makefile targets as callable tools, allowing execution of Make commands with arguments. Reads Makefile targets and their descriptions to create executable tools named make_<target>.
makefilemcpserver
An MCP (Model Context Protocol) server that exposes Makefile targets as callable tools for AI assistants like Claude, Cursor, etc.
⚠️ ALPHA SOFTWARE - LOCAL USE ONLY ⚠️
This server executes Make commands with user-provided arguments. Only use in trusted environments. It intelligently parses out commands and args.
This almost certainly won't work flawlessly for your Makefile. In fact, it might not even work at all.
Installation
Prerequisites
- Node.js 16 or higher
make
command available in PATH- A Makefile in your project directory
Quick Start
- Clone this repository:
- Install dependencies:
- Build the server:
Usage
Add to your MCP server configuration:
The second argument (optional) specifies the directory containing your Makefile. If omitted, uses the current directory.
Example Makefile
This will expose tools: make_build
, make_test
, and make_deploy
to Claude.
How It Works
- The server reads your Makefile at startup
- Each Make target becomes a tool with the name
make_<target>
- Comments directly above targets become tool descriptions
- MCP clients can then run any target with optional arguments. We do some best-effort parsing of args from docs + commands, a better approach would just be to offload it to yet another LLM call(s) at startup.
Security Considerations
⚠️ WARNING: This server executes shell commands via Make. It currently has minimal input validation.
- Anything you expose in your Makefile, any MCP client will have access to. Highly recommend running locally only.
- The server does some de rigeur input sanitization, but no guarantees that an enterprising security researcher can't figure out a way around it.
Development
Debugging
Since MCP servers communicate over stdio, use the MCP Inspector:
Then open the provided URL to access debugging tools.
Contributing
This is alpha software. Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
License
MIT - See LICENSE file for details
Roadmap
- Support for multiple Makefiles
- Configuration for timeout values
- Better error messages and logging
- Tests and CI/CD pipeline
This server cannot be installed
An MCP server that exposes Makefile targets as callable tools for AI assistants, allowing Claude and similar models to execute Make commands with provided arguments.
Related MCP Servers
- AsecurityAlicenseAqualityMCP server that builds itself by creating new tools as needed based on user requests (Requires restart of Claude Desktop to use newly created tools).Last updated -413PythonThe Unlicense
- -securityFlicense-qualityAn MCP server that allows Claude AI to perform filesystem operations including reading, writing, listing, moving files, and searching directories within specified allowed paths.Last updated -51JavaScript
- -securityAlicense-qualityAn MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.Last updated -179PythonMIT License
- -securityFlicense-qualityAn MCP server that allows AI assistants like Claude to execute terminal commands on the user's computer and return the output, functioning like a terminal through AI.Last updated -38Python