Preset MCP Server Authentication

Prev Next
The Preset MCP Server is currently in Private Beta

The feature will be ready for general availability (GA) soon! Sign up here

The feature is available on the Enterprise plans.

If you have a Starter or Professional subscription, upgrade to the Enterprise plan.

Overview

The Preset MCP (Model Context Protocol) server allows AI assistants like Claude and ChatGPT to interact with your Preset workspace — listing dashboards, querying datasets, executing SQL, and more.


Prerequisites

  • A Preset account with access to a workspace

  • Your Preset workspace MCP URL:

    https://<workspace-slug>.<region>.app.preset.io/mcp

Auth Method AI Client Plan Requirements
OAuth Claude (Web, Desktop, Code) Free (1 connector), Pro, Max, Team, or Enterprise
OAuth ChatGPT Plus, Pro, Business, Enterprise, or Edu
OAuth Gemini CLI Free
JWT / Bearer Any (programmatic) Preset API credentials (Token Name + Secret)

Method 1: OAuth (Recommended)

Claude Web (claude.ai) & Claude Desktop

Steps

  1. Open claude.ai in your browser
  2. Expand the sidebar and navigate to Customize
  3. Click on Connectors
  4. Click on the + icon next to the magnifying glass > Add custom connector
  5. Fill in the details:
    • Name: A descriptive name (e.g., My Preset Workspace)
    • URL: Your workspace MCP URL (e.g., https://<workspace-slug>.<region>.app.preset.io/mcp)
  6. Click Add
  7. You'll be redirected to Preset Cloud to obtain an OAuth token. If you're already logged in to Preset, you'll be redirected back to Claude automatically.

Reference: Getting Started with Custom Connectors Using Remote MCP


Claude Code (Terminal)

Claude Code is Anthropic's terminal-based coding assistant. It supports OAuth for MCP servers via the CLI.

Steps

Step 1: Add the MCP server (one time)

claude mcp add --transport http preset-mcp https://<workspace-slug>.<region>.app.preset.io/mcp

Step 2: Launch Claude Code

claude

Step 3: Trigger the OAuth flow

Once inside the Claude Code session, run:

/mcp

This will open a browser window where you can authenticate with Preset. After logging in, the connection will be established and Preset tools will be available in your session.


ChatGPT Web

Step 1: Enable Developer Mode (if needed)

  1. Click on your profile icon at the top left of the ChatGPT page
  2. Select Settings
  3. Go to Apps and Connectors
  4. Scroll down and select Advanced Settings
  5. Enable Developer Mode

Step 2: Add the MCP Server

  1. Press the + button in the chat composer
  2. Click Add sources
  3. Go to App -> Connect more
  4. Click Create app
  5. Fill in the details:
    • Name: A descriptive name (e.g., My Preset Workspace)
    • MCP server URL: Your workspace MCP URL
  6. Press I understand and continue
  7. Authenticate with Preset when prompted via OAuth

Reference: Connect from ChatGPT


Gemini CLI (Terminal)

Gemini CLI is Google's open-source terminal-based AI agent. It supports remote MCP servers with automatic OAuth discovery — no token management required.

Prerequisites

Steps

Step 1: Add the MCP server configuration

Add your Preset workspace to ~/.gemini/settings.json:

{
  "mcpServers": {
    "preset": {
      "url": "https://<workspace-slug>.<region>.app.preset.io/mcp"
    }
  }
}

Replace <workspace-slug> and <region> with the values from your Preset workspace URL.

Step 2: Launch Gemini CLI and authenticate

Start Gemini CLI:

gemini

Then authenticate with the Preset MCP server:

/mcp auth preset

A browser window will open for OAuth authentication. Log in with your Preset credentials. You should see:

ℹ ✅ Successfully authenticated with MCP server 'preset'!

ℹ Restarting MCP server 'preset'...

ℹ Successfully authenticated and reloaded tools for 'preset'

Step 3: Verify the connection

Try a command like "List my dashboards" or "What datasets are available?"

Notes:

  • The OAuth token is cached in ~/.gemini/mcp-oauth-tokens.json for subsequent sessions
  • If your token expires or you encounter a stale session, delete the cached token and re-authenticate:
rm ~/.gemini/mcp-oauth-tokens.json
gemini

Multiple Workspaces

To connect to multiple Preset workspaces, add entries with unique names:

{
  "mcpServers": {
    "preset-production": {
      "url": "https://<workspace-1-slug>.<region>.app.preset.io/mcp"
    },
    "preset-staging": {
      "url": "https://<workspace-2-slug>.<region>.app.preset.io/mcp"
    }
  }
}

Reference: Gemini CLI MCP Server Documentation


Method 2:

Authentication via API Token

Note: When authenticating via JWT or Bearer token, the AI client operates with the same API permissions as the authenticated user account. This means the assistant may be able to perform actions beyond the explicitly listed MCP tools — including any API endpoint your account has access to.

Step 1: Generate API Credentials in Preset Manager

  1. Log in to your Preset workspace
  2. Navigate to Settings -> API Keys (or your team's API key management page)
  3. Click Create API Key (or equivalent)
  4. You will receive two values:
Value Description
API Token Name A UUID identifier for the token
API Token Secret A secret value — save this securely; it is only shown once

Step 2: Exchange Credentials for a JWT

Use the Preset Auth API to exchange your API token name and secret for a JWT access token.

Example curl request:

curl --location 'https://api.app.preset.io/v1/auth/' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data '{
    "name": "YOUR_API_TOKEN_NAME",
    "secret": "YOUR_API_TOKEN_SECRET"
  }'

Example response:

{
  "payload": {
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
  }
}

Extract the access_token value from the response — this is your JWT.

Step 3: Use the JWT with MCP

Once you have a JWT, include it in the Authorization header when making requests to the MCP server:

curl -X POST 'https://<workspace-slug>.<region>.app.preset.io/mcp' \
  --header 'Authorization: Bearer YOUR_JWT_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}'
  • Claude Desktop JSON config with JWT

    For Claude Desktop with JSON config, you can use mcp-remote with the bearer token:

    {
      "mcpServers": {
        "preset-workspace": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote@latest",
            "https://<workspace-slug>.<region>.app.preset.io/mcp",
            "--header",
            "Authorization: Bearer YOUR_JWT_TOKEN"
          ]
        }
      }
    }
    

Troubleshooting

Connection Issues

  • Ensure you're using https:// in the URL (not http://)
  • Verify your Preset workspace is accessible
  • Check that you have the required subscription plan for your AI client

Authentication Issues

  • OAuth: Clear your browser cookies and try re-authenticating
  • JWT: Verify your API token and secret are correct. Tokens expire — re-generate if needed

Server Not Appearing in AI Client

  • Claude Desktop: Completely quit and restart the application after config changes
  • Claude Web / ChatGPT: Refresh the page and check your connectors list
  • Verify the MCP URL format is correct: https://<workspace-slug>.<region>.app.preset.io/mcp

Common Errors

Error Cause Fix
401 Unauthorized Token is invalid or expired Re-generate a JWT or re-authenticate via OAuth
403 Forbidden Insufficient permissions or MCP not enabled Check workspace access and MCP feature status
Connection Refused Wrong URL or inactive workspace Verify workspace URL and that workspace is active

Security Notes

  • The MCP connection allows the AI assistant to access your Preset data based on your user permissions and role
  • Store API credentials securely — never share your API Token Secret
  • JWT tokens should be treated as sensitive credentials