Skip to content

Connect Peach to ChatGPT: Manage Campaigns and Process Payments

Learn how to securely connect Peach to ChatGPT using a managed MCP server to automate campaigns, process payments, and sync donor data via natural language.

Nachi Raman Nachi Raman · · 9 min read
Connect Peach to ChatGPT: Manage Campaigns and Process Payments

If you are reading this, you are likely looking for a programmatic way to give an AI agent read and write access to your Peach instance. You want to connect Peach to ChatGPT so your operations team can query campaign statistics, freeze subscriptions, process payments, and audit transaction logs using natural language. If your team uses Claude instead, check out our guide on connecting Peach to Claude, or review our architectural overview on connecting Peach to AI Agents.

Giving a Large Language Model (LLM) access to a financial platform is a serious engineering challenge. You either spend months building, hosting, and maintaining a custom Model Context Protocol (MCP) server, or you use a managed infrastructure layer to handle the auth, token lifecycles, and schema generation for you. This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Peach, connect it natively to ChatGPT, and execute complex donor and campaign workflows.

The Engineering Reality of the Peach API

A custom MCP server acts as the translation layer between an LLM's tool calls (formatted as JSON-RPC 2.0) and the vendor's REST APIs. If you decide to build a custom MCP server for Peach, you are responsible for the entire API lifecycle. You are not just building a basic CRUD wrapper - you are managing complex financial logic.

Here are the specific integration challenges that make Peach distinctly difficult to wrap in a custom AI agent interface:

Strict Subscription and Currency Dependencies

When an LLM attempts to create a payment via the Peach API, it cannot simply push an arbitrary payload. The create_a_peach_payment endpoint has strict interdependent fields. For example, if the isSubscription boolean is true, the billingCycles field becomes strictly required. Furthermore, the currency defaults to ILS unless explicitly stated. If your custom MCP server does not enforce these schema constraints and feed them into the LLM's context window, ChatGPT will hallucinate payloads, resulting in hard HTTP 400 errors.

Action-Based State Transitions

You cannot simply use a standard HTTP PATCH to update a payment status to "cancelled" in Peach. The update_a_peach_payment_by_id endpoint requires specific action verbs to trigger state changes. Whether you are canceling a subscription, freezing an account, or changing a charge day, the payload must reflect the exact action string expected by the Peach backend. Exposing this to an LLM requires heavily curated documentation within the tool definition so the model knows which actions are legally permitted.

Hard Rate Limits and 429 Errors

Financial APIs aggressively rate limit requests to prevent abuse and ensure transactional integrity. It is critical to understand how this impacts AI tool calling. Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Peach API returns an HTTP 429 Too Many Requests, Truto passes that error directly to the caller.

Truto does, however, normalize the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. Your client application - or the LLM itself - is responsible for reading these headers and executing the retry and exponential backoff logic. Do not assume the integration layer will magically absorb rate limit errors; your agent must be explicitly prompted to respect the reset windows.

How Truto's Managed MCP Server Works

Instead of handwriting tool definitions for every Peach endpoint, Truto derives them dynamically from the integration's underlying configuration.

Every connected Peach account (an integrated account) can expose its own isolated MCP server. When ChatGPT queries the server for available tools via the tools/list protocol method, Truto inspects the API resources and their corresponding documentation records. It then automatically generates MCP-compliant JSON Schemas for both the query parameters and the request body.

The resulting MCP server is a standalone, authenticated URL. All the logic for OAuth token injection, pagination cursors, and flat-to-nested JSON parsing happens at the edge.

Step 1: Creating Your Peach MCP Server

You can generate an MCP server for Peach either manually through the Truto dashboard or programmatically via the API.

Method 1: Via the Truto UI

  1. Log into your Truto dashboard and navigate to the integrated account page for your specific Peach connection.
  2. Click on the MCP Servers tab.
  3. Click the Create MCP Server button.
  4. Select your desired configuration. You can filter the server to only expose "read" methods, or restrict it to specific resource tags.
  5. Copy the generated MCP server URL. Keep this secret - the URL contains a cryptographic token that authenticates the session.

Method 2: Via the API

For development teams managing hundreds of connected accounts, you can generate MCP servers dynamically using the Truto REST API. The API generates a secure token, provisions the server at the edge, and returns a ready-to-use URL.

Make a POST request to /integrated-account/:id/mcp:

