Agents · 4 min read

MCP server setup

Mailsonde runs a stateless Streamable HTTP Model Context Protocol server (spec 2026-07-28). Connect it to Claude Desktop, Cursor or Claude Code and ask questions like “which Contoso domains are failing DMARC and why?”

What agents can do

Read. Every tool reads fleet data or queues a fresh DNS check. No tool edits DNS, workspace settings, alert channels, team or billing, whatever the agent is told.

server URL
https://mcp.mailsonde.com/mcp

Create a workspace token

  1. Open API & MCP in the dashboard (owner or admin).
  2. Create a token and give it a name you will recognise in the call log, such as claude-desktop-ops.
  3. Copy it immediately: it is shown once. Mailsonde keeps only a SHA-256 hash and the prefix.
token format
rw_mcp_<workspace id>_<43-character secret>

Configure your client

Replace the placeholder with your token. Restart the client after editing its config.

Cursor · ~/.cursor/mcp.json
{
  "mcpServers": {
    "mailsonde": {
      "url": "https://mcp.mailsonde.com/mcp",
      "headers": {
        "Authorization": "Bearer rw_mcp_<workspace>_<secret>"
      }
    }
  }
}
Claude Desktop · claude_desktop_config.json
{
  "mcpServers": {
    "mailsonde": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.mailsonde.com/mcp",
        "--header",
        "Authorization:Bearer ${RW_TOKEN}"
      ],
      "env": {
        "RW_TOKEN": "rw_mcp_<workspace>_<secret>"
      }
    }
  }
}
Claude Code · terminal
claude mcp add --transport http mailsonde https://mcp.mailsonde.com/mcp \
  --header "Authorization: Bearer rw_mcp_<workspace>_<secret>"

Claude Desktop connects to remote servers through the mcp-remote bridge shown above, which runs with npx and requires Node.js. Keep the token in the env block rather than inline in args.

OAuth 2.1 instead of a token

Clients that support MCP authorization can use OAuth 2.1 from your identity provider instead of a workspace token. The access token’s audience must be the Mailsonde MCP resource; tokens issued for any other audience are rejected, so a token minted for another API cannot be replayed here.

Tool reference

ToolScopeReturns
list_client_domainsdomains:readDomains in the workspace or one client folder, with score and the five check states.
get_domain_diagnosticsdomains:readOne domain’s latest SPF, DKIM and DMARC readings and its score breakdown.
get_dns_drift_historydomains:readStored DNS snapshots that changed, with the fields that changed and when.
get_blacklist_statusdnsbl:readLatest DNSBL answers per target and list, canary-verified, error codes excluded.
get_postmaster_compliancepostmaster:readGmail spam rate and compliance status from Postmaster Tools v2; low volume returned as null.
inspect_dmarc_failuresdmarc:readFailing sources from aggregate (RUA) reports: provider, IPs, SPF and DKIM alignment.
trigger_live_dns_checkdomains:readQueues a fresh DNS check for one domain. It reads DNS again; it never edits records or settings.
example prompt
Which Contoso domains are below 80, and what is the first record I should fix on each?

REST API v1 (Agency and Scale)

The same workspace token also works as a bearer token for a read-only JSON API, for dashboards and scripts that don’t speak MCP. Calls count against the same daily limit as MCP tools and appear in the same call log.

request
curl -H "Authorization: Bearer $MAILSONDE_TOKEN" https://app.mailsonde.com/api/v1/domains
EndpointScopeReturns
GET /domainsdomains:readEvery monitored domain: score, client folder, SPF status and lookups, DMARC policy, last check times.
GET /domains/{fqdn}domains:readOne domain: score breakdown, latest DNS records, DKIM selectors, mail servers (STARTTLS, certificate, DANE). Adds blacklists, 14-day DMARC pass rate and Gmail Postmaster days when the token holds dnsbl:read, dmarc:read or postmaster:read.
GET /incidents?state=open|alldomains:readOpen incidents by default, or the last 200 with ?state=all.

Responses are {"data": …}. Errors are {"error": "<code>"}: 401 invalid_token (unknown, revoked or expired), 402 rest_api_requires_agency_plan, 403 insufficient_scope, 404 not_found, 429 daily_api_quota_exceeded with Retry-After until 00:00 UTC. A Gmail day below Google’s volume threshold has spamRate: null, never 0.

Safety and limits

  • DNS records and report fields are untrusted text; they are sanitized before tool output reaches the agent, so a TXT record cannot smuggle instructions.
  • The tool manifest is pinned by hash; tool names and descriptions cannot change silently between versions.
  • Every call is logged with token, tool, outcome and latency under API & MCP and in Activity.
  • Daily limits: 100 calls on trial, 200 on Starter, 2,000 on Agency, 10,000 on Scale.

Revoke a token from API & MCP at any time; it stops working on the next call. More in Security.