WACM.in Logo
← API documentation
MCP integrationv0.1.1 · 15 read tools

Connect your AI assistant to WACM

Use the official @codingmantra/wacm-mcp npm package to let your assistant read contacts, templates, conversations, audience readiness and campaign reports from your WACM account.

Your client starts a local MCP process over stdio. That process authenticates to the hosted WACM REST API with your token. You do not need to run Laravel or host a server yourself. This release has no hosted HTTP MCP URL.

Before you connect

  1. Install Node.js 20 or newer on the machine where your MCP client runs. Confirm the commands below work.
  2. Sign in to WACM and obtain the Sanctum API token shown in your workspace's API area. Use the account whose data you want the assistant to access; API plan, role and conversation assignment permissions apply.
  3. Choose your client below, merge the server entry into its existing configuration, and start or reload the server.
Check Node.js and the published package
node --version
npm --version
npx -y @codingmantra/wacm-mcp@latest --version

The package command should report @codingmantra/wacm-mcp 0.1.1. This checks installation, not token validity. No global npm installation or npm publishing login is required.

Claude Desktop

Open Settings → Developer → Edit Config. Merge the following entry into claude_desktop_config.json, replace the placeholder with your WACM token, save, and restart Claude Desktop.

claude_desktop_config.json
{
  "mcpServers": {
    "wacm": {
      "command": "npx",
      "args": [
        "-y",
        "@codingmantra/wacm-mcp@latest"
      ],
      "env": {
        "WACM_API_TOKEN": "YOUR_WACM_SANCTUM_TOKEN"
      }
    }
  }
}

Use the desktop app's local server configuration. A remote connector URL cannot launch this stdio package. Preserve any other server entries. Official local server setup ↗

Claude Code

Merge this entry into your project's .mcp.json. The environment reference keeps the token out of the project file. Set WACM_API_TOKEN in the environment that launches Claude Code, then restart the session, review its project-server approval, and use /mcp to check the connection.

.mcp.json — Claude Code environment expansion
{
  "mcpServers": {
    "wacm": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@codingmantra/wacm-mcp@latest"
      ],
      "env": {
        "WACM_API_TOKEN": "${WACM_API_TOKEN}"
      }
    }
  }
}

Configure the secret through your local environment or secret manager. Avoid putting its value in shared commands or shell history. Other clients may not support this environment expansion syntax. Official Claude Code MCP reference ↗

Antigravity

In the Agent panel, open the additional-options menu → MCP Servers → Manage MCP Servers → View raw config. Merge the entry below, replace the token placeholder locally, save and refresh the server list. Select the WACM tools for your agent.

Antigravity MCP configuration
{
  "mcpServers": {
    "wacm": {
      "command": "npx",
      "args": [
        "-y",
        "@codingmantra/wacm-mcp@latest"
      ],
      "env": {
        "WACM_API_TOKEN": "YOUR_WACM_SANCTUM_TOKEN"
      }
    }
  }
}

Use the raw configuration opened by your installed version; menu labels and configuration locations may vary. Official Antigravity MCP guide ↗

VS Code

Merge this into .vscode/mcp.json. VS Code uses a servers object. The password input prompts for your token instead of storing it in the workspace file. Start WACM from the MCP server controls and enable its tools in your assistant.

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "wacm-token",
      "description": "WACM Sanctum API token",
      "password": true
    }
  ],
  "servers": {
    "wacm": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@codingmantra/wacm-mcp@latest"
      ],
      "env": {
        "WACM_API_TOKEN": "${input:wacm-token}"
      }
    }
  }
}

Tool access depends on the installed AI extension and its MCP support. A remote development session needs Node.js and network access in the environment where it runs the server. Official VS Code MCP setup ↗

Verify the connection and try a workflow

  1. Confirm WACM is connected in the client's MCP server list. It should expose 15 tools and the wacm://guide resource.
  2. Ask: “Use get_account_profile to check which WACM account is connected.” Confirm the returned account before reading customer data.
  3. Ask: “List my groups, then inspect the preflight for the group I choose.” Use IDs returned by WACM rather than guessing them.
  4. Ask: “Check campaign 42's status and inspect its failed messages,” or “Summarize recent messages in conversation 18.” Replace these example IDs with your account's IDs.

