Skip to main content

MCP Setup

Connect your AI assistant to Trix's hosted MCP server.

Connect to the hosted server

Trix runs a managed, multi-tenant MCP server at https://mcp.trixdb.com/mcp. It speaks the Streamable HTTP transport and authenticates with an Authorization: Bearer header, so any MCP-capable client can connect with just the URL and an API key — nothing to install or run yourself.

The fastest way to get set up is the MCP connect generator in your dashboard. It mints a fresh, dedicated key and produces a ready-to-paste config for Claude Desktop, Claude Code, Cursor, or VS Code — with your key already substituted in.

The canonical configuration for clients that speak HTTP MCP natively:

mcp config (url + headers)
{
  "mcpServers": {
    "trix": {
      "url": "https://mcp.trixdb.com/mcp",
      "headers": {
        "Authorization": "Bearer gdb_your_api_key"
      }
    }
  }
}

Claude Code

Add the server to your project's .mcp.json (shareable with your team) or your user config at ~/.claude.json:

.mcp.json
{
  "mcpServers": {
    "trix": {
      "url": "https://mcp.trixdb.com/mcp",
      "headers": {
        "Authorization": "Bearer gdb_your_api_key"
      }
    }
  }
}

Or add it from the CLI:

claude mcp add --transport http trix https://mcp.trixdb.com/mcp \
  --header "Authorization: Bearer gdb_your_api_key"

Cursor

Save this to ~/.cursor/mcp.json for all projects, or .cursor/mcp.json inside a single project:

~/.cursor/mcp.json
{
  "mcpServers": {
    "trix": {
      "url": "https://mcp.trixdb.com/mcp",
      "headers": {
        "Authorization": "Bearer gdb_your_api_key"
      }
    }
  }
}

VS Code

Save this to .vscode/mcp.json in your workspace. VS Code uses a servers block with an explicit "type": "http":

.vscode/mcp.json
{
  "servers": {
    "trix": {
      "type": "http",
      "url": "https://mcp.trixdb.com/mcp",
      "headers": {
        "Authorization": "Bearer gdb_your_api_key"
      }
    }
  }
}

Claude Desktop

Claude Desktop loads local (stdio) servers from its config file, so it reaches the hosted server through the mcp-remote bridge. Add this to your configuration file — the location varies by operating system:

{
  "mcpServers": {
    "trix": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.trixdb.com/mcp",
        "--header",
        "Authorization: Bearer gdb_your_api_key"
      ]
    }
  }
}

After modifying the configuration, restart Claude Desktop for the changes to take effect.

Other clients

Windsurf, Zed, Continue, and any other Streamable HTTP MCP client use the same canonical url + headers block shown above. If a client only supports local (stdio) servers, bridge the hosted endpoint with mcp-remote:

npx mcp-remote https://mcp.trixdb.com/mcp --header "Authorization: Bearer gdb_your_api_key"

Getting an API key

Every connection needs a Trix API key. Get one from:

  • The MCP connect generator — mints a key and builds the config in one step (recommended).
  • The CLI (see CLI Installation): run trix auth login, then trix keys create --name "mcp-client".

Key secrets are shown only once, at creation. Copy your config immediately. Keep the key out of version control, and revoke it if it is ever exposed.

Self-host (advanced)

You can also run the MCP server yourself instead of using the hosted endpoint — useful for local development or air-gapped deployments. Running the command starts an HTTP server on port 3000 with an endpoint at /mcp:

# Start a local MCP server on port 3000
TRIX_API_URL=https://api.trixdb.com npx @trix/mcp

Point your client at the local server instead of the hosted URL:

Local self-host config
{
  "mcpServers": {
    "trix": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "Authorization": "Bearer gdb_your_api_key"
      }
    }
  }
}

Environment variables

Configure a self-hosted server with environment variables. These are set on the server process, not in client configs. API keys are never server env vars — clients always send them via the Authorization: Bearer header.

VariableRequiredDescription
PORTNoHTTP port (default: 3000)
HOSTNoBind address (default: 0.0.0.0)
TRIX_API_URLNoBackend API URL (default: https://api.trixdb.com)
TRIX_LOG_LEVELNoLog level: debug/info/warn/error (default: info)
MCP_DEDUP_ON_STORENoDeduplicate before storage (default: true)
MCP_DEDUP_THRESHOLDNoSimilarity threshold for dedup (default: 0.95)

Verifying setup

After configuring the server, confirm the connection works:

  1. Restart your client after saving the configuration
  2. Look for the MCP indicator or Trix tools in the client's interface
  3. Ask it to "remember something" or "list what you remember"
  4. If tools appear in the response, the setup is working

A self-hosted server exposes a health endpoint — check it with curl http://localhost:3000/health. The hosted server requires a valid API key, which is validated against the Trix API on each connection.

Next steps

  • MCP Tools — available tools and how to use them
  • Advanced — troubleshooting and advanced configuration