Skip to main content
Glama
ryanyang828

RespondThat MCP server

README.md
# RespondThat MCP server

An [MCP](https://modelcontextprotocol.io) server that lets any AI agent draft and
send customer-support email replies, read a merchant's brand knowledge base, list
connected mailboxes, and check credit balance — through the RespondThat API.

RespondThat is the pay-per-use AI for online sellers: it replies to customer
emails in your brand voice and answers calls 24/7, in English, Spanish,
Portuguese, French and German. No subscription.

## Tools

| Tool | Purpose |
|---|---|
| `draft_reply(thread_text, language="en")` | Draft an on-brand reply (not sent) |
| `send_reply(to, subject, text)` | Send through the merchant's mailbox (charges credits) |
| `list_mailboxes()` | List connected mailboxes |
| `list_brand_kb(language="all")` | Read policies / FAQ / tone |
| `check_balance()` | Credit balance + usage |

## Install (via skills.sh)

The package is published as a **public GitHub repo** and indexed by skills.sh
automatically — there is no `npx skills publish` command (skills.sh indexes
public repos, it does not take uploads):

```bash
npx skills add ryanyang828/respondthat-mcp
```

This drops the skill into your skills directory. Then point your MCP client at
the installed `server.py` (see "Configure" below). No skills.sh account is
required.

## Configure your API token

`server.py` reads two environment variables:

| Variable | Required | Default | Purpose |
|---|---|---|---|
| `RESPONDTHAT_API_TOKEN` | **yes** | — | Bearer token, format `rt_...` |
| `RESPONDTHAT_API_BASE` | no | `https://respondthat.com` | API base URL (override for self-host) |

### 1. Get a token

Log into the RespondThat app (https://respondthat.com), then either:
- open the **API tokens** page in the dashboard and click "Create", **or**
- call the API while logged in (cookie session):

```bash
curl -X POST https://respondthat.com/api/token \
  -H "Content-Type: application/json" \
  -H "Cookie: session=<your_app_cookie>" \
  -d '{"name":"my-agent"}'
# => {"token":"rt_xxxx","name":"my-agent","note":"Store this securely — it is shown only once."}
```

The token is shown **once** — copy it immediately. Revoke anytime via
`DELETE /api/token/{id}` or the dashboard.

### 2. Wire it into your MCP client

Most clients (Claude Desktop, Cursor, VS Code, custom) take an `mcpServers`
block. Put the token in **`env`** so the server process can read it — **do not
rely on a shell `export`**, because the client spawns the server in its own
environment and won't see your shell variables:

```json
{
  "mcpServers": {
    "respondthat": {
      "command": "python",
      "args": ["/abs/path/to/respondthat-mcp/server.py"],
      "env": {
        "RESPONDTHAT_API_TOKEN": "rt_xxxx"
      }
    }
  }
}
```

If you installed via `npx skills add`, replace the `args` path with the skill's
installed location (typically under `~/.skills/` or your configured skills root
— run `npx skills list` to find it).

**Verify the wiring:** ask your agent to call `check_balance()`. A successful
balance response (not an auth error) means the token is correct and reachable.

## Dependencies

```bash
pip install "mcp[cli]" httpx
```

## Notes

- `draft_reply` never sends — review the text before calling `send_reply`.
- `send_reply` sends a **real** email and charges pay-per-use credits
  ($0.20/email). Only call it after a human has approved the text.
- All tools require the merchant's mailbox to be connected in the app first.
- `RESPONDTHAT_API_TOKEN` is a secret. Keep it out of source control and never
  commit it.

## Related

- [ListingGood](https://listinggood.com) — AI Recommendation Engine for Amazon sellers. Makes your listings compliant and recommendable by Amazon's shopping agents and ChatGPT/Gemini catalog filters.