Discovery can succeed without a token. A successful account-profile read verifies API authentication. The server does not send messages, launch or retry campaigns, change contacts, mark conversations read, probe phones, verify OTPs or manage payments.

Group preflight summarizes stored readiness and does not guarantee live reachability or template-specific marketing eligibility. Conversation IDs are contact IDs. Account data and customer messages should be treated as data rather than instructions.

Tool reference

ToolUse it to
get_account_profileCheck the authenticated account and company.
search_contactsSearch contacts and filter by group, tag or update time.
get_contactRead one contact and its CRM details.
list_templatesList templates across all statuses; optionally filter by exact name.
get_templateInspect a template’s components, language, category and status.
list_groupsList contact groups and contact counts.
get_group_preflightSummarize stored group readiness without sending phone probes.
list_tagsList all contact tags and their contact counts.
list_contact_fieldsList custom contact field definitions.
list_campaignsFind existing campaigns by search or type.
get_campaign_statusInspect a campaign and its delivery statistics.
get_campaign_messagesRead message records, optionally filtered by delivery status.
list_conversationsList conversations visible to the connected account.
get_conversationRead conversation details using its contact ID.
get_conversation_messagesRead message history without marking messages read.

Tool schemas show the supported parameters. IDs must be positive integers and page limits cannot exceed 100. Contacts, templates and campaigns default to 15 results; groups default to 15; conversations and message lists default to 50. Tags and field definitions return complete arrays. Advance pages explicitly and use before_id for older conversation messages.

The server preserves each API's response envelope. MCP structured content wraps successful data under result; errors set isError: true and include an error object. Read wacm://guide for pagination and interpretation details.

Configuration and token handling

WACM_API_TOKEN
Your Sanctum API token, without the Bearer prefix. Required for API reads. It is sent as a Bearer header to the configured WACM origin.
WACM_API_URL (optional)
Defaults to https://app.wacm.in. For another trusted WACM installation, set its HTTPS origin without /api/v1, other paths or query parameters. HTTP is accepted only for loopback development.

The client supplies environment variables; the package does not automatically load .env files. Keep token-bearing files out of Git and shared screenshots. After rotating a token, update the client configuration and restart its MCP process. Returned credentials are redacted, but contacts and messages are not anonymized.

Troubleshooting

SymptomNext step
npx or node not foundInstall Node.js in the client’s execution environment. Use an absolute npx path if the desktop app does not inherit your terminal PATH.
Server waits silently in a terminalWithout --version or --help it waits for MCP messages on stdin. Start it through the client; diagnostics are written to stderr.
missing_token / 401Supply the current Sanctum token without the Bearer prefix, then restart the server. Confirm it belongs to the configured WACM installation.
403Check workspace role, API plan access and conversation assignment visibility.
404Check the API origin, record ID and whether the record is visible to this account.
429Wait for the returned retry interval. Requests are not retried automatically.
Timeout / network errorRequests stop after 30 seconds. Check connectivity and backend availability before repeating the read.
Response too largeResponses are capped at 2 MiB. Use a smaller page or narrower search where supported.
Redirect / non-JSON responseUse the API origin directly. The server rejects redirects and cannot read a login page as API data.

On Windows, clients that cannot spawn npx directly may need command: "cmd" with args: ["/c", "npx", "-y", "@codingmantra/wacm-mcp@latest"]. Consult your client's launch logs. The published package and stdio protocol are tested; individual desktop interfaces and authenticated production accounts still depend on your setup.

Upgrades and support

Use @latest to resolve the latest npm release when the client starts the process. An already running process stays on its current version until restarted. For reproducible installs, replace @latest with @0.1.1. If you need to refresh a cached launch, restart the client and check the resolved version.

bash
npx -y @codingmantra/wacm-mcp@0.1.1 --version