Skip to main content
Glama

makefilemcpserver

by mparker3
MIT License

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

  1. Clone this repository:
git clone https://github.com/mparker3/makefilemcpserver.git cd makefilemcpserver
  1. Install dependencies:
npm install
  1. 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

  1. The server reads your Makefile at startup
  2. Each Make target becomes a tool with the name make_<target>
  3. Comments directly above targets become tool descriptions
  4. 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:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. 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
-
security - not tested
A
license - permissive license
-
quality - not tested

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.

  1. Installation
    1. Prerequisites
    2. Quick Start
  2. Usage
    1. Example Makefile
  3. How It Works
    1. Security Considerations
      1. Development
        1. Debugging
          1. Contributing
            1. License
              1. Roadmap

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  MCP 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 -
                  4
                  13
                  Python
                  The Unlicense
                • -
                  security
                  F
                  license
                  -
                  quality
                  An 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 -
                  5
                  1
                  JavaScript
                • -
                  security
                  A
                  license
                  -
                  quality
                  An 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 -
                  179
                  Python
                  MIT License
                  • Apple
                  • Linux
                • -
                  security
                  F
                  license
                  -
                  quality
                  An 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 -
                  38
                  Python
                  • Apple

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/mparker3/makefilemcp'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server