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.
https://mcp.mailsonde.com/mcpCreate a workspace token
- Open API & MCP in the dashboard (owner or admin).
- Create a token and give it a name you will recognise in the call log, such as
claude-desktop-ops. - Copy it immediately: it is shown once. Mailsonde keeps only a SHA-256 hash and the prefix.
rw_mcp_<workspace id>_<43-character secret>Configure your client
Replace the placeholder with your token. Restart the client after editing its config.
{
"mcpServers": {
"mailsonde": {
"url": "https://mcp.mailsonde.com/mcp",
"headers": {
"Authorization": "Bearer rw_mcp_<workspace>_<secret>"
}
}
}
}{
"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 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
| Tool | Scope | Returns |
|---|---|---|
| list_client_domains | domains:read | Domains in the workspace or one client folder, with score and the five check states. |
| get_domain_diagnostics | domains:read | One domain’s latest SPF, DKIM and DMARC readings and its score breakdown. |
| get_dns_drift_history | domains:read | Stored DNS snapshots that changed, with the fields that changed and when. |
| get_blacklist_status | dnsbl:read | Latest DNSBL answers per target and list, canary-verified, error codes excluded. |
| get_postmaster_compliance | postmaster:read | Gmail spam rate and compliance status from Postmaster Tools v2; low volume returned as null. |
| inspect_dmarc_failures | dmarc:read | Failing sources from aggregate (RUA) reports: provider, IPs, SPF and DKIM alignment. |
| trigger_live_dns_check | domains:read | Queues a fresh DNS check for one domain. It reads DNS again; it never edits records or settings. |
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.
curl -H "Authorization: Bearer $MAILSONDE_TOKEN" https://app.mailsonde.com/api/v1/domains| Endpoint | Scope | Returns |
|---|---|---|
| GET /domains | domains:read | Every monitored domain: score, client folder, SPF status and lookups, DMARC policy, last check times. |
| GET /domains/{fqdn} | domains:read | One 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|all | domains:read | Open 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.