MCP Server

Troubleshooting

Fix common connection, sign-in, and tool errors with the GTM Engine MCP server.

The sign-in window never opens

  • Make sure you added a remote / HTTP server with the URL https://api.gtmengine.ai/v1/mcp, not a local command.
  • Choose OAuth as the authentication method. If you entered an API key or a static Authorization header, remove it.
  • Some clients only start sign-in when you explicitly connect. Look for Connect, Authenticate, or Needs login in the server settings (in Claude Code, run /mcp).
  • If your client doesn't support remote OAuth servers, use the mcp-remote bridge.

Sign-in fails with invalid_target before the login page appears

The server URL your client sent doesn't exactly match the GTM Engine MCP server. Check that the URL is exactly https://api.gtmengine.ai/v1/mcp, with no trailing slash and no extra path, then remove the server from your client and add it again.

If the URL is correct and the error persists, contact GTM Engine support with your client name and the time of the error.

Sign-in succeeds but the connection fails with 403 Forbidden

The sign-in worked, but GTM Engine couldn't match it to an active user in that organization. Check that:

  • You picked the right organization during sign-in.
  • Your GTM Engine user is active in that organization. Ask an admin to check Settings → Team → Members.

Then disconnect and reconnect the server.

401 Unauthorized or "invalid token"

Your saved sign-in is missing, expired, or was issued for something else. Disconnect the server in your client (or clear its authentication) and connect again. Don't paste a GTM Engine API key or an app session token into the client. Only tokens issued through the MCP sign-in flow are accepted.

Some tools are missing

Tools are filtered by your GTM Engine permissions. For example, users without Campaigns: write won't see gtm_update_campaign or gtm_enroll_campaign_contacts. Compare your role with the permissions table and ask an admin for access.

If your permissions were just changed, reconnect or refresh the server so your client re-reads the tool list.

"Insufficient permissions for MCP tool."

Your client called a tool your role doesn't allow, usually because it cached the tool list before your permissions changed. Refresh the server in your client.

"Invalid MCP tool input."

The assistant sent arguments that didn't match the tool's schema. Common causes:

  • An ID that isn't a UUID. Ask the assistant to look the record up first.
  • A custom_fields key that doesn't exist. Ask it to call gtm_list_fields first.
  • An enum value that isn't allowed, such as a campaign status other than draft, active, paused, or archived.
  • More than 500 contacts in one enrollment. Ask the assistant to split them into batches.

See the tool reference for valid inputs.

"Account not found." (or Contact, Campaign, and so on)

The ID doesn't exist in the organization you signed in to. Check you're connected to the right organization. System-managed campaigns are also hidden from MCP and return not found.

429 rate limit errors

The rate limit is shared across everyone in your organization using MCP. Wait a moment and retry, or ask the assistant to work in smaller batches.

Still stuck?

Use the MCP Inspector to see the raw server responses, then contact GTM Engine support with your client name, the time of the error, and the error message.

On this page