Claude Code
Claude Code can run workonward-mcp as a local stdio server. This is the recommended mode for development because the server stays on your machine and receives the PING8 API key through environment variables.
Reference: Claude Code MCP documentation (opens in a new tab).
Install Locally
cd SDK/mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .
workonward-mcp --checkKeep the virtualenv active while adding the server, or use the absolute path to .venv/bin/python in the command.
Add The Server
export WORKONWARD_API_KEY="YOUR_API_KEY"
claude mcp add --transport stdio \
--env WORKONWARD_API_KEY="$WORKONWARD_API_KEY" \
--env WORKONWARD_BASE_URL=https://mail.gitdate.ink \
--env "WORKONWARD_MCP_RECIPIENT_ALLOWLIST=@gitdate\\.ink$|@actualintelligence\\.ink$" \
--env WORKONWARD_MCP_DRY_RUN=1 \
--env WORKONWARD_MCP_AUDIT_LOG_PATH=/tmp/workonward-mcp-audit.jsonl \
workonward -- python -m workonward_mcpIf Claude Code reports that the module cannot be found, replace python with the absolute virtualenv path:
/path/to/SDK/mcp/.venv/bin/python -m workonward_mcpClaude Code options such as --transport, --env, and --scope must be placed before the server name. The command after -- is what Claude Code starts as the MCP server.
Verify
claude mcp list
claude mcp get workonwardInside Claude Code, run:
/mcpThen ask:
Use the workonward validate_recipients tool on ["person@gitdate.ink", "not-an-email"].Expected result:
- The configured server appears as
workonward. - The tools list includes
validate_recipients,preview_send,send_email, andsend_batch_email. - The invalid address is rejected before any send attempt.
Safe Send Workflow
Use this sequence in a Claude Code conversation:
Use workonward validate_recipients for this list first. Do not send yet.Use workonward preview_send for user@gitdate.ink with attribs {"name":"Ada"}. Do not send yet.If the preview recipient and body match exactly, use workonward send_email with idempotency_key "manual-smoke-001".Keep WORKONWARD_MCP_DRY_RUN=1 until you intentionally want the send_* tools to hit the PING8 Send API.
Troubleshooting
| Symptom | Check |
|---|---|
| Server does not start | Run python -m workonward_mcp --check from the same Python environment |
WORKONWARD_API_KEY missing | Export it before running claude mcp add, or place it in the --env values |
| Every recipient is denied | Set WORKONWARD_MCP_RECIPIENT_ALLOWLIST to a regex that matches the test recipients |
| Tool calls work but no email is sent | WORKONWARD_MCP_DRY_RUN=1 is still enabled |
| Need to remove the server | Run claude mcp remove workonward |