Bazel Mcp

MCP其他

提供方 saeid-rez

其他 HTTP · 远程 会话登录 社区 / 第三方 CursorCodexZed
查看接入方式

A local MCP server that exposes Bazel build system capabilities to AI assistants.

一句话选型结论

按资料字段整理

Bazel Mcp 属于其他类 MCP 服务器,HTTP · 远程,会话登录,可直接接入 Cursor、Codex、Zed,有可直接复制的远程端点配置。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类其他 传输方式HTTP · 远程 鉴权会话登录 部署方式远程部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

其他
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

bazel local build

支持客户端

适用场景

bazellocalbuild

安装与配置

HTTP · 远程 会话登录
连远程 HTTPS 端点,通常为 Streamable HTTP
uvx --from git+https://github.com/saeid-rez/bazel-mcp bazel-mcp

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
接入外部数据

把外部系统的数据接进对话。

自动化重复操作

把固定步骤交给模型跑。

补充工具能力

给模型补上它原本没有的能力。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Cursor、Codex、Zed,换客户端不用重新研究配置。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 使用前要准备好会话登录对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在其他场景里让模型直接调用外部能力的人。
  • 已经在用 Cursor、Codex 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Bazel Mcp当前 未标注 HTTP · 远程 远程部署 有 未标注
gemini-cli 未标注 stdio · 本地进程 本地部署 有 2026-04-13
ext-apps 未标注 stdio · 本地进程 本地部署 有 2026-04-19
northcinder 未标注 stdio · 本地进程 本地部署 有 2026-08-23
fastctx 未标注 stdio · 本地进程 本地部署 有 2026-08-23
quickstart-resources 未标注 stdio · 本地进程 本地部署 有 2026-04-12

服务器档案

其他
字段来自项目仓库与公开索引,中文说明由本站标注
提供方saeid-rez上游标注的维护方 saeid-rez
分类其他本站按上游分类展示
连接方式HTTP · 远程连远程 HTTPS 端点,通常为 Streamable HTTP
鉴权方式会话登录远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Cross-platform本地安装时用到的包标识与运行时
部署类型远程部署上游给出的部署形态
最近核验未标注上游最后核验时间

详细介绍

4.9 KB
来自项目仓库与上游目录的原文,未做删改

Bazel MCP

A Model Context Protocol server that exposes Bazel build system capabilities to AI assistants.

Repo: github.com/saeid-rez/bazel-mcp

Tools

Tool Description
bazel_query Run arbitrary bazel query expressions
bazel_cquery Run configured bazel cquery expressions (select() and platforms)
bazel_aquery Run action bazel aquery expressions (compiler flags, commands)
list_targets List targets in a package or subtree
get_deps Direct or transitive dependencies of a target
get_rdeps Reverse dependencies within a scope
get_dependency_path Trace dependency chains (somepath/allpaths) between targets
show_target_info Rule definition via query --output=build
find_affected_targets Find targets affected by changed files
bazel_build Run bazel build with structured failure diagnostics
bazel_test Run bazel test with structured target and failed-case results
bazel_run Run bazel run with arguments, environment variables, and working directory controls
explain_build_file Read BUILD file contents for analysis

Usage

Requires uv. Configure the server with a Bazel workspace path if your MCP client does not start it from that workspace.

Antigravity (agy)

Add the following to ~/.gemini/config/mcp_config.json:```json
{
"mcpServers": {
"bazel": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/saeid-rez/bazel-mcp",
"bazel-mcp-server"
]
}
}
}


Bazel commands run in your active workspace by default. If Antigravity does not start the server from your Bazel workspace, pass `--workspace-root` explicitly:```json
{
  "mcpServers": {
    "bazel": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/saeid-rez/bazel-mcp",
        "bazel-mcp-server",
        "--workspace-root",
        "/path/to/your/bazel/workspace"
      ]
    }
  }
}

OpenCode

