# ChatGPT Custom GPT — Hermes MCP Setup Guide

**Server:** `https://hermes.squaremcp.com`

---

## What you'll build

A Custom GPT in ChatGPT that can:
- Send emails via your 7 accounts
- Search and edit your Obsidian vault notes
- Send WhatsApp messages (when credentialed)
- Post to LinkedIn
- Send Telegram messages
- Post to Discord servers
- Post to Instagram (when credentialed)

---

## Step 1: Register an OAuth client

Hermes MCP uses OAuth 2.0 for ChatGPT authentication.

Run this curl to register a ChatGPT client:

```bash
curl -X POST "https://hermes.squaremcp.com/oauth/register" \
  -H "Content-Type: application/json" \
  -d '{
    "client_name": "ChatGPT Custom GPT",
    "redirect_uris": ["https://chat.openai.com/aip/[YOUR_GPT_ID]/oauth/callback"]
  }'
```

**Save the response:**
- `client_id`
- `client_secret`

---

## Step 2: Get the OpenAPI schema

Your server's OpenAPI spec is live at:

```
https://hermes.squaremcp.com/openapi.json
```

ChatGPT will import this to know which endpoints are available.

---

## Step 3: Create the Custom GPT

1. Go to [chatgpt.com](https://chatgpt.com) → **Explore GPTs** → **Create**
2. Configure:
   - **Name:** `Hermes Assistant`
   - **Description:** `Your personal AI assistant with access to email, notes, and social media`

### Actions setup

3. Click **Actions** → **Import from URL**
4. Paste: `https://hermes.squaremcp.com/openapi.json`
5. Click **Authentication** → **OAuth**
   - **Client ID:** (from Step 1)
   - **Client Secret:** (from Step 1)
   - **Authorization URL:** `https://hermes.squaremcp.com/oauth/authorize`
   - **Token URL:** `https://hermes.squaremcp.com/oauth/token`
   - **Scope:** `email profile`
   - **Token Exchange Method:** `Default (POST request)`

6. Click **Update** to save the OAuth config

### Privacy settings

7. Scroll to **Privacy** → toggle off if you don't want OpenAI training on your data

---

## Step 4: Test the GPT

Ask your GPT:
- "Send an email to team@fetcherpay.com saying the meeting is at 2pm"
- "Search my Obsidian notes for 'funding strategy'"
- "Post 'Hello world' to my LinkedIn"
- "Send a Telegram message to Garfield"

---

## Troubleshooting

| Issue | Fix |
|-------|-----|
| "Authentication failed" | Re-register the OAuth client with the correct redirect URI |
| "Tool not found" | Check that the endpoint is listed in `/openapi.json` |
| "Unauthorized" | The GPT's token expired — re-authenticate in ChatGPT settings |

---

## Current tool availability

| Tool | Status |
|------|--------|
| Email (7 accounts) | ✅ Ready |
| Obsidian vault | ✅ Ready |
| LinkedIn profile/posts | ✅ Ready (token deployed) |
| Telegram messaging | ✅ Ready (token deployed) |
| Discord messaging | ⚠️ Needs bot token |
| Instagram posts | ⚠️ Needs Business Account setup |
| WhatsApp messaging | ⚠️ Needs Cloud API number |

---

## Next: Discord bot token

If you want Discord working in ChatGPT too, create a bot:
1. [discord.com/developers/applications](https://discord.com/developers/applications) → New Application
2. Bot tab → Copy Token
3. Deploy: `kubectl set env deployment/hermes-mcp -n fetcherpay DISCORD_DEFAULT_BOT_TOKEN="your-token"`
