MCP Server

workonward-mcp exposes the PING8 Send API to Model Context Protocol clients. It is built on the Python workonward SDK and is safety-first by default: dry-run is on, an empty recipient allowlist denies every send, and limits are enforced server-side.

Use it when you want Claude Code, Claude Desktop, Claude.ai web connectors, Cursor, ChatGPT custom connectors, Windsurf, or Zed to validate, preview, and send email through PING8 with auditable controls.

Install

cd SDK/mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .
workonward-mcp --check

Python 3.11+ is required. If a client cannot find the package with python -m workonward_mcp, use the absolute path to the virtualenv Python, such as /path/to/SDK/mcp/.venv/bin/python.

Tools

ToolSide effectUse first
validate_recipients(recipients[])noneCheck syntax and allowlist matches
preview_send(recipient, attribs?, addresser?)noneInspect the exact request before sending
send_email(recipient, attribs?, addresser?, idempotency_key?)sends one email when dry-run is offPreview the same recipient first
send_batch_email(recipients[], attribs?, addresser?, idempotency_key?, confirm_token?)sends many emails when dry-run is offValidate the full list first

Models can request tool calls, but the server enforces recipient allowlist checks, dry-run mode, batch-size caps, rate limits, idempotency, and audit logging.

Required Configuration

export WORKONWARD_API_KEY="YOUR_API_KEY"
export WORKONWARD_BASE_URL="https://mail.gitdate.ink"
export WORKONWARD_MCP_RECIPIENT_ALLOWLIST='@yourdomain\.com$'
export WORKONWARD_MCP_DRY_RUN=1

Keep WORKONWARD_MCP_DRY_RUN=1 until you have run validate_recipients and preview_send through your MCP client. To permit real sends, set WORKONWARD_MCP_DRY_RUN=0 only after the allowlist, audit path, and rate limits are confirmed.

Choose A Transport

ModeRecommended clientsNotes
stdio + envClaude Code, Claude Desktop, Cursor, Windsurf, ZedThe client starts a local process and passes secrets through environment variables
http + bearerInternal services, CI, trusted private networksRequires Authorization: Bearer <token> and TLS or explicit local-dev acknowledgement
http + oauthClaude.ai web connectors, ChatGPT custom connectorsRequires a public HTTPS endpoint and OAuth 2.1 configuration

Use WORKONWARD_MCP_TRANSPORT and WORKONWARD_MCP_AUTH to switch modes. For public remote connectors, use https://mcp.gitdate.ink/mcp as the connector URL.

Client Setup Guides

ClientRecommended modePage
Claude Codestdio + envClaude Code
Claude Desktopstdio + envClaude Desktop
Claude.ai web connectorshttp + oauthClaude.ai Web
Cursorstdio + envCursor
ChatGPT custom connectorshttp + oauthChatGPT
Windsurfstdio + envWindsurf
Zedstdio + envZed

Safe First Test

  1. Start with WORKONWARD_MCP_DRY_RUN=1.
  2. Set WORKONWARD_MCP_RECIPIENT_ALLOWLIST to a narrow regex, such as your internal test domain only.
  3. Ask the model to call validate_recipients with one allowed and one blocked address.
  4. Ask the model to call preview_send for one allowed recipient.
  5. Inspect the preview, audit log, and client approval prompt.
  6. Set WORKONWARD_MCP_DRY_RUN=0 only when you are ready for real sends.

Production Guardrails

  • Empty recipient allowlist means deny all sends.
  • Dry-run is on by default.
  • Batch size is capped by WORKONWARD_MCP_MAX_BATCH_SIZE.
  • Rate limits are enforced per auth subject.
  • Reused idempotency keys return cached results instead of sending again.
  • WORKONWARD_MCP_AUDIT_LOG_PATH writes JSONL audit records with recipient hashes, not raw recipient addresses.
  • API keys, bearer tokens, and OAuth signing keys are redacted in config output.

CLI

workonward-mcp
workonward-mcp --check
workonward-mcp --print-config
workonward-mcp --transport http
workonward-mcp --generate-signing-key

--print-config redacts secrets before printing.