Docs / Getting Started / Installation

Installation

The Barrd MCP server is a standalone binary that runs locally and connects your AI assistant to the Barrd backend. It communicates over stdio using the Model Context Protocol.

Download

Grab the latest binary from GitHub Releases.

macOS (Apple Silicon)

Terminal
curl -L -o barrd-mcp https://github.com/barrdlabs/barrd/releases/latest/download/barrd-mcp-aarch64-apple-darwin
chmod +x barrd-mcp
sudo mv barrd-mcp /usr/local/bin/

macOS (Intel)

Terminal
curl -L -o barrd-mcp https://github.com/barrdlabs/barrd/releases/latest/download/barrd-mcp-x86_64-apple-darwin
chmod +x barrd-mcp
sudo mv barrd-mcp /usr/local/bin/

Linux (x86_64)

Terminal
curl -L -o barrd-mcp https://github.com/barrdlabs/barrd/releases/latest/download/barrd-mcp-x86_64-unknown-linux-gnu
chmod +x barrd-mcp
sudo mv barrd-mcp /usr/local/bin/

Linux (ARM64)

Terminal
curl -L -o barrd-mcp https://github.com/barrdlabs/barrd/releases/latest/download/barrd-mcp-aarch64-unknown-linux-gnu
chmod +x barrd-mcp
sudo mv barrd-mcp /usr/local/bin/

Build from source

Terminal
git clone https://github.com/barrdlabs/barrd.git
cd barrd
cargo build --release
# Binary at target/release/barrd-mcp

Connect to Claude Code

The fastest way to get started. One command:

Terminal
claude mcp add barrd /usr/local/bin/barrd-mcp -e BARRD_API_KEY=your-api-key

Get your API key from the Barrd dashboard under Settings → API Keys.

That's it. The server reads BARRD_API_KEY from the environment and connects to the Barrd API automatically. No config files needed.

Claude Desktop

Add Barrd to your Claude Desktop MCP configuration:

claude_desktop_config.json
{
  "mcpServers": {
    "barrd": {
      "command": "/usr/local/bin/barrd-mcp",
      "env": {
        "BARRD_API_KEY": "your-api-key"
      }
    }
  }
}

On macOS, this file lives at ~/Library/Application Support/Claude/claude_desktop_config.json.

Other MCP clients

Any MCP-compatible client can connect to Barrd. The server uses stdio transport with auto-detected framing:

  • Line-delimited — one JSON-RPC message per line (default for most clients)
  • Framed — HTTP-style Content-Length headers (LSP-compatible)

Transport mode is auto-detected from the first message, or can be forced with --transport line or --transport framed.

Configuration

The server resolves configuration in this order:

  1. BARRD_MCP_CONFIG env var — path to a JSON config file
  2. ~/.config/barrd/mcp.json — default config file location
  3. Environment variables — BARRD_API_KEY and optionally BARRD_API_URL

For most users, just setting BARRD_API_KEY is enough.

Environment variables

BARRD_API_KEY required API key for authentication
BARRD_API_URL API base URL. Default: https://api.barrd.com. Override for self-hosted.
BARRD_MCP_CONFIG Path to a JSON config file
RUST_LOG Log level: debug, info, warn, error

Config file

Only needed if you prefer file-based config over environment variables:

~/.config/barrd/mcp.json
{
  "api": {
    "base_url": "https://api.barrd.com",
    "key": "your-api-key"
  }
}

Code intelligence (LSP)

Barrd includes built-in LSP integration for semantic code understanding — go-to-definition, find references, hover info, and workspace symbol search. To use it, install the language server for the languages you work with:

Language servers
# Go
go install golang.org/x/tools/gopls@latest

# Rust rustup component add rust-analyzer

# TypeScript / JavaScript npm install -g typescript-language-server typescript

# Python npm install -g pyright

LSP servers start automatically on first use and stay alive for subsequent requests. No additional configuration needed.

Supported languages

Go gopls — fully tested
Rust rust-analyzer — fully tested
TypeScript / JavaScript typescript-language-server — fully tested
Python pyright — supported, not extensively tested

Debugging

Enable debug logging to troubleshoot connection or LSP issues:

Terminal
RUST_LOG=debug barrd-mcp

Next steps