Bazel Mcp
@saeid-rez
关于 Bazel Mcp
A local MCP server that exposes Bazel build system capabilities to AI assistants.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"bazel": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/saeid-rez/bazel-mcp",
"bazel-mcp"
]
}
}
}工具
8Run arbitrary `bazel query` expressions
List targets in a package or subtree
Direct or transitive dependencies of a target
Reverse dependencies within a scope
Rule definition via `query --output=build`
Run `bazel build`
Run `bazel test` with structured results
Read BUILD file contents for analysis
概览
What is Bazel Mcp?
Bazel Mcp is a Model Context Protocol server that exposes Bazel build system capabilities to AI assistants. It is designed for developers who want to interact with a Bazel workspace through an MCP-enabled client such as Cursor.
How to use Bazel Mcp?
Install the server with uvx and add a configuration entry to your MCP client’s JSON file (e.g., .cursor/mcp.json). Bazel commands run in your open workspace by default; if your client does not start from that directory, pass the workspace root explicitly with the --workspace-root flag.
Features of Bazel Mcp
- Run arbitrary
bazel queryexpressions - List targets in a package or subtree
- Get direct or transitive dependencies of a target
- Get reverse dependencies within a scope
- Show rule definition via
query --output=build - Run
bazel buildandbazel test - Read BUILD file contents for analysis
Use cases of Bazel Mcp
- Ask an AI assistant for the dependencies of a specific Bazel target
- Let an AI assistant build or test a target and return structured results
- Have an AI assistant explain the contents of a BUILD file
- Query the build graph for reverse dependencies during refactoring
FAQ from Bazel Mcp
What does Bazel Mcp do?
It provides tools (bazel_query, list_targets, get_deps, get_rdeps, show_target_info, bazel_build, bazel_test, explain_build_file) that an AI assistant can invoke to inspect and control a Bazel workspace.
What runtime does it require?
The server requires uv to run.
Where are Bazel commands executed?
Commands run in the Bazel workspace that is open in your MCP client by default. If the client does not start the server from the workspace, you must supply the workspace root path via the --workspace-root flag.
Are there any optional configuration flags?
Yes. You can set --bazel-path to specify the Bazel binary (e.g., bazelisk), --timeout to change the command timeout in seconds, and --max-output-chars to limit the number of characters in command output.
其他 分类下的更多 MCP 服务器
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,

EverArt
modelcontextprotocolModel Context Protocol Servers
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
评论