Skip to main content

MCP server that help to build and fix compilation errors

Project description

mcp-build-toolchain MCP Server

Advanced build toolchain with compilation error analysis and filtering capabilities

The objective of the MCP is minimize use of tokens to allow LLM model to process the warning and errors of compilation process and fix. So some build log result could result so big to be sent to model.

Using Clinerules can send information to specific project and what to do with results. Also can use a second file where warning and/or errors can be added to avoid the model to try to fix them.

Key Components

MCP Tool: get-compilation-errors

graph TD
    A[get-compilation-errors] --> B[Analyzes build output]
    B --> C[Extracts errors/warnings]
    C --> D[Filters using .clinerules]
    D --> E[Provides structured results]

Key features:

  • Processes raw compilation logs into structured data
  • Integrates with .clinerules for targeted filtering
  • Prioritizes critical errors first
  • Generates actionable remediation steps

.clinerules Configuration

Create .clinerules in project root to control error handling:

Describe how to compile and how to react to the different errors/warnings:

# Files
Command to build/compile: `.\build.cmd`
outfile to read to get warnings and errors result from the compilation: `output_log_file.log`, use absolute path.

# Tasks
- If user request to check or solve compilation errors or warnings follow to following procedure
- In case user request to compile or build use the command: build.cmd *Replace by user command*
- Use mcp server tool "mcp-build-toolchain" function "get-compilation-errors" to get the list of warnings and errors.
- In case the user tells file names, description or regular expression to filter the errors, create the regular expression and use the parameter 'regexp'
- After getting the errors and warnings try to fix them and compile again. Repeat the operation 5 times until no errores are reported.
- Check `docs/avoidable_errors.md` and do nothing with errors or warning reported in this file.
- Filter by default the errors and warnings: "*text to filter errors*" or "*text to filter warnings*"
    - This filter is applied in any position of the line and is case insensitive.
- Don't modify anything furthermore than the needed to fix the errors or warnings.
- If there is a fix that can have different solutions, ask the user for the solution to apply.

Error Documentation

Maintain docs/avoidable_errors.md with common issues:

## Avoidable Warnings
- W0611: Unused import → Remove unused packages
- E302: Expected 2 blank lines → Follow PEP8 spacing

## Ignorable Errors  
- E266: Too many leading '#' → Style preference
- W504: Line break after binary operator → Project-specific

Prompt examples

Configuration

"mcpServers": {
  "mcp-build-toolchain": {
    "command": "uv",
    "args": [
      "--directory",
      "/Users/username/mcp/mcp-build-toolchain",  --> Folder where MCP server is installed
      "run",
      "mcp-build-toolchain"
    ],
    "tools": {
      "get-compilation-errors": {
        "outfile": "build/errors.log"
      }
    }
  }
}

Quickstart

Install

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

Development/Unpublished Servers Configuration ``` "mcpServers": { "mcp-build-toolchain": { "command": "uv", "args": [ "--directory", "/Users/username/mcp/mcp-build-toolchain", "run", "mcp-build-toolchain" ] } } ```
Published Servers Configuration ``` "mcpServers": { "mcp-build-toolchain": { "command": "uvx", "args": [ "mcp-build-toolchain" ] } } ```

Cline

Cline: %APPDATA%/Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

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_build_toolchain-0.1.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

mcp_build_toolchain-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_build_toolchain-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_build_toolchain-0.1.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for mcp_build_toolchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76d67cc14d93cdc04284815b5cf9ab5445fe1813ea472deacc3013e14bcdcd62
MD5 1229b69b39c3481a466bc323295df133
BLAKE2b-256 8668b3b6797d34252c0f86fe490f49663b55a7e384ac608abcb4fb39f7a4e860

See more details on using hashes here.

File details

Details for the file mcp_build_toolchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_build_toolchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9f2a5155cb8b0433ad249fd87940ab8f61761bba1a9db26b04923174fc05736
MD5 ca9052f9bc01759f173485def9f2dac3
BLAKE2b-256 1c8f870e0179d5f5fe00b6898d5c80018ff62fd6b79ff59012b8706e80698727

See more details on using hashes here.

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