---
name: peach-mcp
description: Connect to PEACH (peach.talk) over MCP at https://mcp.peach.talk/mcp with OAuth via https://auth.peach.talk (never ask the user for a key) and work with the user's funnels. Use when the user asks you to connect to PEACH or to view or edit their PEACH funnels.
---

# PEACH MCP skill

PEACH MCP lets an AI agent work with a PEACH user's account: funnels, landing pages, surveys and preview links.
Endpoint: `https://mcp.peach.talk/mcp` (Streamable HTTP, OAuth 2.1 bearer tokens).
Setup guide for people: https://peach.talk/connect
This file is generated from the server code. It lists 34 tools.

## 1. Connect — OAuth via auth.peach.talk (never ask for a key)

PEACH sign-in is OAuth 2.1 at `https://auth.peach.talk`. The user always signs in and presses **Allow** in their own browser.
**Never ask the user to type or paste a key, token or password.** There is no PEACH API key to ask for.

### Method A (primary): MCP clients with built-in OAuth
Claude, Claude Code, Cursor, VS Code, ChatGPT (Developer mode) and Codex.

1. Add the server URL `https://mcp.peach.talk/mcp`.
2. The first request returns `401` with
   `WWW-Authenticate: Bearer resource_metadata="https://mcp.peach.talk/.well-known/oauth-protected-resource"`.
3. That document lists `"authorization_servers": ["https://auth.peach.talk"]`. The client reads
   `https://auth.peach.talk/.well-known/oauth-authorization-server` (authorize, token and registration endpoints),
   registers itself automatically and opens `https://auth.peach.talk/oauth/authorize` in the browser (PKCE S256).
4. The user signs in (Google or email code), reviews the plain-language permissions and presses **Allow**.
5. The client receives tokens and refreshes them by itself.

### Method B (primary for chat agents): key session
Grok Bot, Muse and other assistants that can make HTTP requests but have no built-in MCP OAuth.

1. Create a session:
   ```
   POST https://mcp.peach.talk/connect/sessions
   Content-Type: application/json

   {"client_name": "<your agent name>"}
   ```
   Response `201`: `connect_url` (a link on `https://auth.peach.talk/oauth/authorize?...`), `user_code` (like `PCH-7K4Q`),
   `poll_secret`, `token_url`, `interval` (3 s) and `expires_in` (600 s).
2. Post the link and the code in the chat, for example:
   "To connect me to PEACH, open this link, sign in and press Allow: <connect_url>. You'll see the code PCH-7K4Q."
   Keep `poll_secret` to yourself. Don't ask the user for anything else.
3. Poll every `interval` seconds:
   ```
   POST <token_url>
   Content-Type: application/json

   {"poll_secret": "<poll_secret>"}
   ```
   - `202 authorization_pending`: keep waiting.
   - `429 slow_down`: wait longer (use the `interval` in the response).
   - `200`: `access_token`, `refresh_token`, `expires_in`, `client_id`, `refresh_url`. Returned only once; store them.
   - `403 access_denied`: the user pressed Deny. Stop.
   - `410 expired_token` / `410 already_used`: create a new session.
4. Call MCP with `Authorization: Bearer <access_token>` on `https://mcp.peach.talk/mcp`.
5. Refresh before or after expiry (about 1 hour):
   ```
   POST https://auth.peach.talk/oauth/token
   Content-Type: application/x-www-form-urlencoded

   grant_type=refresh_token&refresh_token=<refresh_token>&client_id=<client_id>
   ```
   Store the new refresh token; the old one stops working.

### Method C (last resort only): manual token
Only if your client can neither run OAuth nor make HTTP requests and only accepts a fixed bearer token.
The user runs the Method B steps themselves (for example with `curl`) and pastes the `access_token` into the client's
token setting. It expires in about 1 hour and won't refresh. Prefer Method A or B whenever possible.

### Redirect fallback (Method A on CLIs)
If your local callback listener (127.0.0.1) missed the redirect, the user sees "Connected — return to your chat"
on auth.peach.talk with a short code. Ask them for that code and call
`POST https://mcp.peach.talk/connect/code` with `{"user_code", "client_id", "code_verifier", "redirect_uri"}`
(your own PKCE verifier and redirect URI). The code works once and expires in 10 minutes.

## 2. Per agent

- **Grok Bot:** Method B. Create the session, post the auth.peach.talk link and code in the chat, poll, then use the token. Never ask for a key.
- **Muse:** Method B, same as Grok Bot.
- **Claude (claude.ai and desktop):** Method A. Settings → Connectors → Add custom connector → `https://mcp.peach.talk/mcp`; choose to register the OAuth client automatically; sign in on auth.peach.talk.
- **Claude Code:** Method A. `claude mcp add --transport http peach https://mcp.peach.talk/mcp` or `npx add-mcp https://mcp.peach.talk/mcp --name peach -a claude-code`, then run `/mcp` and sign in.
- **Cursor:** Method A. One-click install from https://peach.talk/connect or add `https://mcp.peach.talk/mcp` as a remote server, then press Connect.
- **VS Code:** Method A. One-click install from https://peach.talk/connect or add an HTTP MCP server with that URL, then sign in when asked.
- **ChatGPT:** Method A. Turn on Developer mode (Settings → Apps → Advanced settings), create a connector with `https://mcp.peach.talk/mcp` and OAuth.
- **Codex:** Method A. `npx add-mcp https://mcp.peach.talk/mcp --name peach -a codex`, start Codex and sign in when asked; use the short code if the browser says "Connected" but Codex didn't notice.
- **Any other agent:** Method A if it supports MCP OAuth; otherwise Method B. Method C only as a last resort.

