About Bazel MCP Server
Bazel MCP Server exposes tools for working with Bazel projects, for developers using MCP-enabled applications. It covers builds, tests, and target dependency and source inspection; the project is under active development.
Key features
- 01Build a Bazel target
- 02Run target tests
- 03Inspect direct dependencies
- 04Find reverse dependencies
- 05List target source files
Use cases
- 01Build a specified project target
- 02Run tests for a target
- 03Trace which targets depend on a file
- 04Review a target's dependencies and sources
MCP support
The server exposes Bazel action tools to MCP clients, including `build`, `test`, `deps`, `rdeps`, and `sources`.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEBazel MCP Server
This project provides a Model Context Protocol (MCP) server that exposes tools for interacting with Bazel projects.
Status: 🚧 Under Active Development 🚧
Features and interfaces may change.
Features
This server currently provides the following tools:
build: Builds a specified Bazel target.deps: Finds the dependencies of a given Bazel target, with an optional depth parameter.rdeps(Reverse Dependencies): Finds all Bazel targets that depend on a given target or file path, with an optional depth parameter.sources: Finds the direct source files associated with a given Bazel target.test: Runs tests for a specified Bazel target.
Usage with Claude Desktop
This server is designed to be used as a tool provider for applications like the Claude Desktop app.
1. Installation
Install the server using go install:
# Ensure your Go environment is set up (GOPATH, GOBIN, etc.)
go install github.com/aaomidi/mcp-bazel@latest
This command compiles and installs the mcp-bazel binary. By default, it's placed in your $GOPATH/bin directory or $HOME/go/bin if GOPATH is not set. Make sure this location is in your system's PATH or note the full path to the binary for the next step.
2. Configuration
Add the following configuration to your Claude Desktop settings file (claude_desktop_config.json). You can usually find this file via the app's settings menu ("Open Config Folder").
Modify the "command" path to point to the actual location where go install placed the mcp-bazel binary on your system.
{
"mcpServers": {
"mcp-bazel": {
"command": "/path/to/your/go/bin/mcp-bazel"
}
}
}
3. Restart Claude Desktop
After saving the configuration file, restart the Claude Desktop app. The Bazel tools should now be available.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.