Skip to content

Connect Amply to ChatGPT: Manage IP Pools, Domains, and Send Emails

Learn how to connect Amply to ChatGPT using Truto's MCP Server. Orchestrate IP pools, manage domain verification, and send transactional emails via AI agents.

Uday Gajavalli Uday Gajavalli · · 7 min read
Connect Amply to ChatGPT: Manage IP Pools, Domains, and Send Emails

This guide details how to expose Amply's email infrastructure to ChatGPT using Truto's Model Context Protocol (MCP) server. By bridging these systems, you can orchestrate email dispatch, monitor IP pools, and automate domain verification directly from a conversational interface or an OpenAI-powered autonomous agent.

If your team uses Claude, check out our guide on connecting Amply to Claude, or see our broader architectural overview on connecting Amply to AI Agents.

The Engineering Reality of Email Infrastructure APIs

Email infrastructure APIs like Amply present specific operational hurdles that differ significantly from standard CRUD applications. When connecting an LLM to an email delivery system, you must design around these realities:

  1. Deeply Nested Personalization Payloads: Sending a transactional email via Amply requires precise JSON structures. The personalizations array dictates how recipients, CCs, and BCCs map to dynamic template data. LLMs frequently hallucinate or flatten these nested arrays if the schema is ambiguous. Truto's dynamic tool generation enforces strict JSON Schema definitions derived directly from Amply's API documentation, ensuring the LLM constructs valid multi-recipient payloads.
  2. DNS Verification Timing and State: Managing verified domains requires querying DNS challenge records (SPF, DKIM, CNAME) and triggering validation. Because DNS propagation is asynchronous, an LLM might attempt to validate a domain immediately after creating it. Your agent prompts must instruct the model to wait or handle pending statuses gracefully when polling for domain verification.
  3. Strict Rate Limits Without Safety Nets: Transactional email systems aggressively rate-limit API calls to prevent spam and abuse. Truto does not retry, throttle, or apply backoff on rate limit errors. When Amply returns an HTTP 429 Too Many Requests, Truto passes that error directly to the caller. However, Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. Your ChatGPT client or agent framework is strictly responsible for interpreting these headers and executing its own retry or backoff logic.

Generating the Amply MCP Server

Truto creates MCP servers dynamically based on your connected Amply integration. The server URL contains a cryptographic token that securely maps to the specific Amply account, meaning no additional authentication boilerplate is required in the client.

Method 1: Via the Truto UI

  1. Navigate to your connected Amply integrated account in the Truto dashboard.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Configure the server (name, allowed methods, expiration).
  5. Copy the generated MCP server URL (e.g., https://api.truto.one/mcp/your-secure-token).

Method 2: Via the Truto API

For platform engineers provisioning infrastructure programmatically, you can generate the MCP server via an authenticated POST request.

curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ChatGPT Amply Ops",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'

The API securely hashes the token and stores the configuration in a distributed key-value store. It returns a ready-to-use URL:

{
  "id": "mcp_abc123",
  "name": "ChatGPT Amply Ops",
  "config": { "methods": ["read", "write", "custom"] },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}

Connecting the MCP Server to ChatGPT

Once you have your Truto MCP URL, you can expose the Amply tools to ChatGPT. We will cover both the standard UI flow and the manual configuration file approach for custom OpenAI-based agents.

The UI Connector Flow

For native ChatGPT Plus, Pro, or Enterprise users, you can add the server directly via the interface:

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Enable Developer mode (MCP support requires this feature flag).
  3. Under the MCP servers or Custom connectors section, click to add a new server.
  4. Name: "Amply Email Infrastructure".
  5. Server URL: Paste your Truto MCP URL.
  6. Save the configuration. ChatGPT will instantly perform an MCP handshake, pulling down the tool descriptions and schemas.

The Manual Config File Approach

If you are building a custom OpenAI-powered agent using frameworks like LangChain, Swarm, or a custom Node.js runner, you connect to the Truto MCP server using a manual configuration file. This file dictates how the agent routes tool calls to the remote JSON-RPC endpoint.

{
  "mcpServers": {
    "amply_ops": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/client",
        "connect",
        "--url",
        "https://api.truto.one/mcp/a1b2c3d4e5f6..."
      ]
    }
  }
}

The framework reads this configuration, discovers the available Amply tools over HTTP POST, and injects them into the LLM's context window.

Amply Tool Inventory

Truto automatically translates Amply's API documentation into LLM-ready tool definitions. Below is the two-tier structure of available tools.

For full schema details and required parameters, visit the Amply integration page.

Hero Tools

These represent the most critical operations for orchestrating email deliverability and dispatch.

create_a_amply_email

Send an email via Amply. You must supply a from address, an array of personalizations (containing recipient to addresses), and either raw content or a template UUID. Usage Note: The LLM must be instructed to correctly format the personalizations array to avoid API rejection.

Prompt example: "Send a welcome email to admin@example.com from no-reply@mycompany.com using the template UUID 550e8400-e29b-41d4-a716-446655440000."

list_all_amply_ip_pools

Retrieve all IP pools configured in your Amply account. Usage Note: Essential for diagnosing deliverability issues or deciding which pool to assign a dedicated IP address to.

