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.

ToolRiskSide effectsApproval
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.
readfalseunknown
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.
readfalseunknown
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).
unknownunknownunknown
get_rdeps
Find reverse dependencies of a target within scope, excluding the target itself.
readfalseunknown
bazel_build
Run a Bazel build and return structured diagnostics. options are passed as extra bazel flags (e.g. --config=ci, -c opt).
unknownunknownunknown
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/...
readfalseunknown
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.
readfalseunknown
bazel_test
Run Bazel tests and return structured pass/fail results with failure log excerpts.
unknownunknownunknown
get_deps
Get dependencies of a target up to the given depth, excluding the target itself.
readfalseunknown

02Install & source
uvx bazel-mcp-server
uvx
pip install bazel-mcp-server
pip

05Provenance & 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_statusindex5 unique facts >= 5

06Badge

Add the “as seen on MCPExplorer” badge to your README. bazel-mcp-server MCP — as seen on mcpexplorer.com

[![bazel-mcp-server MCP — as seen on mcpexplorer.com](https://mcpexplorer.com/badge/bazel-mcp-server.svg)](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 →