Skip to main content

Configuring AI Tools

This page walks through connecting the Generator Labs MCP server (https://api.generatorlabs.com/4.0/mcp) from each major AI tool that supports MCP today, including both API key and OAuth authentication where the tool supports them.

Authentication Quick Reference

ToolAPI key (HTTP Basic)OAuth
Claude.ai web
Claude Desktop
Claude Code CLI
ChatGPT
Cursor
VS Code
Custom client

Some tools (notably Claude.ai web and ChatGPT Custom Connectors) only expose the OAuth flow because the UI doesn't accept arbitrary HTTP headers. For those, OAuth is the only option.

API Key vs OAuth — Which Should You Use?

API key is right when:

  • You're configuring a tool you control (your own laptop, your own server).
  • You want simpler revocation: just rotate or delete the API application.
  • The tool you're using accepts a static Authorization header on the MCP transport.

OAuth is right when:

  • The tool you're using requires it (Claude.ai web, ChatGPT).
  • You want per-tool, per-member grants you can revoke individually under Development ➡️ MCP OAuth in the Portal.
  • You want to limit blast radius — each OAuth client is bound to a specific API application, so its IP allow-list and rate limits apply.

Either way, every request flows through the same per-account API application and counts against the same rate limits.

Getting Your Credentials

API Key

  1. Sign in to the Portal.
  2. Navigate to Development ➡️ Applications.
  3. Either pick an existing API application or click Add API Application.
  4. Click View Credentials to see the Account SID (e.g. AC1234...) and Auth Token.

For HTTP Basic, combine them as <Account SID>:<Auth Token> and Base64-encode:

echo -n "AC1234...:abcdef..." | base64
# QUMxMjM0Li4uOmFiY2RlZi4uLg==

The Authorization header value becomes Basic QUMxMjM0Li4uOmFiY2RlZi4uLg==.

OAuth

There's nothing to configure up front for OAuth. When an AI tool first connects, your browser opens to the Generator Labs Portal, you sign in, choose which API application the grant should be bound to, and approve the requested scopes. The grant appears under Development ➡️ MCP OAuth in the Portal where you can revoke it at any time.


Claude.ai web

Claude.ai (Pro / Team / Enterprise) supports MCP via Custom Connectors. OAuth only.

  1. In Claude.ai, open Settings ➡️ Connectors ➡️ Add custom connector.
  2. Set Name to Generator Labs (or anything you like).
  3. Set URL to https://api.generatorlabs.com/4.0/mcp.
  4. Click Add, then Connect when prompted.
  5. A Generator Labs sign-in page opens. Approve the scopes and choose which API application the grant should be bound to.

Once connected, Claude.ai can use Generator Labs tools in any conversation.


Claude Desktop

Claude Desktop's claude_desktop_config.json is typically located at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

OAuth

{
"mcpServers": {
"generator-labs": {
"type": "http",
"url": "https://api.generatorlabs.com/4.0/mcp"
}
}
}

The first time Claude Desktop connects, it opens your browser for the OAuth consent flow. Tokens are cached locally; revoke from the Portal to force re-auth.

API key

{
"mcpServers": {
"generator-labs": {
"type": "http",
"url": "https://api.generatorlabs.com/4.0/mcp",
"headers": {
"Authorization": "Basic QUMxMjM0Li4uOmFiY2RlZi4uLg=="
}
}
}
}

Replace the Base64 string with your own (<Account SID>:<Auth Token>, Base64-encoded).

Restart Claude Desktop for config changes to take effect.


Claude Code CLI

Claude Code is Anthropic's terminal AI tool. MCP servers are managed via the claude mcp subcommand or by editing ~/.claude.json.

OAuth

claude mcp add --transport http generator-labs https://api.generatorlabs.com/4.0/mcp

Run claude and use /mcp from the prompt to trigger the OAuth flow. The CLI will print a URL to open in your browser; if you're running claude over SSH, see the headless OAuth notes below.

API key

claude mcp add --transport http \
--header "Authorization: Basic QUMxMjM0Li4uOmFiY2RlZi4uLg==" \
generator-labs https://api.generatorlabs.com/4.0/mcp

Headless / SSH Environments

The MCP OAuth flow uses a localhost callback (http://localhost:<port>/callback), which doesn't work cleanly when the browser and the CLI are on different machines. Two workarounds:

  • SSH port forward: open a second SSH session with ssh -L <port>:localhost:<port> user@server after the CLI prints the auth URL, then complete the flow in your local browser.
  • Use the API key flow instead — no browser needed.

ChatGPT

ChatGPT's Custom Connectors (available on Plus / Team / Enterprise) support MCP. OAuth only.

  1. In ChatGPT, open Settings ➡️ Beta features and enable Custom connectors (rollout-dependent).
  2. From the connector picker (in the composer), choose Add custom connector.
  3. Set the URL to https://api.generatorlabs.com/4.0/mcp and click Connect.
  4. Approve the OAuth consent in the popup.

Custom connectors are also surfaced via Deep Research mode and may be available in different ChatGPT surfaces depending on your plan and feature flags.


Cursor

Cursor supports MCP via mcp.json — either at ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project).

OAuth

{
"mcpServers": {
"generator-labs": {
"url": "https://api.generatorlabs.com/4.0/mcp"
}
}
}

Reload Cursor and open the MCP panel; Cursor triggers the OAuth flow on first use.

API key

{
"mcpServers": {
"generator-labs": {
"url": "https://api.generatorlabs.com/4.0/mcp",
"headers": {
"Authorization": "Basic QUMxMjM0Li4uOmFiY2RlZi4uLg=="
}
}
}
}

VS Code

VS Code (with the GitHub Copilot Chat extension or any MCP-aware extension) reads MCP config from .vscode/mcp.json per workspace, or from user settings.

OAuth

.vscode/mcp.json:

{
"servers": {
"generator-labs": {
"type": "http",
"url": "https://api.generatorlabs.com/4.0/mcp"
}
}
}

The first time VS Code connects, it opens a browser tab for OAuth consent.

API key

{
"servers": {
"generator-labs": {
"type": "http",
"url": "https://api.generatorlabs.com/4.0/mcp",
"headers": {
"Authorization": "Basic QUMxMjM0Li4uOmFiY2RlZi4uLg=="
}
}
}
}

Reload the VS Code window to pick up changes.


Custom Client

Any MCP-compatible client can connect using the official SDKs. The Generator Labs server speaks JSON-RPC 2.0 over Streamable HTTP at https://api.generatorlabs.com/4.0/mcp.

Python (API key)

from mcp.client.streamable_http import streamablehttp_client
from mcp import ClientSession
import base64

basic = base64.b64encode(b"AC1234...:abcdef...").decode()
headers = {"Authorization": f"Basic {basic}"}

async with streamablehttp_client(
"https://api.generatorlabs.com/4.0/mcp",
headers=headers,
) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.list_tools()
print(result)

TypeScript (API key)

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const basic = Buffer.from("AC1234...:abcdef...").toString("base64");

const transport = new StreamableHTTPClientTransport(
new URL("https://api.generatorlabs.com/4.0/mcp"),
{
requestInit: {
headers: { Authorization: `Basic ${basic}` },
},
}
);

const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(transport);

const tools = await client.listTools();
console.log(tools);

OAuth

For OAuth, both SDKs ship an OAuth client provider. The Generator Labs server publishes the standard discovery documents:

See the MCP authorization spec for the full DCR + PKCE flow.


Troubleshooting

401 Authentication required: the server didn't see an Authorization header. For API key flow, double-check the Base64 string and that your tool actually forwards custom headers. For OAuth, the access token may have expired — re-run the OAuth flow.

401 Token audience does not include this resource server: your tool issued a token bound to a different resource. Re-authorize from the AI tool to refresh.

403 Denied due to IP address restrictions: the API application the OAuth grant is bound to has an IP allow-list, and the request came from an IP outside that list. Either widen the allow-list or pick a different API application during OAuth consent.

429 Rate limit exceeded: you've hit the per-application hourly or per-second cap. The MCP traffic shares the same cap as the REST API on that application — split heavy AI workloads onto a dedicated API application if needed.

Token expired between sessions: access tokens are short-lived (1 hour); refresh tokens last 30 days. Most AI tools refresh automatically. If you've had a tool idle for >30 days, you'll need to re-authorize.