Bazel MCP Server

Exposes common Bazel actions like build, test, and dependency analysis through an MCP server.

Local serverstdioGo★ 11

What is the Bazel MCP Server?

Exposes common Bazel actions like build, test, and dependency analysis through an MCP server.

The short version

This project provides a Model Context Protocol (MCP) server that exposes tools for interacting with Bazel projects.

  • build: — Builds a specified Bazel target
  • deps: — Finds the dependencies of a given Bazel target, with an optional depth parameter
  • rdeps (Reverse Dependencies): — Finds all Bazel targets that depend on a given target or file path, with an optional depth parameter
  • sources: — Finds the direct source files associated with a given Bazel target
  • test: — Runs tests for a specified Bazel target

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Frequently asked questions

It includes functionality to build specified Bazel targets, find dependencies and reverse dependencies, identify source files, and run tests.