curl -X POST https://api.truto.one/integrated-account/<your_integrated_account_id>/mcp \
  -H "Authorization: Bearer <your_truto_api_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Peach Campaign Assistant",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'

The response will contain the unique server URL you need for ChatGPT:

{
  "id": "mcp-7a8b9c0d",
  "name": "Peach Campaign Assistant",
  "config": { "methods": ["read", "write", "custom"] },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/t_a1b2c3d4e5f6g7h8..."
}

Step 2: Connecting the MCP Server to ChatGPT

With your secure URL in hand, you must point your ChatGPT workspace to the Truto MCP routing layer.

Method A: Via the ChatGPT UI

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Toggle Developer mode on (custom MCP support is restricted behind this flag and requires a Pro, Plus, Business, Enterprise, or Education account).
  3. Under the custom connectors section, select Add a new server.
  4. Enter a recognizable name (e.g., "Peach Production Instance").
  5. Paste the Truto MCP URL into the Server URL field and click Save.

ChatGPT will immediately ping the endpoint, execute the initialization handshake, and parse the available Peach tools.

Method B: Via Manual Config File

If you are testing locally with an open-source agent framework, or using the Claude Desktop app alongside ChatGPT, you can bind the URL using the standard MCP Server-Sent Events (SSE) transport wrapper. Add the following to your configuration file:

{
  "mcpServers": {
    "peach-truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/t_a1b2c3d4e5f6g7h8..."
      ]
    }
  }
}

Hero Tools for Peach Automation

When you connect Peach via Truto, your AI agent gains access to a massive inventory of proxy APIs. Truto dynamically converts the raw documentation into strict JSON Schemas so the LLM understands exactly what fields are required. Here are the highest-leverage tools available for Peach.

get_single_peach_campaign_by_id

Retrieves the core configuration of a specific campaign, including its total capacity limit, start dates, and end dates. This is highly useful for automated auditing and ensuring active campaigns have not expired.

"Check campaign ID 10948 and tell me when it is scheduled to end, and if there is a limit on the funds it can collect."

peach_campaigns_get_stats

Fetches detailed public statistics for a campaign. This tool surfaces the total amount raised, the raw donation count, and per-group breakdowns. It requires both the account_id and the campaign_id.

"Pull the total amount raised and the total donation count for campaign ID 9920 under account ID 44."

create_a_peach_payment

Executes a live payment transaction in Peach. The tool requires a sum. As noted earlier, the currency defaults to ILS, and billingCycles becomes mandatory if the LLM sets isSubscription to true.

"Process a new subscription payment of 100 ILS for donor email test@example.com on campaign ID 10948. Set the billing cycles to 12."

update_a_peach_payment_by_id

Triggers an action-based state transition on an existing payment. Use this tool to cancel a subscription, change a charge day, or freeze an ongoing payment plan. The LLM must supply the payment ID and the specific action string.

"Freeze the subscription associated with payment ID p_99382 immediately."

create_a_peach_contact

Provisions a new contact record in the Peach CRM database. The tool requires firstName, lastName, and email, returning the internal contactId for future reference.

"Create a new contact for John Doe at john.doe@example.com and return his new contact ID."

peach_interactions_create_note

Appends a structured note to an existing contact. This is critical for maintaining CRM hygiene after an AI agent takes action on an account. The agent can use this tool to log exactly why a payment was frozen or when a refund was discussed.

"Add a note to contact ID 8847 stating that the user requested to freeze their subscription until the end of the year."

list_all_peach_search_transactions

Searches Peach transactions within a specific date range. The agent can filter the results by campaign. By default, it searches the last 30 days and supports pagination for up to 1000 results per page.

"Find all transactions for campaign ID 9920 that occurred in the last 7 days."

To view the complete schema definitions, required parameters, and the full inventory of available proxy endpoints, visit the Peach integration page.

Workflows in Action

Once the MCP server is mounted, ChatGPT is no longer a passive text generator. It operates as an autonomous financial administrator capable of orchestrating multi-step API sequences.

Scenario 1: Subscription Freeze and CRM Logging

Customer support teams waste hours manually tracking down subscriptions, freezing them, and logging notes in the CRM. An AI agent can handle this autonomously when a user requests a pause.

