Skip to main content
Agentic Mail Center DocsBack to product

Claude Code connection guide

Claude Code connects to AgenticMailCenter as a remote MCP server. These steps were last checked with Claude Code 2.1.246 on November 4, 2026. Check the Claude Code MCP documentation if your version behaves differently.

Set AGENT_API_KEY in the environment you launch Claude Code from. Do not paste a real key into a configuration file. Add the server for your user account, substituting your deployment origin:

claude mcp add --scope user --transport http agenticmailcenter https://YOUR_AGENTICMAILCENTER_ORIGIN/mcp --header 'Authorization: Bearer ${AGENT_API_KEY}'

Run this in bash, zsh, or PowerShell. The single quotes keep ${AGENT_API_KEY} as a reference. With double quotes, those shells would replace it first, and the configuration would hold the real key or an empty value. In cmd.exe, single quotes fail with an invalid header error, so use double quotes there.

To share the server with a project instead, commit this .mcp.json file, which holds only the reference. Claude Code asks each person to approve the server the first time they run claude in that project:

{
  "mcpServers": {
    "agenticmailcenter": {
      "type": "http",
      "url": "https://YOUR_AGENTICMAILCENTER_ORIGIN/mcp",
      "headers": {
        "Authorization": "Bearer ${AGENT_API_KEY}"
      }
    }
  }
}

Start with a read-scoped key and use tool discovery to confirm the runtime catalog. Draft creation and sending require the corresponding scopes. send_with_policy requires approval and passing policy checks; the separately gated send_direct mode can send before review when enabled by the server.

Verification is non-production and read-only: connect to a test tenant, run claude mcp list and confirm agenticmailcenter shows Connected, then revoke the short-lived key. Do not send outbound email or use Production credentials during setup verification.