Transports
The MCP server supports two transport modes, selected by the MCP_TRANSPORT environment variable.
HTTP (production)
Section titled “HTTP (production)”The default for production. Runs an Express 5 server with Streamable HTTP transport.
- URL:
https://mcp.campaignstack.io/mcp - Auth: Required —
Authorization: Bearer cs_... - Protocol: JSON-RPC 2.0 over HTTP, with SSE for streaming
Session lifecycle
Section titled “Session lifecycle”- Initialize —
POST /mcpwithinitializemethod. Server returns a session ID in themcp-session-idheader. - Tool calls —
POST /mcpwithtools/callmethod, include session ID header. - Streaming —
GET /mcpwith session ID for SSE event stream. - Close —
DELETE /mcpwith session ID.
Health check
Section titled “Health check”curl https://mcp.campaignstack.io/healthReturns server version, status, and the complete list of available tools (no authentication required).
stdio (local development)
Section titled “stdio (local development)”For local development and testing. No authentication — all scopes are granted.
MCP_TRANSPORT=stdio npx tsx src/index.tsThe server reads JSON-RPC messages from stdin and writes responses to stdout. This is how MCP clients like Claude Desktop and Cursor connect to local servers.
Claude Desktop config (stdio)
Section titled “Claude Desktop config (stdio)”{ "mcpServers": { "campaignstack": { "command": "npx", "args": ["tsx", "src/index.ts"], "cwd": "/path/to/CampaignStack/app/mcp-server", "env": { "MCP_TRANSPORT": "stdio", "CONVEX_URL": "https://your-deployment.convex.cloud" } } }}Testing with MCP Inspector
Section titled “Testing with MCP Inspector”The MCP Inspector is a visual tool for testing MCP servers:
npx @modelcontextprotocol/inspector npx tsx src/index.tsThis launches a web UI where you can browse tools, call them interactively, and inspect responses.