Prompt example: "List all of our active Amply IP pools and tell me their creation dates."

update_a_amply_ip_address_by_id

Modify the configuration of an existing IP address, such as reassigning it to a different IP pool or updating its status. Usage Note: Requires the specific IP address id. Often used in conjunction with the list operations.

Prompt example: "Update the IP address id ip_98765 to attach it to the 'Transactional Emails' IP pool."

get_single_amply_verified_domain_dns_challenge_by_id

Retrieve the specific SPF, DKIM, and CNAME records required to verify a domain. Usage Note: The LLM can retrieve these records and format them nicely for a DevOps engineer to paste into Route53 or Cloudflare.

Prompt example: "Get the DNS challenge records for the verified domain id dom_12345 and output them in a standard BIND zone file format."

create_a_amply_verified_domain_validation

Trigger the Amply backend to poll DNS and validate a previously added domain. Usage Note: Call this only after ensuring the DNS records have had time to propagate.

Prompt example: "Trigger the validation check for our newly added domain, id dom_12345."

Workflows in Action

By providing ChatGPT access to these tools, you can resolve complex infrastructure requests via natural language. Here are three real-world scenarios.

Scenario 1: New Domain Onboarding

"We just bought marketing-updates.com. Add it to Amply, get the required DNS records, and give them to me so I can update Cloudflare. Then trigger the validation."

  1. create_a_amply_verified_domain: ChatGPT calls this tool with the name "marketing-updates.com". It receives the new domain id.
  2. get_single_amply_verified_domain_dns_challenge_by_id: Using the ID, the agent fetches the exact SPF, DKIM, and CNAME values required.
  3. create_a_amply_verified_domain_validation: The agent triggers the validation process, acknowledging that DNS propagation might take time. Result: The user receives a neatly formatted list of DNS records and confirmation that the verification process has been initiated in Amply.

Scenario 2: IP Pool Routing and Investigation

"List all of our IP addresses. Find the one ending in .45 and move it from the 'Onboarding' pool to the 'Transactional' pool."

  1. list_all_amply_ip_addresses: ChatGPT fetches the array of IPs and inspects the public_ip fields to locate the one ending in ".45". It extracts the internal id.
  2. list_all_amply_ip_pools: The agent fetches the available pools to find the exact id for the "Transactional" pool.
  3. update_a_amply_ip_address_by_id: The agent executes the update, passing the target IP address id and the new pool array. Result: The IP routing is reconfigured instantly without the user having to navigate the Amply dashboard.

Scenario 3: Emergency Communication Dispatch

"Send a critical downtime alert to dev-team@ourcompany.com from alerts@ourcompany.com. Use the text: 'The main database is experiencing high latency. Investigating now.'"

  1. create_a_amply_email: ChatGPT constructs the JSON payload, placing dev-team@ourcompany.com inside the personalizations array, setting the from block, and mapping the message text to the content array. Result: The email is dispatched immediately via the Amply API. If the Amply API rejects it due to a rate limit, Truto passes the 429 status and IETF headers back to ChatGPT. The user will be notified of the failure and the agent can wait and retry.

Security and Access Control

Exposing email infrastructure to AI agents requires strict access controls. Truto secures your MCP endpoints through several configuration layers:

  • Method Filtering: Limit an MCP server to read-only operations by passing methods: ["read"] during creation. This ensures ChatGPT can view IP lists and DNS records but cannot send emails or delete domains.
  • Tag Filtering: Group tools by functional area using config.tags. You can create an MCP server restricted solely to tools tagged as "monitoring" or "domains".
  • Secondary Authentication (require_api_token_auth): Enable this flag to require the caller to provide a valid Truto API token in the Authorization header. This adds a layer of identity verification beyond possession of the URL.
  • Time-to-Live (expires_at): Provide temporary access to automated agents by setting an ISO datetime expiration. A scheduled task automatically cleans up the token and invalidates the session when the time expires.
  • Zero Data Retention: Truto's MCP architecture operates entirely as a pass-through proxy. Tool invocations, email content, and DNS records pass directly between ChatGPT and Amply without being persisted in Truto's databases.

FAQ

Does Truto automatically handle Amply rate limit errors?
No. Truto passes HTTP 429 Too Many Requests errors directly back to the caller. However, it normalizes upstream rate limit info into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your agent framework must implement its own retry and backoff logic.
Can I prevent ChatGPT from sending unauthorized emails?
Yes. When creating the Truto MCP server, you can apply method filters (e.g., config: { methods: ['read'] }) to generate a server that can only fetch domain records and IP lists, entirely excluding tools like create_a_amply_email.
How do I connect the MCP Server to ChatGPT?
If using the ChatGPT UI, navigate to Settings -> Apps -> Advanced settings -> Developer mode, and add a Custom Connector by pasting the Truto MCP URL. For custom OpenAI agents, you configure your client's MCP configuration file with the Truto URL.
What happens if an LLM hallucinates Amply's personalization JSON structure?
Truto curates tools dynamically based on exact API documentation. By providing strict JSON schemas to the LLM during the MCP handshake, it significantly reduces the likelihood of hallucinated payloads, though the agent must still adhere to the schema provided.

More from our Blog