Makefile MCP Server
Exposes Makefile targets as callable tools for AI assistants.
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
makecommand available in PATH- A Makefile in your project directory
Quick Start
- Clone this repository:
git clone https://github.com/mparker3/makefilemcpserver.git
cd makefilemcpserver
- Install dependencies:
npm install
- Build the server:
npm run build
Usage
Add to your MCP server configuration:
{
"mcpServers": {
"makefilemcpserver": {
"command": "node",
"args": [
"/absolute/path/to/makefilemcpserver/build/index.js",
"/path/to/your/project"
]
}
}
}
The second argument (optional) specifies the directory containing your Makefile. If omitted, uses the current directory.
Example Makefile
# Build the project
build:
npm run build
# Run tests
test:
npm test
# Deploy to production
deploy: build test
./deploy.sh
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
# Install dependencies
npm install
# Build once
npm run build
# Build and watch for changes
npm run watch
# Run the MCP Inspector for debugging
npm run inspector
Debugging
Since MCP servers communicate over stdio, use the MCP Inspector:
npm run 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
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Uniswap PoolSpy
Tracks newly created Uniswap liquidity pools across nine blockchain networks, providing real-time data for DeFi analysts, traders, and developers.
Base MCP Server
An MCP server providing onchain tools for AI applications to interact with the Base Network and Coinbase API.
Second Opinion
Review commits and codebases using external LLMs like OpenAI, Google Gemini, and Mistral.
Blender MCP Senpai
An AI-assisted mentor for Blender that detects topology issues and offers real-time improvement suggestions.
MCP Yeoman Server
Search for and run Yeoman generator templates programmatically.
MCP-scala
A Model Context Protocol server implementation written in Scala 3.
Sui MCP Tools
A toolkit for interacting with the Sui blockchain and integrating MCP SDK features, with support for multiple network environments.
MCP AI Agent Server
A server that bridges Cline to an AI agent system, enabling seamless interaction with AI agents through the Model Context Protocol.
MCP SSE Launcher
A Python management system for MCP servers that wraps stdio-based servers as SSE endpoints and includes a web inspector for testing.
Remote MCP Server (Authless)
An example of a remote MCP server without authentication, deployable on Cloudflare Workers.