Skip to content

Connect an AI agent

AI agents, such as a sales agent, a support bot or a coding assistant, can use a simmail universe as their mailbox over the Model Context Protocol (MCP). They send email, wait for replies, read inboxes, add people and move the clock, as tools.

The people they write to are simulated, and nothing reaches the real internet. So you can let an agent loose on a hundred prospects and read every conversation afterwards.

Each universe’s MCP address is on your account page, next to its API address:

https://c1.simmail.dev/mcp

It uses MCP’s Streamable HTTP transport: one JSON-RPC request per POST, answered with JSON. There is no event stream; a GET answers 405.

Send an API key as a bearer token:

Authorization: Bearer smk_your_key

The key decides the universe. The key needs at least the member role, and your organization’s plan needs the MCP feature; otherwise the endpoint answers 403 or 402.

Make a key just for the agent (name it “AI agent”), so you can revoke it on its own.

Every client below talks to the same address with the same key. Create a key on your account page, put it in an environment variable where the client supports one, and paste the matching setup:

Terminal window
export SIMMAIL_API_KEY=smk_your_key
Terminal window
claude mcp add --transport http simmail https://c1.simmail.dev/mcp \
--header "Authorization: Bearer $SIMMAIL_API_KEY"

Add --scope user to have it in every project, or --scope project to share it with your team. In that case Claude Code writes .mcp.json at the project root, and you can keep the key out of the file:

{
"mcpServers": {
"simmail": {
"type": "http",
"url": "https://c1.simmail.dev/mcp",
"headers": { "Authorization": "Bearer ${SIMMAIL_API_KEY}" }
}
}
}

ChatGPT connectors don’t take an API key yet: they only sign in with OAuth, which simmail’s MCP endpoint doesn’t offer yet. Use one of the clients above, or the OpenAI API below.

The Messages API connects to simmail itself, with the MCP connector (beta header mcp-client-2025-11-20). Pass the key without Bearer:

import os, anthropic
client = anthropic.Anthropic()
msg = client.beta.messages.create(
model="claude-opus-5-5",
max_tokens=2000,
betas=["mcp-client-2025-11-20"],
mcp_servers=[{
"type": "url",
"url": "https://c1.simmail.dev/mcp",
"name": "simmail",
"authorization_token": os.environ["SIMMAIL_API_KEY"],
}],
tools=[{"type": "mcp_toolset", "mcp_server_name": "simmail"}],
messages=[{"role": "user", "content": "Email [email protected] from [email protected] and tell me how she replies."}],
)

simmail serves both eras of MCP:

VersionHow it starts
2025-03-26, 2025-06-18, 2025-11-25The initialize handshake. simmail answers with the version you ask for, or 2025-11-25 if it does not know yours.
2026-07-28No handshake: server/discover, and the version in each request’s _meta (io.modelcontextprotocol/protocolVersion). If you also send the MCP-Protocol-Version header, it must match.

The methods served are initialize, server/discover, ping, tools/list and tools/call. Notifications (requests without an id) are accepted with 202.

Terminal window
curl -s https://c1.simmail.dev/mcp \
-H "Authorization: Bearer smk_your_key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "initialize",
"params": {"protocolVersion": "2025-06-18", "capabilities": {},
"clientInfo": {"name": "curl", "version": "1"}}}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2025-06-18",
"capabilities": { "tools": { "listChanged": false } },
"serverInfo": { "name": "simmail", "title": "simmail · CI", "version": "1.0" },
"instructions": "simmail is an email sandbox whose recipients are simulated people. …"
}
}

Then list the tools:

Terminal window
curl -s https://c1.simmail.dev/mcp \
-H "Authorization: Bearer smk_your_key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}'

A tool’s result is one text item holding the API’s JSON answer. When the underlying call fails, isError is true and the text is the error message, such as “Dana Reyes did not reply before the timeout”.

Next: the tools and an example agent configuration.