Labsco
saeid-rez logo

Bazel MCP

โ˜… 2

from saeid-rez

A local MCP server that exposes Bazel build system capabilities to AI assistants.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

Bazel MCP

A Model Context Protocol server that exposes Bazel build system capabilities to AI assistants.

Repo: github.com/saeid-rez/bazel-mcp

Tools

ToolDescription
bazel_queryRun arbitrary bazel query expressions
list_targetsList targets in a package or subtree
get_depsDirect or transitive dependencies of a target
get_rdepsReverse dependencies within a scope
show_target_infoRule definition via query --output=build
bazel_buildRun bazel build with structured failure diagnostics
bazel_testRun bazel test with structured target and failed-case results
explain_build_fileRead BUILD file contents for analysis

Development

Clone the repo and run tests locally:

git clone https://github.com/saeid-rez/bazel-mcp
cd bazel-mcp
uv sync --group dev
uv run pytest