What does Bazel MCP Server do that the regular Bazel CLI cannot?
It provides an MCP-compatible interface so that AI agents can interact with Bazel even when the invoked shell is misconfigured or lacks the Bazel command-line tool.
@nacgarg
基本信息
MCP server for Bazel
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"bazel-mcp-server": {
"command": "npx",
"args": [
"-y",
"github:nacgarg/bazel-mcp-server"
]
}
}
}Build specified Bazel targets
Query the dependency graph for targets matching a pattern
Run tests for specified targets
List all available targets in the workspace (requires path parameter, use "//" for all targets)
Fetch external dependencies
Change the Bazel workspace path at runtime
Bazel MCP Server is a local MCP server that exposes functionality of the Bazel build system to MCP-enabled AI agents. It is useful when MCP environments lack a command-line tool or have a misconfigured shell that prevents Bazel from being used.
Install by adding a configuration entry to .cursor/mcp.json (for Cursor) or launching standalone with npx -y github:nacgarg/bazel-mcp-server. Configuration can be provided via CLI arguments, environment variables, or a configuration file. The AI agent can change the workspace path at runtime using the bazel_set_workspace_path tool.
It provides an MCP-compatible interface so that AI agents can interact with Bazel even when the invoked shell is misconfigured or lacks the Bazel command-line tool.
The server requires Node.js (to run via `npx`) and the Bazel binary. The path to the Bazel binary can be specified via `--bazel_path` or the `MCP_BAZEL_PATH` environment variable.
The workspace path can be set at startup via the `--workspace_path` CLI argument, the `MCP_WORKSPACE_PATH` environment variable, or a configuration file. At runtime, the AI agent can use the `bazel_set_workspace_path` tool to change it.
No, the server runs locally and will not work when using Cursor with Remote SSH sessions.
Yes, each tool (except `bazel_set_workspace_path`) accepts an optional `additionalArgs` parameter to supply extra flags like `--verbose_failures` or `--test_output=all`.
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

A free remote MCP server for The Living Bread. Bible passages read word for word from a stored public domain text with an evidence label, keyword search and cross references, real churches, gatherings and prayer groups w
🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。

Connect your AI assistant to your own YOUB endurance training account. Read recorded activities with full analysis, planned sessions, race goals, wellness (HRV, sleep, resting HR) and your athletic profile. Create or mov

Couples therapist Figs O'Sullivan (LMFT, 17 years, endorsed by Sue Johnson, creator of EFT) inside your AI. Ask relationship questions answered from his clinical writing, name the pattern in a fight, get a three-step rep
评论