Skip to content

Authentication

The MCP server at https://mcp.campaignstack.io/mcp accepts two kinds of credential:

Who uses itWhat you do
OAuthClients with MCP sign-in, including Claude.ai, ChatGPT and CursorAdd the server URL, then approve the connection on a CampaignStack consent screen
API keyCoding tools (Claude Code, Cursor), scripts, serversCreate a key in the app and send it in a header

Both end up in the same place: a connection that acts as you, inside the workspaces you belong to, within the limits set in the app.

A client that supports MCP sign-in only needs the server URL. When it connects, it registers itself, then opens a CampaignStack page in your browser (sign in first if you are not already). The consent screen shows the app’s name and the site it will send you back to, and lists what the connection will be able to do:

  • see your campaigns, leads, content and analytics;
  • create and edit campaigns, lists, workflows and content;
  • send LinkedIn messages, invites and comments as you, approve drafts to send, and submit job applications.

Click Connect and you are back in the assistant, signed in. There is nothing to tick: which of those things the assistant actually does is decided in the conversation, where it should ask you before anything reaches another person. Messages still go out on your connected LinkedIn account, inside your daily limits, and through whatever review step the workspace has turned on.

An OAuth connection belongs to you, not to one workspace. It works in every workspace you are a member of, including ones you create later. It can never administer the platform or change a LinkedIn account’s private proxy, and a handful of tools that would need a secret typed into the chat are only offered to API keys (the tool reference marks them API key only).

To end a connection, open Settings > Connected apps in CampaignStack and click Disconnect. Leaving a workspace also ends that connection’s access to it.

There are two key types:

Key typePrefixBound toCreated in
User keycsu_Your user account: works in every workspace you belong toSettings > Personal API keys
Workspace keycs_A single workspaceWorkspace settings > API keys

A user key is the usual choice for your own coding tool, such as Claude Code or Cursor: one key covers every workspace you are a member of. A workspace key suits an integration that must stay inside one workspace, such as an agent you run for a single client.

  1. Open Settings > Personal API keys (user key) or Workspace settings > API keys (workspace key).
  2. Click Create API Key.
  3. Name the key and pick its scopes. A key only lists the tools its scopes allow, so a narrow key keeps the assistant focused.
  4. Copy the key straight away, or copy one of the ready-to-paste configs shown under it, which already contain the key.

A key is its prefix (csu_ or cs_) followed by 32 hexadecimal characters.

Send the key as a Bearer token in the Authorization header. In the examples, replace <paste your key>, angle brackets included, with your key:

Terminal window
curl -X POST https://mcp.campaignstack.io/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer <paste your key>" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'

If your client keeps Authorization for something else, send the key in X-Api-Key instead:

Terminal window
-H "X-Api-Key: <paste your key>"

When a request carries both, the Bearer token is used.

An MCP session starts with that initialize request. The response carries an mcp-session-id header to send with every later request, and the Accept header must list both application/json and text/event-stream. Transports has the full session lifecycle.

Revoke a key from the same settings page it was created on. Revocation is permanent and takes effect within about five seconds, the time the server caches a key check. The settings page and the revoke confirmation both show when the key was last used, which helps you spot one that is still in use somewhere. A client that keeps sending a revoked key is told the date it was revoked and where to create a new one.

Most tools act on one workspace and take an optional workspaceId.

  • Workspace key: the key’s own workspace, always. You never pass workspaceId.
  • User key or OAuth connection, one workspace: leave workspaceId out and the call uses that workspace.
  • User key or OAuth connection, several workspaces: pass workspaceId. A call without it fails, and the error lists your workspaces with their ids and names, so the assistant can ask you which one you mean. It never picks one for you.

A user key or OAuth connection is checked against your membership on every call, so it stops reaching a workspace as soon as you leave it.

If you manage several clients with workspace keys, each key needs its own server entry in your MCP client:

{
"mcpServers": {
"campaignstack-acme": {
"url": "https://mcp.campaignstack.io/mcp",
"headers": { "Authorization": "Bearer <paste the first client's key>" }
},
"campaignstack-globex": {
"url": "https://mcp.campaignstack.io/mcp",
"headers": { "Authorization": "Bearer <paste the second client's key>" }
}
}
}

One user key does the same job with a single entry.

campaignstack_whoami needs no scope, so any valid credential can call it. With a user key it returns your scopes and your workspaces:

{
"keyType": "user",
"keyPrefix": "csu_a1b2",
"scopes": ["campaigns:read", "campaigns:write", "leads:read"],
"user": { "id": "...", "name": "...", "email": "..." },
"workspaces": [
{ "workspaceId": "abc123", "name": "My Agency", "role": "owner" },
{ "workspaceId": "def456", "name": "Client Workspace", "role": "member" }
]
}

With a workspace key it returns the workspace the key is bound to:

{
"keyType": "workspace",
"keyPrefix": "cs_a1b2c",
"workspaceId": "abc123",
"workspaceName": "My Agency",
"scopes": ["campaigns:read", "campaigns:write", "leads:read"]
}

A call that is refused for a missing scope says which scope it needed. A missing scope is fixed by creating a key that has it; a feature the workspace has not turned on is a different error, fixed in the workspace. See Errors.