Overview
what is Bazel MCP Server?
Bazel MCP Server is a local server that exposes the functionality of the Bazel build system to MCP-enabled AI agents, facilitating builds in environments lacking a command-line tool or with misconfigured shells.
how to use Bazel MCP Server?
To use the Bazel MCP Server, you can run it directly from GitHub or install it locally. Configuration is done through command line arguments, environment variables, or a configuration file.
key features of Bazel MCP Server?
- Build specified Bazel targets with
bazel_build_target - Query dependency graphs with
bazel_query_target - Run tests for specified targets with
bazel_test_target - List all available targets with
bazel_list_targets - Fetch external dependencies with
bazel_fetch_dependencies - Change workspace path at runtime with
bazel_set_workspace_path
use cases of Bazel MCP Server?
- Integrating Bazel builds into AI workflows.
- Running builds in environments without direct access to Bazel.
- Facilitating automated testing and dependency management for AI applications.
FAQ from Bazel MCP Server?
- Can I run Bazel MCP Server without installing it?
Yes! You can run it directly using
npxfrom GitHub.
- How do I specify the Bazel binary path?
Use the
--bazel_pathcommand line argument or set theMCP_BAZEL_PATHenvironment variable.
- Is there a way to enable verbose logging?
Yes, set the
DEBUG=trueenvironment variable to enable verbose logging.