MCP Server Overview
CampaignStack exposes its entire platform through the Model Context Protocol (MCP). The MCP server provides 55+ tools across 9 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 | 3 | Search, get, import leads |
| Lead Lists | 4 | Manage lead collections |
| Workflows | 4 | Trigger and manage automation sequences |
| ICPs | 3 | Ideal Customer Profile scoring |
| Content | 14 | LinkedIn post lifecycle (draft to published) |
| Craft | 4 | AI-powered message and note writing |
| Competitors | 6 | Company/profile monitoring |
| Workspace | 7 | Generation, scraping, diagnostics |
| Other | 6 | Enrichment, search, workflow nodes |
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