Submit

Bazel MCP Server

@nacgarg

a year ago
developer-tools
MCP server for Bazel
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 the use of Bazel 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 either integrate it with tools like Cursor or Claude Desktop by adding specific configurations, or run it directly from GitHub without installation using the command: npx -y github:nacgarg/bazel-mcp-server.

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?

  1. Enabling Bazel functionality in AI agents without direct command-line access.
  2. Facilitating builds and tests in environments with misconfigured shells.
  3. Providing a local server for Bazel commands in various development setups.

FAQ from Bazel MCP Server?

  • Can I run Bazel MCP Server without installation?

Yes! You can run it directly using npx command.

  • What if I need to specify the Bazel binary path?

You can provide the path using the --bazel_path flag in your configuration.

  • Is there a way to enable verbose logging?

Yes, set the DEBUG=true environment variable to enable verbose logging.

© 2025 MCP.so. All rights reserved.

Build with ShipAny.