MCP server

Connect AI agents to Cadency over the Model Context Protocol.

Most of the REST API is exposed to AI agents over the Model Context Protocol, at one Streamable HTTP endpoint:

https://app.trycadency.com/mcp

A client that supports sign-in (Claude, ChatGPT, Claude Code) needs only this URL: you sign in to Cadency and pick the workspace. Any other client (Clay, n8n, Make) connects with the workspace's MCP key in the URL.

Sign in

Add https://app.trycadency.com/mcp to your client, with no key:

  • Claude (claude.ai and Claude Desktop): Settings → Connectors → Add custom connector. Leave the OAuth client ID and secret empty.
  • ChatGPT: in developer mode, create a connector with the URL and OAuth as its authentication.
  • Claude Code: run claude mcp add --transport http swarmhit https://app.trycadency.com/mcp, then /mcp to sign in.

The client opens Cadency in your browser. Sign in, pick the workspace the client may use and select Allow. The client then works in that workspace with the same access as the workspace's MCP key.

Any member of a workspace can connect a client to it. The Access tokens page lists your connections under Connected apps, where you can disconnect them; owners and admins see and disconnect everyone's. A connection also ends when its person leaves the workspace, or after 90 days without use.

For client developers

Sign-in follows the MCP authorization specification:

  • A request without a credential gets a 401 whose WWW-Authenticate header points to the protected resource metadata, /.well-known/oauth-protected-resource/mcp. The authorization server metadata is at /.well-known/oauth-authorization-server.
  • Clients register with Dynamic Client Registration at POST /oauth/register. A redirect URI uses https, http://localhost or http://127.0.0.1 (matched on any port), or the app's own scheme.
  • Only the authorization code flow with PKCE (S256) is supported. Send resource=https://app.trycadency.com/mcp. Every authorization response carries iss.
  • An access token lasts an hour and goes in the Authorization: Bearer header, never in the URL. Each refresh returns a new refresh token, and the previous one stops working.
  • POST /oauth/revoke ends the connection.

The key

Generate an MCP key on the Access tokens page in Cadency (the MCP Server card), then connect with its URL:

https://app.trycadency.com/mcp?key=swh_mcp_xxxxxxxxxxxxxxxxxxxxxxxx

An MCP key starts with swh_mcp_ and is separate from REST API keys: neither works on the other's endpoint. A workspace has one MCP key. It stays visible in the settings, so you can copy the connection URL again, and generating a new one stops the old one at once. Most clients need only the URL; a client that can send headers may pass the key as Authorization: Bearer swh_mcp_… instead of ?key=. A missing or unknown key gets an HTTP 401.

Transport

The endpoint speaks JSON-RPC 2.0 and is stateless: each request is a POST answered with a plain JSON response, with no session and no server-sent event stream (a GET returns 405). It accepts batches, and protocol versions 2025-06-18, 2025-03-26 and 2024-11-05.

Tools

Each tool runs the same handler as its REST endpoint, so inputs are validated the same way and the same rules apply. tools/list returns every tool with its input schema. A tool result is a text item holding JSON, for most tools what the endpoint returns under data. A request the REST API would refuse with a 4xx comes back as a result with isError: true and the error message as its text, so the agent can correct it.

Webhooks and hosted connect links have no tools, and neither do a few reads and deletes (for example deleting a campaign, a lead or a list, or renaming a list): use the REST API for those.

In hosts that render tool widgets (Claude, ChatGPT), the tools that list or show leads, lists, campaigns, sender accounts and stats also return an interactive widget. The JSON stays the first content item, so other clients are not affected.

Acting as a workspace in your organization

An organization's MCP key (one generated in the organization workspace) can act on any workspace inside it by appending &workspaceId=<workspaceId> to the connection URL, one connection per workspace. When you sign in instead, you pick the workspace on the sign-in page. A workspaceId that is not one of the organization's workspaces gets a 401 on every request. See Authentication for how workspace scoping works, and Organization for the list_workspaces, get_workspace, create_workspace, update_workspace, delete_workspace, invite_workspace_member, update_workspace_member and remove_workspace_member tools. They always manage the key's organization, whatever workspace the connection acts on.

get_workspace_info is the odd one out: it returns the workspace the connection resolves to, not one looked up by id.

On this page