> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Response ChatGPT App Guide

> Step-by-step setup for ChatGPT Developer Mode.

# Response ChatGPT App

Runs the StateSet Response workspace **inside ChatGPT** — a React widget rendered by ChatGPT Apps,
backed by a Node MCP server that exposes the `stateset-response-chat` tool.

| Piece        | Role                                      |
| ------------ | ----------------------------------------- |
| React widget | The workspace UI, rendered in ChatGPT     |
| MCP server   | Exposes `stateset-response-chat` over SSE |
| Connector    | Registered in ChatGPT Developer Mode      |

This guide builds the widget, runs the server, and connects it.

<Note>
  ChatGPT reaches the MCP server over **SSE**, so the endpoint has to be publicly resolvable — a
  localhost URL won't work. Step 3 covers exposing it.
</Note>

## 1) Build the widget assets

```bash theme={null}
git clone https://github.com/stateset/stateset-response-chatgpt-app.git
cd stateset-response-chatgpt-app
pnpm install
pnpm run build
```

The build emits `stateset-response.html/js/css` inside `assets/`.

## 2) Run the MCP server

```bash theme={null}
cd server
pnpm install
STATESET_API_BASE_URL=https://api.stateset.com \
STATESET_API_KEY=sk-... \
pnpm start
```

Without credentials, the server uses sample data for local testing.

## 3) Expose the MCP server

Use a tunnel to expose the SSE endpoint:

```bash theme={null}
ngrok http 3030
```

The endpoint becomes `<public-url>/mcp`.

## 4) Add the connector in ChatGPT

1. Open ChatGPT → **Settings → Developer Mode → Connectors**.
2. Click **Add connector**, choose **MCP via SSE**.
3. Name it `Stateset Response`.
4. Paste `<public-url>/mcp` as the endpoint.
5. Save and confirm the connector is online.

## 5) Test the app

```text theme={null}
@Stateset Response open the customer support workspace for org 1234.
```

## Troubleshooting

* Re-run `pnpm run build` if assets are missing.
* Verify the tunnel is reachable and SSE is stable.
* Confirm API credentials when using live data.

## Related Documentation

* App README
