Back to Directory/Analytics & BI

com.politicalcomms/api

Compliant political SMS/MMS from MCP clients: projects, contacts, analytics, billing.

Analytics & BITypeScriptv0.2.1

Political Comms SDK

Official client libraries and tools for the Political Comms REST API. Direct-to-carrier political texting for campaigns, PACs, advocacy organizations, fundraisers, and elected officials.

The API surface covers Projects (compose, test, schedule, send), Contact Lists, Media Files, Organizations and hierarchy, Brands, Campaigns, Tracking Domains, Phone Numbers, Analytics, Billing, and Email (early access: sending domains, sender identities, lists and imports, suppressions, templates and AI drafts, and campaigns, each returning 403 EMAIL_EARLY_ACCESS until general availability). The full OpenAPI 3.1 specification lives at politicalcomms.com/openapi.json and the reference documentation at docs.politicalcomms.com.

Packages

PackageRegistryDescription
@political-comms/sdknpmTypeScript SDK. Zero dependencies, native fetch, built-in retries.
@political-comms/clinpmCommand line interface. npx @political-comms/cli auth check
@political-comms/mcpnpmMCP server for Claude and other MCP clients.
political-commsPyPIPython SDK mirroring the TypeScript client.

Authentication

Every client authenticates with an API key passed in the X-API-Key header. Keys are created in the dashboard under Admin > API and are prefixed pc_live_. All packages read the POLITICAL_COMMS_API_KEY environment variable by default.

Development

Node 20 or later and Python 3.10 or later.

npm install
npm run build
npm test

cd python
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'
.venv/bin/pytest

License

MIT. See LICENSE.

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
npx -y @political-comms/mcp

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "com-politicalcomms-api": {
      "command": "npx",
      "args": [
        "-y",
        "@political-comms/mcp"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

@political-comms/mcpnpm

Compatible MCP Clients

com.politicalcomms/api works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More