Other MCP clients
Add the server to your AI client using the snippet for your app below. Each app has two options — pick one:
- OAuth (recommended): leave the API key out. On first use your client opens a LegalZoom sign-in page in your browser (see Authentication). Use this if your client supports OAuth.
- API key: paste the key you generated wherever you see
[YOUR_API_KEY]. Use this if your client doesn’t support OAuth, or for unattended agents.
Available servers
Section titled “Available servers”| Server | URL |
|---|---|
| All tools | https://api.earthclassmail.com/v2/mcp |
| Read-only tools | https://api.earthclassmail.com/v2/mcp/readonly |
Tool catalog
Section titled “Tool catalog”Machine-readable descriptions of every tool the server exposes, useful for agents and automated discovery:
| Format | URL |
|---|---|
| Plain text | mcp_catalog.txt |
| JSON | mcp_catalog.json |
Read-only access
Section titled “Read-only access”Read-only access limits your connection to tools that can view mail — finding, listing, and reading message text. Tools that take action (scanning, shredding, moving, tagging, transferring) are not available.
You can enable read-only access in either of two ways:
- Use the read-only URL — connect to
.../v2/mcp/readonly. Works if your client only lets you configure a URL, or if you want a connection that can never be switched to full access. - Use the read-only header — keep the standard URL and add the header
X-MCP-ReadOnly: true. Works if your client supports custom headers and you prefer a single URL.
Client setup
Section titled “Client setup”With OAuth
Section titled “With OAuth”All tools:
claude mcp add --transport http virtual-mail https://api.earthclassmail.com/v2/mcpRead-only (via URL):
claude mcp add --transport http virtual-mail https://api.earthclassmail.com/v2/mcp/readonlyRead-only (via header):
claude mcp add --transport http virtual-mail https://api.earthclassmail.com/v2/mcp --header "X-MCP-ReadOnly: true"With an API key
Section titled “With an API key”All tools:
claude mcp add --transport http virtual-mail https://api.earthclassmail.com/v2/mcp --header "Authorization: Bearer [YOUR_API_KEY]"Read-only (via URL):
claude mcp add --transport http virtual-mail https://api.earthclassmail.com/v2/mcp/readonly --header "Authorization: Bearer [YOUR_API_KEY]"Read-only (via header):
claude mcp add --transport http virtual-mail https://api.earthclassmail.com/v2/mcp --header "Authorization: Bearer [YOUR_API_KEY]" --header "X-MCP-ReadOnly: true"With OAuth
Section titled “With OAuth”All tools:
codex mcp add virtual-mail --url https://api.earthclassmail.com/v2/mcpRead-only (via URL):
codex mcp add virtual-mail --url https://api.earthclassmail.com/v2/mcp/readonlyRead-only (via header) — add to ~/.codex/config.toml:
[mcp_servers.virtual-mail]enabled = truetransport = "streamable_http"url = "https://api.earthclassmail.com/v2/mcp"http_headers = { "X-MCP-ReadOnly" = "true" }Then authenticate:
codex mcp login virtual-mailWith an API key
Section titled “With an API key”All tools:
export VIRTUAL_MAIL_API_KEY="[YOUR_API_KEY]"codex mcp add virtual-mail \ --url https://api.earthclassmail.com/v2/mcp \ --bearer-token-env-var VIRTUAL_MAIL_API_KEYRead-only (via URL):
export VIRTUAL_MAIL_API_KEY="[YOUR_API_KEY]"codex mcp add virtual-mail \ --url https://api.earthclassmail.com/v2/mcp/readonly \ --bearer-token-env-var VIRTUAL_MAIL_API_KEYRead-only (via header) — add to ~/.codex/config.toml:
[mcp_servers.virtual-mail]enabled = truetransport = "streamable_http"url = "https://api.earthclassmail.com/v2/mcp"bearer_token_env_var = "VIRTUAL_MAIL_API_KEY"http_headers = { "X-MCP-ReadOnly" = "true" }Then set the environment variable:
export VIRTUAL_MAIL_API_KEY="[YOUR_API_KEY]"Add to ~/.cursor/mcp.json.
With OAuth
Section titled “With OAuth”All tools:
{ "mcpServers": { "virtual-mail": { "url": "https://api.earthclassmail.com/v2/mcp" } }}Read-only (via URL):
{ "mcpServers": { "virtual-mail": { "url": "https://api.earthclassmail.com/v2/mcp/readonly" } }}Read-only (via header):
{ "mcpServers": { "virtual-mail": { "url": "https://api.earthclassmail.com/v2/mcp", "headers": { "X-MCP-ReadOnly": "true" } } }}With an API key
Section titled “With an API key”All tools:
{ "mcpServers": { "virtual-mail": { "url": "https://api.earthclassmail.com/v2/mcp", "headers": { "Authorization": "Bearer [YOUR_API_KEY]" } } }}Read-only (via URL):
{ "mcpServers": { "virtual-mail": { "url": "https://api.earthclassmail.com/v2/mcp/readonly", "headers": { "Authorization": "Bearer [YOUR_API_KEY]" } } }}Read-only (via header):
{ "mcpServers": { "virtual-mail": { "url": "https://api.earthclassmail.com/v2/mcp", "headers": { "Authorization": "Bearer [YOUR_API_KEY]", "X-MCP-ReadOnly": "true" } } }}Add to .vscode/mcp.json.
With OAuth
Section titled “With OAuth”All tools:
{ "servers": { "virtual-mail": { "type": "http", "url": "https://api.earthclassmail.com/v2/mcp" } }}Read-only (via URL):
{ "servers": { "virtual-mail": { "type": "http", "url": "https://api.earthclassmail.com/v2/mcp/readonly" } }}Read-only (via header):
{ "servers": { "virtual-mail": { "type": "http", "url": "https://api.earthclassmail.com/v2/mcp", "headers": { "X-MCP-ReadOnly": "true" } } }}With an API key
Section titled “With an API key”All tools:
{ "servers": { "virtual-mail": { "type": "http", "url": "https://api.earthclassmail.com/v2/mcp", "headers": { "Authorization": "Bearer [YOUR_API_KEY]" } } }}Read-only (via URL):
{ "servers": { "virtual-mail": { "type": "http", "url": "https://api.earthclassmail.com/v2/mcp/readonly", "headers": { "Authorization": "Bearer [YOUR_API_KEY]" } } }}Read-only (via header):
{ "servers": { "virtual-mail": { "type": "http", "url": "https://api.earthclassmail.com/v2/mcp", "headers": { "Authorization": "Bearer [YOUR_API_KEY]", "X-MCP-ReadOnly": "true" } } }}