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)
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)
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)
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)
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
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:
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.
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:
{
"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-Lengthheaders (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:
BARRD_MCP_CONFIGenv var — path to a JSON config file~/.config/barrd/mcp.json— default config file location- Environment variables —
BARRD_API_KEYand optionallyBARRD_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:
{
"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:
# 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 testedRust rust-analyzer — fully testedTypeScript / JavaScript typescript-language-server — fully testedPython pyright — supported, not extensively testedDebugging
Enable debug logging to troubleshoot connection or LSP issues:
RUST_LOG=debug barrd-mcp