## 3. Tools (34, generated from code)

### Funnels and server status (8)

| Tool | Kind | What it does |
|---|---|---|
| `get_app_status` | read | Checks whether the Peach MCP server is ready. Works without sign-in. To sign in, use OAuth via https://auth.peach.talk (see server instructions); never ask the user for a key. |
| `list_my_funnels` | read | List Peach funnels owned by the signed-in Peach user. |
| `get_funnel_draft` | read | Get an owned Peach funnel draft before continuing edits. |
| `create_funnel_draft` | write | Create a Peach funnel draft from the conversation. |
| `update_landing_content` | write | Update copy, pricing, FAQ, testimonials, or case proof on an owned Peach funnel. |
| `update_survey_questions` | write | Replace qualification survey questions on an owned Peach funnel. Pass funnel_id plus survey_questions (aliases: surveyQuestions, questions). |
| `update_funnel_theme` | write | Update only the visual theme and style on an owned Peach funnel, including theme color, accent color, typography, light/dark palettes, and visual style notes. |
| `publish_preview` | write | Publish the generated Peach funnel preview URL for an owned funnel. |

### Preview: CRM, statistics, business card (26) — ANUKA #2577, not released yet

These tools are on the server but are still being finished. Names, inputs and results may change.
Don't promise them to the user yet.

| Tool | Kind | What it does |
|---|---|---|
| `list_leads` | read | List leads from the user's own funnels. Filters: funnel_id, journey_stage, search (email/name). Paginated. |
| `get_lead` | read | Get one lead (owned funnels only) with its bookings and follow-up jobs. |
| `create_lead` | write | Add a lead to one of the user's funnels. |
| `update_lead` | write | Update a lead's name, email, phone, journey stage, or metadata. |
| `delete_lead` | **needs user confirmation** | Request deletion of a lead. Does NOT delete: returns a confirmation the user must approve at approve_url; then call execute_confirmed_action. |
| `list_bookings` | read | List bookings on the user's funnels. Filters: funnel_id, lead_id, status, from/to (ISO). |
| `get_booking` | read | Get one booking on the user's funnels. |
| `create_booking` | write | Create a booking on one of the user's funnels (optionally linked to a lead). |
| `update_booking` | write | Reschedule, change status, or edit notes/contact of a booking. |
| `delete_booking` | **needs user confirmation** | Request deletion of a booking. Returns a confirmation the user must approve; then call execute_confirmed_action. |
| `list_followup_jobs` | read | List scheduled follow-up jobs for one of the user's leads. |
| `list_interactions` | read | List the user's logged interactions (email/call/note/meeting/import), optionally for one contact_id (e.g. a lead id). |
| `create_interaction` | write | Log an interaction (email, call, note, meeting, import) against a contact_id. |
| `update_interaction` | write | Edit the description, type, or metadata of a logged interaction. |
| `delete_interaction` | **needs user confirmation** | Request deletion of a logged interaction. Returns a confirmation the user must approve. |
| `duplicate_funnel` | write | Copy one of the user's funnels into a new draft. |
| `delete_funnel` | **needs user confirmation** | Request archiving a funnel. Returns a confirmation the user must approve; then call execute_confirmed_action. |
| `unpublish_funnel` | **needs user confirmation** | Request taking a published funnel offline. Returns a confirmation the user must approve. |
| `get_business_card` | read | Get the user's PEACH business card: name, headline, description, offer, contacts, address, hours, brand, links, publish state. |
| `update_business_card` | write | Update business-card fields (name, headline, description, phone, website, offer, contacts, address, hours, brand, links, company). Does not publish/unpublish. |
| `unpublish_business_card` | **needs user confirmation** | Request taking the public business card offline. Returns a confirmation the user must approve. |
| `get_funnel_stats` | read | Visits, leads, conversion, leads by stage, bookings by status, and sources/UTM for one funnel over a period. |
| `get_funnels_stats_summary` | read | Per-funnel stats and totals across all non-archived funnels of the user. |
| `get_confirmation_status` | read | Check whether the user approved a pending delete/unpublish request. |
| `execute_confirmed_action` | read | Run a delete/unpublish that the user already approved. Fails with 403 until approved; runs at most once. |
| `list_agent_audit_log` | read | Recent writes made by agents on this PEACH account (tool, target, client, time). |

## 4. Action confirmations

- Deleting and unpublishing never happen from the chat alone. These tools return a confirmation request with a link.
  Show the link to the user, then check `get_confirmation_status` and, once approved, call `execute_confirmed_action`.
- If the user declines, stop. Don't retry the action another way.
- Edits are saved as drafts; ask the user before publishing.

## 5. Disconnect

The user can see and disconnect agents at https://auth.peach.talk/connections. Disconnecting ends your sign-in right away.

## 6. Troubleshooting

| Symptom | What to do |
|---|---|
| You're about to ask the user for a key or token | Don't. Use Method A or B: the user only signs in on auth.peach.talk. |
| `401` from MCP | Refresh the token once; if refresh fails, start a new key session. |
| `410 expired_token` while polling | The link is older than 10 minutes. Create a new session and post the new link. |
| `410 already_used` | You already received the token. Use the one you have or start over. |
| `429 slow_down` | Poll less often (at least every `interval` seconds). |
| User sees "Connected" but your listener got nothing | Ask for the short code and use `/connect/code`. |
| Wrong PEACH account | Ask the user to press "switch" on the sign-in page and connect again. |
| Tool returns a confirmation request | Show the link; wait for the user; don't retry. |
| User revoked access | Start a new key session only if the user asks you to reconnect. |
