Skip to main content

A Model Context Protocol server providing access to make functionality

Project description

MCP Server Make

CI Release PyPI version

A Model Context Protocol server that provides make functionality. This server enables LLMs to execute make targets from a Makefile in a safe, controlled way.

Overview

The server exposes make functionality through the Model Context Protocol, allowing LLMs like Claude to:

  • Run make targets safely with output capture
  • Understand and navigate build processes
  • Help with development tasks
  • Handle errors appropriately
  • Respect working directory context

Installation

Using uv (recommended):

uv pip install mcp-server-make

Using pip:

pip install mcp-server-make

Configuration

Basic Usage

# Run with default Makefile in current directory
uvx mcp-server-make

# Run with specific Makefile and working directory
uvx mcp-server-make --make-path /path/to/Makefile --working-dir /path/to/working/dir

MCP Client Configuration

To use with Claude Desktop, add to your Claude configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "make": {
      "command": "uvx",
      "args": [
        "mcp-server-make",
        "--make-path", "/absolute/path/to/Makefile"
      ]
    }
  }
}

Enhancing Development Workflows

This server enables powerful development workflows by giving LLMs direct access to make functionality:

For Developers

  1. Automated Assistance

    • Let Claude run and interpret test results
    • Get build system suggestions and improvements
    • Automate repetitive development tasks
    • Get immediate feedback on changes
  2. Project Management

    • Let Claude handle dependency updates
    • Automate release processes
    • Maintain consistent code quality
    • Track project status

For Claude

  1. Self-Validation Capabilities

    • Run tests to verify changes: make test
    • Check code quality: make lint
    • Format code: make format
    • Full validation: make check
  2. Project Understanding

    • View project structure: make x
    • Check recent changes: make z
    • Full context snapshot: make r
  3. Independent Development

    • Manage complete development cycles
    • Self-contained testing and validation
    • Build and prepare releases
    • Generate informed commit messages

Available Tools

The server exposes a single tool:

  • make - Run a make target from the Makefile
    • target (string, required): Target name to execute

Error Handling

The server handles common errors gracefully:

  • Missing Makefile
  • Invalid working directory
  • Failed make commands
  • Invalid targets

All errors are returned with descriptive messages through the MCP protocol.

Working Directory Behavior

  • If --working-dir is specified, changes to that directory before executing make
  • If omitted, uses the directory containing the Makefile
  • Always restores original working directory after execution

Example Integration

Here's how Claude can help with development tasks:

Human: Can you run our test suite and format any code that needs it?

Claude: I'll help run the tests and format the code:

1. First, let's format the code:
[Calling make tool with args {"target": "format"}]
2 files reformatted, 3 files left unchanged

2. Now let's run the tests:
[Calling make tool with args {"target": "test"}]
Running tests...
4 passed, 0 failed

All formatting and tests completed successfully. The code is now properly formatted and all tests are passing.

Troubleshooting

Common issues:

  1. "Makefile not found": Verify the --make-path points to a valid Makefile
  2. "Working directory error": Ensure --working-dir exists and is accessible
  3. "Tool execution failed": Check make target exists and command succeeds
  4. "Permission denied": Verify file and directory permissions

Contributing

We welcome contributions to improve mcp-server-make! Here's how:

  1. Fork the repository
  2. Create your feature branch
  3. Make your changes
  4. Run full validation: make check
  5. Submit a pull request

License

MIT License - see LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_make-0.1.9.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_make-0.1.9-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_make-0.1.9.tar.gz.

File metadata

  • Download URL: mcp_server_make-0.1.9.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mcp_server_make-0.1.9.tar.gz
Algorithm Hash digest
SHA256 25aeaa530cd6c98046594a20a0e8786642bee1dcb500c7c229f0144c253f653a
MD5 4bb8593061277dcd0023186aabc70e2a
BLAKE2b-256 bab656821fe03c2a7937121f5c0e89edbbdd460930b2ac97a42692b5afe86ffc

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_make-0.1.9.tar.gz:

Publisher: release.yml on wrale/mcp-server-make

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_server_make-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_make-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 29cd4ab907874b1040168c9ecf90297f78aea466d477ddfeac1e00b6ebd83774
MD5 9601bc9839a0ee3fc9a5e5db767c3407
BLAKE2b-256 34e9daa4e1707a5ff38d9e393ca213d0ba9163344f29e35fd2788551503873d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_server_make-0.1.9-py3-none-any.whl:

Publisher: release.yml on wrale/mcp-server-make

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page