"The donor at test@example.com asked to pause their subscription for the next three months. Find their contact record, freeze their active payment plan, and log a note explaining the freeze."

  1. get_single_peach_contact_by_id: The agent queries the database using the provided email to fetch the contactId.
  2. list_all_peach_search_transactions: The agent searches recent transactions linked to that contact to locate the active subscription payment ID.
  3. update_a_peach_payment_by_id: The agent executes the freeze action against the located payment ID.
  4. peach_interactions_create_note: The agent writes a detailed note back to the contact record confirming the subscription was successfully frozen.

Scenario 2: Campaign Audit and Metric Extraction

Marketing and finance teams constantly need real-time data on campaign performance without digging through analytics dashboards.

"Audit campaign ID 10948. Tell me its start and end dates, verify its funding limit, and then pull the live statistics showing exactly how much we have raised so far."

  1. get_single_peach_campaign_by_id: The agent pulls the base metadata, extracting the start date, end date, and any hard limits configured on the campaign.
  2. peach_campaigns_get_stats: The agent fetches the real-time public statistics, capturing the total donation count and the exact sum raised.
  3. Formatting: ChatGPT synthesizes the data points into a clear executive summary for the user.
sequenceDiagram
    participant User as User
    participant Agent as ChatGPT (MCP Client)
    participant Truto as Truto MCP Server
    participant Upstream as "Upstream API (Peach)"

    User->>Agent: "Audit campaign 10948 limits and total raised"
    
    Agent->>Truto: tools/call (get_single_peach_campaign_by_id)
    Truto->>Upstream: GET /v1/campaigns/10948
    Upstream-->>Truto: Campaign limits and dates
    Truto-->>Agent: JSON Schema result
    
    Agent->>Truto: tools/call (peach_campaigns_get_stats)
    Truto->>Upstream: GET /v1/campaigns/10948/stats
    Upstream-->>Truto: Total raised and donation count
    Truto-->>Agent: JSON Schema result

    Agent-->>User: Executive summary rendered

Security and Access Control

Giving an AI agent raw API access requires strict boundaries. If an LLM misinterprets a prompt, you do not want it accidentally deleting massive swaths of contact records. Truto provides four layers of access control natively within the MCP token configuration:

  • Method Filtering: Restrict a server to safe operations by defining methods: ["read"]. This drops create, update, and delete tools from the LLM's context window completely, ensuring the agent operates in a strictly read-only capacity.
  • Tag Filtering: Group tools by functional area using tags. For example, you can create a server that only exposes endpoints tagged with campaigns, preventing the LLM from accessing payments or contacts.
  • Require API Token Auth: By default, anyone with the MCP URL can invoke tools. By enabling require_api_token_auth: true, Truto forces the client to also inject a valid Truto API Bearer token in the request header, securing the server against leaked URLs.
  • Expiration Timers: Provide temporary access by setting an expires_at timestamp. Once the datetime passes, Truto's edge storage automatically purges the token and destroys the server's routing rules.

Automate Financial Operations with Confidence

Building an integration with Peach is not just about moving data; it requires understanding the rigid business logic of payment processing, subscriptions, and campaign management. By using Truto to generate a managed MCP server, you offload the infrastructure burden of maintaining OAuth tokens, deriving JSON Schemas, and mapping flat tool calls to nested REST logic.

You can connect Peach to ChatGPT in minutes, deploying an AI agent capable of managing live donations, freezing active subscriptions, and auditing campaign performance securely.

FAQ

Can I prevent ChatGPT from creating or deleting payments in Peach?
Yes. When generating the MCP server in Truto, you can set method filters like `methods: ["read"]`. This prevents write, create, and delete endpoints from being exposed to the LLM.
How are Peach API rate limits handled by the MCP server?
Truto does not absorb or retry rate limit errors. If Peach returns a 429 error, Truto passes it directly to the caller with normalized headers (`ratelimit-limit`, `ratelimit-reset`). The client or LLM is responsible for executing backoff logic.
Do I need to write custom JSON schemas for Peach endpoints?
No. Truto dynamically derives tools and JSON schemas from the underlying Peach integration documentation. If an endpoint is documented in Truto, it is automatically available as a structured tool for ChatGPT.
How do I secure the MCP server URL?
You can enable `require_api_token_auth` on the MCP configuration. This forces ChatGPT or any client to also provide a valid Truto API Bearer token in the headers, adding a second layer of authentication beyond the URL token itself.

More from our Blog