Prerequisites

  • Claude Code CLI installed
  • A ProBeya API key (generate from Settings > API Keys in the ProBeya web app)
  • Node.js 18+ installed
  • The ProBeya MCP server built (apps/mcp/dist/index.js)

Step 1: Add the MCP Server

Use the claude mcp add command to register the ProBeya MCP server:

claude mcp add probeya -- node /path/to/probeya/apps/mcp/dist/index.js

Replace /path/to/probeya/ with the absolute path to your ProBeya installation.

Using npx (no local clone needed)

If the MCP server is published as an npm package:

claude mcp add probeya -- npx @probeya/mcp

Step 2: Set Environment Variables

The MCP server requires environment variables for authentication and database access. Set them in your shell profile or pass them when starting Claude Code:

# Option A: Export in your shell profile (~/.bashrc, ~/.zshrc)
export PRPROBEYA_API_KEY="probeya_sk_live_..."
export DATABASE_URL="postgresql://user:pass@host:5432/probeya"

# Option B: Inline when running Claude Code
PRPROBEYA_API_KEY="probeya_sk_live_..." DATABASE_URL="postgresql://..." claude

The PRPROBEYA_API_KEY environment variable must be available to the MCP server process. If you set it in your shell profile, restart your terminal after making changes.

Step 3: Verify the Server is Registered

List all configured MCP servers to confirm ProBeya is registered:

claude mcp list

Expected output:

probeya: node /path/to/probeya/apps/mcp/dist/index.js

Step 4: Test the Connection

Start Claude Code and try a simple query:

claude

Then ask:

“List my ProBeya workspaces”

Claude Code should invoke the list_workspaces tool via the MCP server and return your organization’s workspace hierarchy.

You can also verify the available tools:

“What ProBeya tools do you have access to?”

Claude Code will list all registered tools from the MCP server, grouped by category.

Managing the Server

Update the server path

If you move the ProBeya installation or rebuild the MCP server:

# Remove the old registration
claude mcp remove probeya

# Add the new path
claude mcp add probeya -- node /new/path/to/apps/mcp/dist/index.js

Temporarily disable

claude mcp remove probeya

Check server health

If tools are not responding, verify the server can start manually:

PRPROBEYA_API_KEY="probeya_sk_live_..." \
DATABASE_URL="postgresql://..." \
node /path/to/probeya/apps/mcp/dist/index.js

The server should output startup messages to stderr:

[MCP] Authenticating...
[MCP] Jane Smith ([email protected]) -- org org_abc123
[MCP] Scopes: full access
[MCP] ProBeya MCP server v2.0.0 ready (stdio)

If it exits with an error, check the error message for authentication or database connectivity issues.

Troubleshooting

Project-Level Configuration

For team setups, you can add the MCP server configuration to a project-level .claude/settings.json so all team members get the same MCP servers:

.claude/settings.json
{
  "mcpServers": {
    "probeya": {
      "command": "node",
      "args": ["./apps/mcp/dist/index.js"]
    }
  }
}

Each developer still needs to set PRPROBEYA_API_KEY and DATABASE_URL in their own environment (these should never be committed to version control).