Skip to main content
Glama

Bazel MCP Server

by nacgarg

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DEBUGNoEnable verbose logging to the console.
MCP_LOG_PATHNoThe path to write server logs to.
MCP_BAZEL_PATHNoThe path to the Bazel binary to use.
MCP_WORKSPACE_PATHNoThe path to the Bazel workspace to use.
MCP_WORKSPACE_CONFIGNoThe configuration of the workspace to use. By default, this uses the .bazelrc file in the workspace root.

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
bazel_build_target

Build specified Bazel targets

bazel_query_target

Query the Bazel dependency graph for targets matching a pattern

bazel_test_target

Run Bazel tests for specified targets

bazel_list_targets

List all available Bazel targets under a given path

bazel_fetch_dependencies

Fetch Bazel external dependencies

bazel_set_workspace_path

Set the current Bazel workspace path for subsequent commands

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nacgarg/bazel-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server