Skip to content
Developers

MCP

MCP

A hosted Model Context Protocol server. Agents call the same workspace, with the same key and the same charges, as the REST API.

Authentication

Send Authorization: Bearer emk_… on every request, including initialize. The key is the one under Workspace → API keys. Scopes and the rate limit are the same as Authentication. The organization comes from the key. Do not send a profile id to switch brands. A missing or unknown key is HTTP 401 UNAUTHORIZED, before any JSON-RPC body is read.

Keep the secret out of a committed config file. Cursor and Claude both accept the header from an environment variable. Tick only the scopes that agent should hold. A key with * can send email, confirm a post, and delete a vault entry.

Cursor

Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project. Cursor speaks remote HTTP when url is set.

mcp.json
{
  "mcpServers": {
    "thealtermeai": {
      "url": "https://api.thealtermeai.com/mcp",
      "headers": {
        "Authorization": "Bearer emk_YOUR_KEY"
      }
    }
  }
}

Claude

Claude Code and Claude Desktop use the same remote server. Set type to http.

claude_desktop_config.json
{
  "mcpServers": {
    "thealtermeai": {
      "type": "http",
      "url": "https://api.thealtermeai.com/mcp",
      "headers": {
        "Authorization": "Bearer emk_YOUR_KEY"
      }
    }
  }
}

Any other client

A client that implements MCP streamable HTTP can connect without a vendor-specific SDK. Send Accept: application/json, text/event-stream. The response is application/json.

curl
curl -sS https://api.thealtermeai.com/mcp \
  -H "Authorization: Bearer emk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"example","version":"1.0.0"}}}'

initialize returns protocolVersion 2025-03-26, capabilities.tools.listChanged: false, and serverInfo.name thealtermeai. Then send notifications/initialized with no id. A notification is answered with HTTP 202 and an empty body.

Methods

  • initialize — handshake, above
  • ping — returns an empty object
  • tools/list — the live tool list, each with name, description, and inputSchema. Prefer this over a hardcoded list
  • tools/call — params.name and params.arguments

Resources and prompts are not served. resources/list and prompts/list return JSON-RPC -32601 Method not found. An unknown tool returns HTTP 200 with isError: true and code: UNKNOWN_TOOL.

Tool results

A successful call is HTTP 200. result.content is one item, type: "text", whose text is a JSON string of the payload. Parse that string. A tool failure is also HTTP 200, with result.isError: true and text set to { "code", "error" }.

FORBIDDEN means the key is missing that tool’s scope. FEATURE_DISABLED means the product is off for the workspace. INSUFFICIENT_WORK_FUNDS and INSUFFICIENT_AI_TOKENS mean the wallet cannot cover the action. HTTP 429 with RATE_LIMIT and Retry-After means the key’s 120 requests per minute are used up. Each MCP request, including tools/list, spends one unit of that window.

What an agent should not do on its own

Creating a campaign or a REST post group saves a draft. These MCP tools do more than that, and they should wait for the user:

  • email_send_campaign mails the audience
  • email_send_message delivers to the addresses in the call
  • scheduling_schedule_post creates the post and confirms it, which publishes and charges
  • knowledge_delete_entry removes a vault entry
  • knowledge_search, and indexing after a create or a text change, spend AI tokens

knowledge_list_entries and knowledge_get_entry do not spend AI tokens. The full catalogue, with scopes, is on Tools. The REST guides are Email Marketing, Transactional email, Post Scheduling, and Knowledge Vault.