bazel-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Timeout in seconds for Bazel commands (default: 300) | 300 |
| bazel-path | No | Path to the Bazel executable (default: bazel) | bazel |
| workspace-root | No | Path to the Bazel workspace root (default: current directory) | |
| max-output-chars | No | Maximum output characters to capture (default: 64000) | 64000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| bazel_buildB | Run a Bazel build and return stdout, stderr, and exit code. options are passed as extra bazel flags (e.g. --config=ci, -c opt). |
| bazel_testB | Run Bazel tests and return structured pass/fail results with failure log excerpts. |
| explain_build_fileB | 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). |
| bazel_queryA | 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. |
| list_targetsA | 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/... |
| get_depsA | Get dependencies of a target up to the given depth, excluding the target itself. |
| get_rdepsA | Find reverse dependencies of a target within scope, excluding the target itself. |
| show_target_infoA | Show the BUILD rule definition for a target (bazel query --output=build). Macro-generated targets may differ from on-disk BUILD files. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: build, test, query, file explanation, dependency queries, target listing, and target info. No overlap or ambiguity.
Three tools use the 'bazel_' prefix (bazel_build, bazel_test, bazel_query) while the rest use plain verb_noun (explain_build_file, get_deps, etc.). The inconsistency is noticeable but still readable.
8 tools is well-scoped for a Bazel MCP server, covering the essential operations without unnecessary bloat.
Core workflows (build, test, query, dependency analysis, file inspection) are covered. Minor gaps like 'bazel run' or 'clean' are missing but not critical.