Cover image
Try Now
2025-03-07

Servidor MCP para bazel

3 years

Works with Finder

1

Github Watches

1

Github Forks

2

Github Stars

Bazel MCP Server

A local MCP server that exposes functionality of the Bazel build system to MCP-enabled AI agents.

This is helpful when MCP environments either don't have an existing command-line tool, or where the invoked shell has a misconfigured environment that prevents Bazel from being used.

Tools

The Bazel MCP Server provides the following tools:

  • bazel_build_target: Build specified Bazel targets
  • bazel_query_target: Query the dependency graph for targets matching a pattern
  • bazel_test_target: Run tests for specified targets
  • bazel_list_targets: List all available targets in the workspace (requires path parameter, use "//" for all targets)
  • bazel_fetch_dependencies: Fetch external dependencies
  • bazel_set_workspace_path: Change the Bazel workspace path at runtime

Each command (except bazel_set_workspace_path) supports an optional additionalArgs parameter that allows passing additional arguments to the underlying Bazel command. This is useful for specifying flags like --verbose_failures or --test_output=all.

Usage

Installation

Using with Cursor

Add the following to .cursor/mcp.json.

You don't need to provide the workspace path, as the LLM can use set_workspace_path to change the workspace path at runtime.

The bazel binary usually gets picked up automatically, but if you run into issues, you can provide the path to the bazel binary using the --bazel_path flag.

:warning: Note that this will not work when using Cursor with Remote SSH sessions, since it runs the MCP server locally.

{
  "mcpServers": {
    "bazel": {
      "command": "npx",
      "args": [
        "-y",
        "github:nacgarg/bazel-mcp-server",

        // If you need to specify the bazel binary path
        "--bazel_path", 
        "/absolute/path/to/your/bazel/binary",

        // If you need to specify the workspace path
        "--workspace_path",
        "/absolute/path/to/your/bazel/workspace"

        // See Configuration Table below for more options
      ]
    }
  }
}

Using with Claude Desktop

You can use the same configuration as above with Claude Desktop.

Launching standalone

# Run directly from GitHub (no installation needed)
npx -y github:nacgarg/bazel-mcp-server

# From source
git clone https://github.com/nacgarg/bazel-mcp-server.git
cd bazel-mcp-server
npm install
npm run build
dist/index.js

Configuration

This MCP server allows a couple different configuration methods. They will be used in the following order:

  1. Command line arguments
  2. Environment variables
  3. Configuration file

Configuration Table

CLI Argument Environment Variable Configuration File Key Description
--bazel_path MCP_BAZEL_PATH bazel_path The path to the Bazel binary to use.
--workspace_path MCP_WORKSPACE_PATH workspace_path The path to the Bazel workspace to use.
--workspace_config MCP_WORKSPACE_CONFIG workspace_config The configuration of the workspace to use. By default, this uses the .bazelrc file in the workspace root.
--log_path MCP_LOG_PATH log_path The path to write server logs to.

Debugging

Set the DEBUG=true environment variable to enable verbose logging to the console.

Setting the log path is also helpful for debugging with clients that don't print logs to the console (looking at you, Cursor).

License

This project is licensed under the MIT License. See the LICENSE file for details.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Gil kaminski
  • Make sure you are post-ready before you post on social media

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • OffchainLabs
  • Implementación de la prueba de estaca Ethereum

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocolo del conector de mensajes )服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 支持员工信息查询和消息发送等功能。 支持员工信息查询和消息发送等功能。

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

    Reviews

    4 (1)
    Avatar
    user_frcchSV2
    2025-04-15

    The Unsplash Smart MCP Server by drumnation is an outstanding tool for efficiently managing and serving stunning images. Its integration with Unsplash provides access to a vast collection of high-quality photos, making it ideal for developers and creative professionals. The seamless user experience and robust performance make it a must-have for anyone looking to enhance their digital projects. Highly recommend checking it out at https://mcp.so/server/unsplash-smart-mcp-server/drumnation!