Bazel MCP ServerServer

nacgarg
GitHub
CI/CDBuild SystemsDeveloper Tools

Loading subscription status...

💡 Description

A local MCP server that exposes the functionality of the Bazel build system to AI agents, allowing them to build, test, query, and manage Bazel projects through natural language, even in environments where Bazel cannot be directly accessed.

📝 JSON Entries

{
  "mcpServers": [
    {
      "bazel": {
        "env": {
          "MCP_BAZEL_PATH": "path/to/bazel",
          "MCP_WORKSPACE_PATH": "path/to/workspace"
        },
        "args": [
          "-y",
          "github:nacgarg/bazel-mcp-server"
        ],
        "command": "npx"
      }
    }
  ]
}

🛠️ Tools

bazel_build_targetbazel_query_targetbazel_test_targetbazel_list_targetsbazel_fetch_dependenciesbazel_set_workspace_path

Features

  • Build specified Bazel targets
  • Query dependency graphs
  • Run tests for specific targets
  • List all available targets in the workspace
  • Fetch external dependencies
  • Set the workspace path at runtime