RayBridge
MCP server that bridges Raycast extensions to any MCP-compatible client.
Discovers locally installed Raycast extensions, loads their tool definitions, and serves them over the Model Context Protocol via stdio or HTTP.

How it works
- Scans
~/.config/raycast/extensions/for installed extensions withtoolsdefinitions - Loads OAuth tokens from Raycast's encrypted SQLite database
- Registers tools as MCP tools accessible to any MCP client
Extensions that use Raycast UI APIs (List, Detail, Form, etc.) are supported — the UI components are shimmed to no-ops so the underlying tool logic can execute headlessly. Extensions whose tools perform background work (API calls, data lookups, transformations) work best.
Setup
Prerequisites
- Bun
- Raycast installed with extensions
sqlcipherCLI (for OAuth token access):brew install sqlcipher
Install
bun install
Configure MCP client
Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"raybridge": {
"command": "bun",
"args": ["run", "src/index.ts"],
"cwd": "/path/to/raybridge"
}
}
}
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"raybridge": {
"command": "bun",
"args": ["run", "src/index.ts"],
"cwd": "/path/to/raybridge"
}
}
}
HTTP Transport
The server can also run as an HTTP server for remote MCP clients.
Start the server:
# Default: http://0.0.0.0:3000
bun run start:http
# Custom host/port
MCP_PORT=8080 MCP_HOST=0.0.0.0 bun run start:http
# With API key authentication
MCP_API_KEY=your-secret-key bun run start:http
# CLI flags also work
bun run src/index.ts --http --port 8080 --host 0.0.0.0
Endpoints:
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check (no auth required) |
/mcp |
POST | MCP requests (requires auth if MCP_API_KEY set) |
/mcp |
DELETE | Terminate session |
Authentication:
When MCP_API_KEY is set, requests to /mcp must include a Bearer token (per MCP spec):
Authorization: Bearer your-secret-key
Example session:
# 1. Initialize session (capture session ID from response header)
curl -X POST http://127.0.0.1:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer your-secret-key" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{
"protocolVersion":"2024-11-05",
"capabilities":{},
"clientInfo":{"name":"my-client","version":"1.0"}
}}'
# Response includes: mcp-session-id header
# 2. List available tools
curl -X POST http://127.0.0.1:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer your-secret-key" \
-H "mcp-session-id: <session-id-from-step-1>" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
# 3. Call a tool
curl -X POST http://127.0.0.1:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer your-secret-key" \
-H "mcp-session-id: <session-id-from-step-1>" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{
"name":"web",
"arguments":{"tool_name":"read_page","input":{"url":"https://example.com"}}
}}'
Sessions auto-expire after 30 minutes of inactivity.
CLI
RayBridge includes a CLI for managing which extensions and tools are exposed:
bun link # Register the raybridge command (one-time setup)
raybridge # Launch interactive TUI
raybridge config # Launch interactive TUI
raybridge list # List all extensions and their status
raybridge help # Show help
The TUI allows you to:
- Toggle extensions on/off
- Expand extensions to toggle individual tools
- Switch between blocklist mode (all enabled by default) and allowlist mode
- Save configuration to
~/.config/raybridge/tools.json
Configuration
Tools configuration
Control which extensions and tools are exposed via ~/.config/raybridge/tools.json:
{
"mode": "blocklist",
"extensions": {
"extension-name": {
"enabled": false
},
"another-extension": {
"enabled": true,
"tools": ["specific-tool-1", "specific-tool-2"]
}
}
}
- blocklist mode (default): All extensions enabled unless explicitly disabled
- allowlist mode: All extensions disabled unless explicitly enabled
Extension preferences
Extensions that require configuration (API keys, personal access tokens, etc.) read fr
Tools 1
raycast-extension-toolsExposes tools defined within locally installed Raycast extensions for headless execution.Environment Variables
MCP_PORTPort for HTTP server modeMCP_HOSTHost for HTTP server modeMCP_API_KEYAPI key for HTTP server authentication