MCP Server

Install

Connect the GTM Engine MCP server to Claude, ChatGPT, Cursor, VS Code, Windsurf, Codex, and other MCP clients.

Every client connects to the same URL:

Server URL
https://api.gtmengine.ai/v1/mcp

The server is hosted and uses the MCP Streamable HTTP transport with OAuth sign-in. Any client that supports remote MCP servers with OAuth can connect. Pick your client below.

Before you start

  • You need an active GTM Engine user in the organization you want to connect.
  • The tools you get depend on your GTM Engine role. See Permissions and security.
  • You don't need an API key. If a client asks for one, leave it blank and choose OAuth.

Claude

Custom connectors are available on Claude Pro, Max, Team, and Enterprise plans.

Open Settings → Customize, select the Connectors tab, then click Add and choose Add custom connector.

On Team and Enterprise plans, an organization owner may need to add the connector first under Organization settings → Connectors. Members then connect it from their own Settings → Customize → Connectors.

Enter a name such as GTM Engine and the URL https://api.gtmengine.ai/v1/mcp. Leave the advanced OAuth client fields empty. Click Add.

Click Connect. A browser window opens to the GTM Engine sign-in page. Sign in, pick your organization, and approve access.

In a new chat, click +, then Connectors, and make sure GTM Engine is turned on. If it isn't listed, choose Manage connectors and connect it there. Ask "List my active GTM Engine campaigns" to test it.

Claude asks before running write tools by default. You can change per-tool permissions from the connector's settings.

Add the server from your terminal:

claude mcp add --transport http gtm-engine https://api.gtmengine.ai/v1/mcp

Add --scope user to make it available in every project, or --scope project to share it with your team through .mcp.json.

Then start Claude Code, run /mcp, select gtm-engine, and choose Authenticate. Your browser opens to the GTM Engine sign-in page. When it finishes, the tools are available.

To share the server with your team, commit this to .mcp.json at the repo root:

.mcp.json
{
  "mcpServers": {
    "gtm-engine": {
      "type": "http",
      "url": "https://api.gtmengine.ai/v1/mcp"
    }
  }
}

Each teammate signs in with their own GTM Engine account.

ChatGPT

Custom MCP connectors in ChatGPT require developer mode, available on Plus, Pro, Business, Enterprise, and Edu plans. Workspace admins may need to enable it first.

Open Settings → Apps & Connectors → Advanced settings and turn on Developer mode.

Back in Apps & Connectors, click Create. Enter GTM Engine as the name, https://api.gtmengine.ai/v1/mcp as the MCP server URL, and choose OAuth for authentication.

Click Create, then sign in to GTM Engine in the window that opens.

In a chat, select Developer mode from the tools menu and enable GTM Engine.

Code editors

Open Cursor Settings → MCP & Integrations → New MCP Server, or edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (project) directly:

~/.cursor/mcp.json
{
  "mcpServers": {
    "gtm-engine": {
      "url": "https://api.gtmengine.ai/v1/mcp"
    }
  }
}

Save the file. In the MCP settings, GTM Engine shows a Needs login prompt. Click it, sign in to GTM Engine in the browser, and the tools become available in Agent mode.

Run MCP: Add Server from the Command Palette, choose HTTP, and enter the URL. Or create .vscode/mcp.json in your workspace:

.vscode/mcp.json
{
  "servers": {
    "gtm-engine": {
      "type": "http",
      "url": "https://api.gtmengine.ai/v1/mcp"
    }
  }
}

Click Start above the server entry. VS Code prompts you to sign in. Approve it, finish the GTM Engine sign-in in the browser, then use the tools from Copilot Chat in Agent mode.

Open Windsurf Settings → Cascade → MCP Servers → View raw config, or edit ~/.codeium/windsurf/mcp_config.json:

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "gtm-engine": {
      "serverUrl": "https://api.gtmengine.ai/v1/mcp"
    }
  }
}

Refresh the MCP server list and complete the GTM Engine sign-in when prompted.

Add the server and sign in from your terminal:

codex mcp add gtm-engine --url https://api.gtmengine.ai/v1/mcp
codex mcp login gtm-engine

Or add it to ~/.codex/config.toml:

~/.codex/config.toml
[mcp_servers.gtm-engine]
url = "https://api.gtmengine.ai/v1/mcp"

then run codex mcp login gtm-engine.

Other clients

Any MCP client that supports remote servers over Streamable HTTP with OAuth can connect. In general:

  1. Add a new remote (HTTP) MCP server with the URL https://api.gtmengine.ai/v1/mcp.
  2. Choose OAuth if the client asks for an authentication method. Don't enter an API key or a static bearer token.
  3. Start the connection. The client discovers the GTM Engine sign-in page automatically and opens it in your browser.
  4. Sign in with the GTM Engine user and organization you want to connect, then approve access.
  5. Refresh or reconnect the server in your client and confirm the GTM Engine tools are listed.

If your client asks for the OAuth protected-resource metadata URL directly, use:

https://api.gtmengine.ai/.well-known/oauth-protected-resource/v1/mcp

Clients that only support local (stdio) servers

If your client can only launch local MCP servers, use the mcp-remote bridge. It runs locally, handles the OAuth sign-in in your browser, and forwards requests to GTM Engine:

{
  "mcpServers": {
    "gtm-engine": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.gtmengine.ai/v1/mcp"]
    }
  }
}

This requires Node.js 18 or later.

Test the connection

The MCP Inspector is a quick way to confirm your sign-in works and see exactly which tools your account can use:

npx @modelcontextprotocol/inspector

In the Inspector, set Transport to Streamable HTTP, enter the server URL, and click Connect. After you sign in, open Tools → List Tools.

Switch organizations or disconnect

The connection is tied to the GTM Engine user and organization you signed in with. To use a different organization, disconnect the server in your client (or clear its saved authentication) and connect again, choosing the other organization at sign-in.

Disconnecting in your client stops it from calling GTM Engine. Deactivating a user in GTM Engine also immediately blocks that user's MCP access.

Having trouble? See Troubleshooting.

On this page