makefilemcpserver
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.
README
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.