Provides Bazel-related MCP endpoints to build targets, inspect dependencies, list sources, and run tests.
Configuration
View docs{
"mcpServers": {
"aaomidi-mcp-bazel": {
"command": "/path/to/your/go/bin/mcp-bazel",
"args": []
}
}
}You have a Bazel MCP Server that exposes focused tools to interact with Bazel projects. It enables you to build targets, inspect dependencies, locate sources, and run tests directly through an MCP client for streamlined development workflows.
You connect to the Bazel MCP Server from an MCP client or integration. Use the provided tools to perform common Bazel tasks without leaving your editor or IDE environment. The available actions let you build targets, discover dependencies and reverse dependencies, list source files, and run tests. You can combine these capabilities to explore a Bazel project, automate build pipelines, or integrate Bazel insights into your development tooling.
Prerequisites you need before installing the server:
Install the Go toolchain so you can compile and install the MCP server.
Install the server binary using Go. Run the following command in your shell.
# Ensure your Go environment is set up (GOPATH, GOBIN, etc.)
go install github.com/aaomidi/mcp-bazel@latestAfter installation, you will have a binary named mcp-bazel placed in your Go bin directory (typically $GOPATH/bin or $HOME/go/bin). The next step is to point your MCP client or config to the location of this binary so the client can launch the server when needed.
If you are integrating with Claude Desktop, configure an MCP server entry that points to the installed binary. Use a stdio configuration that references the path to the mcp-bazel executable on your system.
- Ensure the path to the mcp-bazel binary is accessible from your system PATH or use the full path in your client configuration.
- If the server does not appear in your MCP client, verify that the binary executable has execute permissions and that your client is configured to start the MCP server on demand.
Builds a specified Bazel target using the MCP interface to trigger Bazel's build for that target.
Finds dependencies for a given Bazel target, with an optional depth parameter to limit the traversal.
Finds all targets that depend on a given target or file path, with an optional depth parameter to limit the search.
Lists direct source files associated with a Bazel target to help you understand where code for the target originates.
Runs tests for a specified Bazel target to quickly verify correctness within your workflow.