---
title: "Connect Replai to Claude Code, Codex, ChatGPT or another MCP client · Replai"
url: https://replai.tw/en/guide/connect-ai-agents
language: en
last_updated: 2026-10-18
publisher: "Replai · AIthentic LLC"
---

# Connect Replai to Claude Code, Codex, ChatGPT or another MCP client

Replai’s remote MCP server is https://api.replai.tw/mcp. Claude Code and Codex add it with one command; ChatGPT and other MCP clients use the URL. The first connection opens your browser to sign in, choose one Workspace and approve access, and you can revoke that access at any time.

## Before you start

You need a Replai account, an AI tool that supports remote MCP servers with OAuth sign-in, and a browser on the same computer to approve access. No API key or token is copied by hand.

- **Replai account:** sign in with Google at [replai.tw](https://replai.tw/en/). Replai creates a Workspace the first time you sign in.
- **AI tool:** Claude Code, Codex, ChatGPT or another client that connects to remote MCP servers over Streamable HTTP and signs in with OAuth.
- **Browser:** the first connection opens Replai in your browser, where you approve access.

## Connect Claude Code

Add Replai as a remote HTTP server, then authenticate it from inside Claude Code.

```
claude mcp add --transport http replai https://api.replai.tw/mcp
```

1. Run the command above in a terminal.
2. Start Claude Code and run /mcp, choose replai and select Authenticate.
3. Approve access in the browser window that opens, then return to Claude Code.

## Connect Codex

Add Replai by URL. Codex discovers Replai’s sign-in on its own, so no further settings are needed.

```
codex mcp add replai --url https://api.replai.tw/mcp
```

1. Run the command above in a terminal.
2. Approve access in the browser window that opens. If no window opens, run codex mcp login replai.
3. Start Codex and ask it to work in Replai.

## Connect ChatGPT or another MCP client

Any client that connects to remote MCP servers uses the same URL with OAuth authentication. In ChatGPT, remote MCP servers are added as apps in developer mode, where your plan and workspace admin allow it.

```
https://api.replai.tw/mcp
```

- **Transport:** Streamable HTTP.
- **Authentication:** OAuth. Replai publishes its sign-in details for clients to discover, accepts dynamic client registration and requires PKCE.
- **ChatGPT:** create an app with the URL above and choose OAuth as its authentication.

## What the first connection asks for

Your browser opens Replai and asks you to sign in with your Replai account. You then choose the one Workspace this AI tool can reach, review what it will be able to do and select Allow access. The browser returns you to the AI tool.

1. Sign in with Google, using the account you use for Replai.
2. Choose the Workspace the AI tool can access.
3. Review the permissions the AI tool asks for, then select Allow access.
4. Return to your AI tool. It can now use Replai’s tools in that Workspace.

Every connected AI tool can read your Agents, knowledge, tests, conversations and Workspace information. The tool may also ask to edit Agent drafts, create Agents, publish, manage knowledge sources, tests and channels, reply in the Inbox, manage linked engineering issues, connect external resources, update Workspace settings or remove Agents. Edits to an Agent stay in its draft until the Agent is published.

## Which tools Replai provides

The tools cover the whole setup path and daily support work: Agents and their drafts, knowledge, tests, publication, channels, the Inbox, engineering issues and analytics. Your AI tool reads the exact list from Replai when it connects.

**Replai MCP tools by area**

| Area | What your AI tool can do | Example tools |
| --- | --- | --- |
| Workspace and Agents | See the connected Workspace, list and create Agents, read and edit an Agent’s draft | connection_context, agents_list, agent_create, agent_draft_edit |
| Knowledge | Discover and import website pages, import Google Drive files and GitHub repositories, add text, refresh or withdraw sources | website_discover, website_import, source_add, source_refresh |
| Tests and gaps | Save questions as tests, run them, read results and review unanswered questions | test_case_create, test_case_run, knowledge_gaps_list |
| Publication | Review the exact candidate, publish it, pause, or restore an earlier version into the draft | publication_review, publication_publish, publication_restore |
| Channels | Turn on the website widget and read its install code, adjust widget and LINE group settings, check LINE health | widget_enable, widget_installation_read, line_behavior_edit |
| Inbox | Read conversations, reply, approve or reject drafts, take over, return to AI and resolve | inbox_list, inbox_reply, inbox_draft_approve, inbox_return_to_ai |
| Engineering | Propose and file Linear issues from conversations, record releases and track customer follow-ups | engineering_propose, engineering_approve, engineering_release_decide |
| Insights | Read Agent analytics, channel activity and usage | agent_analytics, agent_kpis_read, workspace_usage |

A few steps stay in the browser by design. Uploading a file from your computer, entering LINE channel credentials and connecting Google Drive, GitHub or Linear each return a Replai link for you to open; the AI tool then reads the result.

## Revoke access

Open Workspace settings → MCP & CLI. Under Connected, select Revoke access next to the tool. It loses access immediately.

1. In Replai, open Workspace settings → MCP & CLI.
2. Find the AI tool under Connected. Each entry shows its permissions and when its access expires.
3. Select Revoke access.

To also remove Replai from the AI tool, run claude mcp remove replai in Claude Code or codex mcp remove replai in Codex. Removing it there alone does not revoke the access in Replai.

## Use the Replai CLI instead

The Replai CLI runs the same setup, test, publication and Inbox work from a terminal, which suits coding agents that work through shell commands. Install it, then sign in once in the browser.

```
curl -fsSL https://replai.tw/install.sh | sh
```

1. Run the install command above.
2. Run replai login and approve access in the browser.
3. Run replai status to see the connected Workspace, and replai --help for the commands.

Commands cover Agents, drafts, knowledge sources, website import, the widget, tests, publication review and publishing, and the Inbox. Results print as JSON. Run replai logout to revoke the CLI’s access and remove its saved credentials.

[Troubleshooting: when the Agent does not reply or answers wrong](https://replai.tw/en/guide/troubleshooting)

## Keep reading

- [How Replai worksReplai answers customers from your product knowledge and hands off to a person when needed. Setup steps, answer settings and ways to improve answers.](https://replai.tw/en/guide/how-it-works)
- [Knowledge sourcesFiles, web pages, websites, Google Drive, GitHub repositories and text: what a Replai Agent can learn from, the limits of each source, and how to keep knowledge current.](https://replai.tw/en/guide/knowledge-sources)
- [ChannelsOne Agent answers on your website widget and a LINE Official Account, including group chats, with the same knowledge and handoff settings. Messenger and Instagram are in early access; WhatsApp status included.](https://replai.tw/en/guide/channels)

Replai · AIthentic LLC  Last updated October 18, 2026
