build-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@build-mcpbuild the project and fix any compiler errors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
build-mcp
An MCP server that runs a build tool and returns structured compiler errors to an LLM agent in opencode.
The value is in the parser: instead of dumping thousands of lines of noisy
build output into the agent's context, it returns a clean list of
{file, line, severity, message} diagnostics.
Files
build_mcp.py— the MCP server. Exposesbuildandcleantools.fake_junkbuild.py— a noisy fake build tool for testing without a real toolchain.opencode.jsonc— example opencode config registering the server.requirements.txt— themcppackage.
Related MCP server: Build Runner MCP Server
Setup
git clone https://github.com/bpbenpatterson/build-mcp.git
cd build-mcp
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txtSmoke test (no opencode needed)
python build_mcp.py --selftestYou should see JSON with "error_count": 3 and structured error objects.
Wire into opencode
Copy the mcp block from opencode.jsonc into your opencode config
(~/.config/opencode/opencode.jsonc or a project opencode.json), replacing
/absolute/path/to/build-mcp with the path you cloned to. Point
BUILD_CMD at the real build tool, and command at the venv's python.
Then restart opencode and prompt:
use the build-tools tool to build the project, then fix the errorsThe agent will call build, receive the structured diagnostics, and act on them.
Using the real build tool
Set BUILD_CMD to your real command. The server appends --target <name>
(or --clean --target <name>). If your tool uses different flags, edit
run_build() in build_mcp.py.
Adapt ERROR_RE in build_mcp.py to match your tool's actual error format.
That regex is the part that carries your domain knowledge, and it is what
makes the tool useful.
Safety
buildhas a timeout (BUILD_TIMEOUT_S, default 300s).No destructive targets are exposed. If you add
deployor similar, put an approval gate in front of it.
This server cannot be deployed
Maintenance
Related MCP Connectors
Stateless TS/JS compiler facts for agents: references, imports, impact. No repo index or OAuth.
Discover software problems, analyze evidence, and create implementation-ready Build plans.
Validate JSON, YAML, XML and CSV with exact line/column errors and silent-corruption warnings.
Structured knowledge base for AI agent solutions. Search, explore, and retrieve build logs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects to Xcode's build system to extract, parse, and display errors and warnings from your Swift projects, helping AI assistants quickly identify code issues without manually searching through build logs.6MIT
- AlicenseAqualityDmaintenanceProvides structured build, compile, and test operations with parsed output to reduce token usage and improve readability.9MIT
- AlicenseNot gradedqualityDmaintenanceEnables reading IDE output, test results, and problems from development environments.11 npmMIT
- AlicenseAqualityDmaintenanceParses UEFN Verse build diagnostics from UnrealEditorFortnite.log and exposes structured error data to MCP clients.3MIT