MCP server for interacting with Bazel
MCP server for interacting with Bazel
A local MCP server that exposes functionality of the Bazel build system to MCP-enabled AI agents.
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
bazel_build_target — Build specified Bazel targetsbazel_query_target — Query the dependency graph for targets matching a patternbazel_test_target — Run tests for specified targetsbazel_list_targets — List all available targets in the workspace (requires path parameter, use "//" for all targets)bazel_fetch_dependencies — Fetch external dependenciesbazel_set_workspace_path — Change the Bazel workspace path at runtimeInstallation — The Installation tool exposed by this serverConfiguration — This MCP server allows a couple different configuration methods. They will be used in the following order:bazel_build_target — Build specified Bazel targetsbazel_query_target — Query the dependency graph for targets matching a patternbazel_test_target — Run tests for specified targetsbazel_list_targets — List all available targets in the workspace (requires path parameter, use "//" for all targets)bazel_fetch_dependencies — Fetch external dependenciesbazel_set_workspace_path — Change the Bazel workspace path at runtimeCompare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| bazel_build_target | Build specified Bazel targets |
| bazel_query_target | Query the dependency graph for targets matching a pattern |
| bazel_test_target | Run tests for specified targets |
| bazel_list_targets | List all available targets in the workspace (requires path parameter, use "//" for all targets) |
| bazel_fetch_dependencies | Fetch external dependencies |
| bazel_set_workspace_path | Change the Bazel workspace path at runtime |
claude mcp add bazel --env MCP_BAZEL_PATH=your-value --env MCP_WORKSPACE_PATH=your-value --env MCP_LOG_PATH=your-value -- npx -y github| Variable | Description | Required |
|---|---|---|
| MCP_BAZEL_PATH | Filesystem location the server is allowed to use. | Optional |
| MCP_WORKSPACE_PATH | Filesystem location the server is allowed to use. | Optional |
| MCP_LOG_PATH | Filesystem location the server is allowed to use. | Optional |
Read, search and edit files inside allowed directories with the Model Context Protocol reference Filesystem server.
Retrieve version-aware library documentation and code examples with Context7 MCP, using resolve-library-id and query-docs.
Use Microsoft’s Playwright MCP server to navigate pages, inspect accessibility snapshots, fill forms and capture browser screenshots.
Connect GitHub MCP to repositories, issues and pull requests with GitHub’s hosted service or a locally run server.
Use the Supabase MCP server to inspect database schemas, query project data and retrieve docs through a project-scoped connection.
Search Linear issues and projects, inspect work context and manage updates through Linear’s hosted MCP server with OAuth.