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 webBeta (request headers)✅
Claude DesktopBeta (request headers), or via mcp-remote✅
Claude Code CLI✅✅
ChatGPTNo✅
Cursor✅✅
VS Code✅✅
Custom client✅✅

ChatGPT only exposes the OAuth flow because its UI doesn't accept arbitrary HTTP headers, so OAuth is the only option there. Claude.ai and Claude Desktop custom connectors accept an API key through Request headers, a beta that's only available to some organizations so far; without it, use OAuth.

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 supports MCP via custom connectors on every plan (the Free plan is limited to one). On Team and Enterprise plans, an Owner adds the connector under Organization settings ➡️ Connectors, and each member then clicks Connect on it under Customize ➡️ Connectors.

  1. In Claude.ai, open Customize ➡️ Connectors.
  2. Select + Add ➡️ Add custom connector.
  3. Set Name to Generator Labs (or anything you like).
  4. Set the URL to https://api.generatorlabs.com/4.0/mcp and continue.
  5. Keep the detected authentication settings and click Add, then Connect when prompted.
  6. A Generator Labs sign-in page opens. Choose which API application the grant should be bound to and approve the requested scopes.

Turn the connector on for a conversation from the + button in the chat, under Connectors. See Anthropic's custom connectors guide for details.

If your organization has the Request headers beta, you can use an API key instead of OAuth: under Authentication choose No sign-in, then under Request headers add an authorization header with the value Basic QUMxMjM0Li4uOmFiY2RlZi4uLg== (your own Base64 string, including the Basic prefix). Authentication settings can't be edited after you save; remove and re-add the connector to change them. On Team and Enterprise plans, everyone who uses the connector shares that key.


Claude Desktop​

Claude Desktop adds remote MCP servers like Generator Labs as custom connectors in the app itself, the same way as Claude.ai web, and connectors you add on one appear on the other. claude_desktop_config.json only starts local servers on your computer, so a remote server entry with a url there doesn't work.

OAuth​

  1. In Claude Desktop, open Customize ➡️ Connectors (Settings ➡️ Connectors in older versions).
  2. Select + Add ➡️ Add custom connector.
  3. Enter https://api.generatorlabs.com/4.0/mcp and continue.
  4. Finish adding the connector, then sign in to Generator Labs when prompted.
  5. Choose which API application the grant should be bound to and approve the requested scopes.
  6. Turn the connector on for your conversation from the + button in the chat, under Connectors.

See Anthropic's custom connectors guide for details. Revoke the grant under Development ➡️ MCP OAuth in the Portal to force a new sign-in.

API key​

If your organization has the Request headers beta, add the API key to the custom connector as described under Claude.ai web.

Otherwise, run a local bridge that adds the header for you. mcp-remote (requires Node.js 18 or later) connects to the remote server and presents it to Claude Desktop as a local server. Add it to claude_desktop_config.json, which you can open from Settings ➡️ Developer ➡️ Edit Config and is typically located at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"generator-labs": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.generatorlabs.com/4.0/mcp",
"--header",
"Authorization:${GENERATOR_LABS_AUTH}"
],
"env": {
"GENERATOR_LABS_AUTH": "Basic QUMxMjM0Li4uOmFiY2RlZi4uLg=="
}
}
}
}

Replace the Base64 string with your own (<Account SID>:<Auth Token>, Base64-encoded). The header value is passed through env because Claude Desktop on Windows doesn't escape spaces inside args.

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 supports remote MCP servers as custom MCP servers. OAuth only. Whether you can add one depends on your plan and, for workspaces, your admin's settings.

  1. In ChatGPT, open Plugins.
  2. Select +, then Add custom MCP server.
  3. Enter a name (e.g. Generator Labs) and description.
  4. Under Connection, enter https://api.generatorlabs.com/4.0/mcp.
  5. Choose OAuth authentication, review the risk warning, and select I understand and want to continue.
  6. Select Create as a plugin, then approve the OAuth consent when prompted.

See OpenAI's guide to connecting custom MCP servers for details.


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:

  • Authorization Server Metadata (RFC 8414): /.well-known/oauth-authorization-server
  • Protected Resource Metadata (RFC 9728): /.well-known/oauth-protected-resource
  • Dynamic Client Registration (RFC 7591): POST https://api.generatorlabs.com/4.0/mcp/register
  • Client ID Metadata Documents: supported, so a client can use the URL of its metadata document as its client_id instead of registering.
  • Token Revocation (RFC 7009): POST https://api.generatorlabs.com/4.0/mcp/oauth/revoke
  • JWKS (RFC 7517): /4.0/mcp/oauth/jwks

See the MCP authorization spec for the full flow. The server speaks MCP protocol revision 2026-07-28, and still accepts clients on 2025-11-25, 2025-06-18 and 2025-03-26.


Troubleshooting​

401 Authentication required: the server didn't see an Authorization header. Check that your tool actually forwards custom headers.

401 Authentication failed: the API key credentials weren't accepted. Double-check the Account SID and Auth Token, and the Base64 string.

401 Invalid or expired bearer token: the OAuth access token has expired or been revoked, or was issued for a different server. Re-authorize from the AI tool.

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.