Skip to main content
Claude Code Claude Code is Anthropic’s agentic coding tool for the terminal. It supports both OAuth (recommended) and PAT authentication for MCP connections. The fastest way to connect — no token needed.
1

Add the MCP server

In your terminal, run:
claude mcp add --transport http --scope user trilo https://api.trilo.chat/mcp
The --scope user flag makes Trilo available across all your projects. Use --scope local (default) to limit it to the current project only.
2

Authenticate

Inside Claude Code, run the /mcp command. Select Authenticate for the Trilo server — this will open your browser to authorize access to your Trilo account.
3

Verify the connection

Back in Claude Code, ask:
List my Trilo workspaces
If it returns your workspace data, you’re all set.

Setup with PAT (Alternative)

If you prefer a Personal Access Token instead of OAuth:
1

Create a token

In Trilo, go to Profile Settings > API > Create Token. Select the scopes you need (mcp:read, mcp:write) and copy the token.
2

Add the MCP server

Option A — CLI command:
claude mcp add --transport http --scope user \
  --header "Authorization: Bearer YOUR_TOKEN_HERE" \
  trilo https://api.trilo.chat/mcp
Option B — Config file (~/.claude.json):
{
  "mcpServers": {
    "trilo": {
      "type": "http",
      "url": "https://api.trilo.chat/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN_HERE"
      }
    }
  }
}
You can also use .mcp.json in your project root to share the config with your team (supports environment variable expansion like ${TRILO_PAT}).
3

Verify the connection

Ask Claude Code:
List my Trilo workspaces

Options

You can append query parameters to the MCP URL for additional control:
ParameterDescriptionExample
workspace_idRestrict to a specific workspacehttps://api.trilo.chat/mcp?workspace_id=abc-123
read_onlyForce read-only modehttps://api.trilo.chat/mcp?read_only=true

Troubleshooting

Make sure you run /mcp inside Claude Code to trigger the authentication flow. If the browser still doesn’t open, check that you have a default browser configured.
  • Verify your token starts with trilo_pat_ and is copied correctly
  • Check that the Authorization header uses the Bearer prefix
  • Confirm the token hasn’t been revoked in Profile Settings > API
Try restarting Claude Code. Run /mcp to check the server status. Also verify the URL is exactly https://api.trilo.chat/mcp with no trailing slash.
MCP sessions expire after 30 minutes of inactivity. Claude Code usually reconnects automatically. If not, run /mcp and re-authenticate.