servers / bazel-mcp-server
bazel-mcp-server
communityunknownpythonunknownhealthy
MCP server for Bazel: query targets, analyze deps, build, test, and read BUILD files
01Tools · 9
How to read this: tool names here are observed from a live tools/list handshake. The Risk label is a heuristic inferred from the tool name (write/destructive verbs), not from executing the tool — a conservative guess, not a verified capability. We never escalate risk from a description. Found one that's wrong? Tell us — we fix on report.
| Tool | Risk | Side effects | Approval |
|---|---|---|---|
| bazel_query Run an arbitrary Bazel query expression.
Query is read-only but can be expensive on broad patterns like //...
output_format: label, build, xml, package, location, graph, etc. | read | false | unknown |
| show_target_info Show the BUILD rule definition for a target (bazel query --output=build).
Macro-generated targets may differ from on-disk BUILD files. | read | false | unknown |
| explain_build_file Return BUILD file contents for analysis by the host LLM.
path is relative to the workspace root (e.g. foo/bar/BUILD or foo/bar). | unknown | unknown | unknown |
| get_rdeps Find reverse dependencies of a target within scope, excluding the target itself. | read | false | unknown |
| bazel_build Run a Bazel build and return structured diagnostics.
options are passed as extra bazel flags (e.g. --config=ci, -c opt). | unknown | unknown | unknown |
| list_targets List all targets matching a package pattern.
Default //... lists targets across the entire workspace (can be slow).
For a single package use //pkg or pkg (normalized to //pkg:all).
For a subtree use //pkg/... | read | false | unknown |
| find_affected_targets Find all Bazel targets affected by a set of changed files.
This is useful for CI optimization - only rebuild/test what's changed. | read | false | unknown |
| bazel_test Run Bazel tests and return structured pass/fail results with failure log excerpts. | unknown | unknown | unknown |
| get_deps Get dependencies of a target up to the given depth, excluding the target itself. | read | false | unknown |
02Install & source
uvx bazel-mcp-server
uvxpip install bazel-mcp-server
pip05Provenance & freshness
sourcesPyPI [p4]
last_checked2026-07-29 09:37Z
next_check2026-07-31 09:31Z
cadenceevery 48h
verifiedtools_list:passed handshake:passed metadata:passed
index_statusindex — 5 unique facts >= 5
06Badge
Add the “as seen on MCPExplorer” badge to your README.
[](https://mcpexplorer.com/servers/bazel-mcp-server)
Next step
This is one server. A loadout combines the right servers, governance, and proven plays for a whole job — assembled deliberately, not tool-dumped.
Explore loadouts →