Feedback

Bazel MCP Server — by nacgarg

@nacgarg Claim

Basic information

Runtime
node
Category
License
MIT
Transports
stdio
Author
nacgarg
Submitted by
Community
Quality
10
Stars
9

About Bazel MCP Server

MCP server for Bazel

Bazel MCP Server is a MCP server in the Other category listed in the AddMCP.net directory, published by nacgarg. Supported transport: stdio. Runtime: node. License: MIT. The repository has 9 GitHub stars. Source code is hosted on github.com.

Setup

{
    "mcpServers": {
        "bazel-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "github:nacgarg/bazel-mcp-server"
            ]
        }
    }
}

Bazel MCP Server — by nacgarg config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "bazel-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "github:nacgarg/bazel-mcp-server"
            ]
        }
    }
}

Bazel MCP Server — by nacgarg tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Bazel MCP Server?

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.

How to use Bazel MCP Server?

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.

Key features of Bazel MCP Server

  • Build specified Bazel targets
  • Query the dependency graph for matching targets
  • Run tests for specified targets
  • List all available targets in the workspace
  • Fetch external dependencies
  • Change the Bazel workspace path at runtime
  • Pass additional arguments to underlying Bazel commands

Use cases of Bazel MCP Server

  • Build specific targets from an AI agent without a working shell
  • Query the Bazel dependency graph to understand target relationships
  • Run tests and view results through the agent
  • List all targets in a workspace to explore available build rules
  • Fetch external dependencies before building or testing

Frequently asked questions

1 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.

2 What are the runtime dependencies?

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.

3 How do I set the Bazel workspace path?

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.

4 Does the server work with Cursor Remote SSH sessions?

No, the server runs locally and will not work when using Cursor with Remote SSH sessions.

5 Can I pass extra flags to Bazel commands?

Yes, each tool (except bazel_set_workspace_path) accepts an optional additionalArgs parameter to supply extra flags like --verbose_failures or --test_output=all.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