Add the following to opencode.json or opencode.jsonc. Replace /path/to/your/bazel/workspace with the absolute path to your Bazel workspace.```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"bazel": {
"type": "local",
"command": [
"uvx",
"--from",
"git+https://github.com/saeid-rez/bazel-mcp",
"bazel-mcp-server",
"--workspace-root",
"/path/to/your/bazel/workspace"
],
"enabled": true
}
}
}


### GitHub Copilot CLI

Add the following to `~/.copilot/mcp-servers.json`. Replace `/path/to/your/bazel/workspace` with the absolute path to your Bazel workspace.```json
{
  "mcp": {
    "servers": {
      "bazel": {
        "command": "uvx",
        "args": [
          "--from",
          "git+https://github.com/saeid-rez/bazel-mcp",
          "bazel-mcp-server",
          "--workspace-root",
          "/path/to/your/bazel/workspace"
        ],
        "protocol": "stdio"
      }
    }
  }
}

Alternatively, run /mcp add bazel inside Copilot CLI and provide the same command and arguments.

Install With uv

To install the server persistently instead of running it from GitHub, run:```bash
uv tool install bazel-mcp-server


Then use the following installed-server configuration in place of the GitHub-based command above. Include `--workspace-root` and its path when the client does not start the server from the Bazel workspace.

Antigravity (agy):```json
{
  "mcpServers": {
    "bazel": {
      "command": "bazel-mcp-server",
      "args": ["--workspace-root", "/path/to/your/bazel/workspace"]
    }
  }
}

OpenCode:```json
{
"mcp": {
"bazel": {
"type": "local",
"command": ["bazel-mcp-server", "--workspace-root", "/path/to/your/bazel/workspace"],
"enabled": true
}
}
}


GitHub Copilot CLI:```json
{
  "mcp": {
    "servers": {
      "bazel": {
        "command": "bazel-mcp-server",
        "args": ["--workspace-root", "/path/to/your/bazel/workspace"],
        "protocol": "stdio"
      }
    }
  }
}

Cursor

Add this to .cursor/mcp.json in the Bazel workspace.```json
{
"mcpServers": {
"bazel": {
"command": "uvx",
"args": ["--from", "git+https://github.com/saeid-rez/bazel-mcp", "bazel-mcp-server"]
}
}
}


Bazel commands run in your open workspace by default.

If Cursor does not start the server from the Bazel workspace, pass the workspace explicitly:```json
{
  "mcpServers": {
    "bazel": {
      "command": "uvx",
      "args": [
        "bazel-mcp-server",
        "--workspace-root",
        "/path/to/your/bazel/workspace"
      ]
    }
  }
}

Other optional flags:```bash
bazel-mcp-server --bazel-path bazelisk --timeout 600 --max-output-chars 64000


## Development

Clone the repo and run tests locally:```bash
git clone https://github.com/saeid-rez/bazel-mcp
cd bazel-mcp
uv sync --group dev
uv run pytest

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Bazel Mcp 怎么安装?

在客户端按下面的安装命令接入:uvx --from git+https://github.com/saeid-rez/bazel-mcp bazel-mcp。装完在客户端配置里引用同一个包或端点。

Bazel Mcp 怎么在 Cursor、Codex、Zed 里配置?

它的传输方式是HTTP · 远程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Bazel Mcp 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Bazel Mcp 需要 API Key 吗?

资料标注需要会话登录认证,使用前准备好对应凭据,并按最小权限配置。

Bazel Mcp 支持哪些客户端?

资料标注支持 Cursor、Codex、Zed;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Bazel Mcp 能提供哪些能力?

资料显示能力标签包括 bazel、local、build。具体工具清单以官方文档为准。

Bazel Mcp 需要什么运行环境?

运行时为 Cross-platform;属于远程端点,不需要在本地装运行时。

Bazel Mcp 是本地还是远程?

它是远程端点,连服务地址即可。传输方式为HTTP · 远程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 未标注。