Portabase Logo
Portabase DashboardMCP Server

MCP Server

Connect AI assistants to Portabase via the Model Context Protocol (MCP) server.

The Portabase MCP server exposes your dashboard over the Model Context Protocol, allowing AI assistants (Claude, Cursor, Windsurf, etc.) to manage databases, agents, and backups through natural language.

Prerequisites

  • Portabase dashboard running with both API_ENABLED=true and MCP_ENABLED=true
  • An API token (see API Introduction)
  • Node.js 18+ on the machine running your AI assistant

Enable MCP

Set both environment variables before starting your dashboard:

API_ENABLED=true
MCP_ENABLED=true
  • API_ENABLED=true: enables all API routes under /api/v1
  • MCP_ENABLED=true: enables the MCP server at /api/v1/mcp

Connection

Add the following to your AI assistant's MCP configuration, replacing the URL and API key with your own:

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "portabase": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://your-dashboard.example.com/api/v1/mcp",
        "--header",
        "x-api-key: YOUR_API_TOKEN"
      ]
    }
  }
}

Open Settings → MCP Servers and add:

{
  "portabase": {
    "command": "npx",
    "args": [
      "-y",
      "mcp-remote",
      "https://your-dashboard.example.com/api/v1/mcp",
      "--header",
      "x-api-key: YOUR_API_TOKEN"
    ]
  }
}

Any MCP-compatible client that accepts a JSON config:

{
  "mcpServers": {
    "portabase": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://your-dashboard.example.com/api/v1/mcp",
        "--header",
        "x-api-key: YOUR_API_TOKEN"
      ]
    }
  }
}

Never commit your API token to version control. Use your environment's secret management to inject it where possible.

Verify the connection

Restart your AI assistant. Ask it:

"List my Portabase databases"

A successful response confirms the MCP server is connected.

Available Tools

See the Tools reference for the full list of operations.

Last updated on

On this page