MCP Server Overview
CampaignStack exposes its entire platform through the Model Context Protocol (MCP). The MCP server provides 90+ tools across 15 domains, giving AI agents full programmatic access to campaigns, leads, workflows, content, and more.
Architecture
Section titled “Architecture”AI Agent / MCP Client │ ▼ MCP Server (port 3002) ├── Auth: API key validation + scope check ├── Validation: Zod .strict() input schemas └── Backend: Convex (serverless) └── Runner (LinkedIn automation)The server supports two transports:
- stdio — local development, no authentication
- HTTP — production, requires API key
Tool domains
Section titled “Tool domains”| Domain | Tools | Description |
|---|---|---|
| Campaigns | 4 | Create, list, get, update campaigns |
| Leads | 4 | Search, get, import, update lead metadata |
| Lead Lists | 8 | Create, query, add/remove leads, CRUD |
| Workflows | 4 | Trigger and manage automation sequences |
| Workflow Nodes | 4 | Complete, fail, store conversations, escalate |
| Workflow Execution | 4 | Stats, leads at node, activity, retry |
| Workflow Review | 6 | Human-in-the-loop approve/reject/edit |
| ICPs | 3 | Ideal Customer Profile scoring |
| Content | 16 | Post lifecycle, voice, analytics, calendar |
| Craft | 5 | AI-powered message, note, comment, followup writing |
| Competitors | 6 | Company/profile monitoring |
| Signals | 4 | Lead score breakdown, signal weights |
| Workspace | 8 | Members, invitations, settings |
| Automations | 3 | List, toggle, job history |
| LinkedIn Accounts | 2 | List and get linked accounts |
| Campaign Generation | 7 | Scrape, synthesize, auto-select, generate, finalize |
| Other | 4 | Enrichment, search, sourcing diagnostics, post engagement |
Design principles
Section titled “Design principles”- JSON-only responses — all tool output is structured JSON, never markdown
- Cross-referenced errors — error messages suggest which tool to call next
- Strict validation — Zod
.strict()rejects unknown input fields - MCP annotations — every tool declares
readOnlyHint,destructiveHint,idempotentHint - Actionable descriptions — tool descriptions reference related tools to help agents chain operations
Endpoints
Section titled “Endpoints”| Method | Path | Auth | Purpose |
|---|---|---|---|
GET | /health | None | Server status, version, tool list |
POST | /mcp | Bearer | MCP JSON-RPC messages |
GET | /mcp | Bearer | SSE stream for sessions |
DELETE | /mcp | Bearer | Close session |
Next steps
Section titled “Next steps”- Authentication — API keys and scopes
- Transports — stdio vs HTTP
- Tool Reference — Full tool documentation