Skip to content

Transports

The MCP server supports two transport modes, selected by the MCP_TRANSPORT environment variable.

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
  1. InitializePOST /mcp with initialize method. Server returns a session ID in the mcp-session-id header.
  2. Tool callsPOST /mcp with tools/call method, include session ID header.
  3. StreamingGET /mcp with session ID for SSE event stream.
  4. CloseDELETE /mcp with session ID.
Terminal window
curl https://mcp.campaignstack.io/health

Returns server version, status, and the complete list of available tools (no authentication required).

For local development and testing. No authentication — all scopes are granted.

Terminal window
MCP_TRANSPORT=stdio npx tsx src/index.ts

The 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.

{
"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"
}
}
}
}

The MCP Inspector is a visual tool for testing MCP servers:

Terminal window
npx @modelcontextprotocol/inspector npx tsx src/index.ts

This launches a web UI where you can browse tools, call them interactively, and inspect responses.