# Claude and ChatGPT

> Add Graft to Claude.ai or ChatGPT as a custom connector with one URL. The product finds Graft's sign-in, you consent once in the console, and the consent creates the agent the connection will be.

Source: https://docs.getgraft.ai/graft/harnesses/claude-and-chatgpt

Claude.ai and ChatGPT connect to Graft with one URL and no token. Paste `https://app.getgraft.ai/mcp` (or your self-hosted origin plus `/mcp`) as a custom connector, and the product discovers Graft's own sign-in from the endpoint, registers itself, and sends you to the console. There you see which product is asking and you create the agent the connection will be, named for the product, with the connections it may use. From then on every call the product makes is that agent's: its scope, its working set, its approvals, its history.

This is the same Graft as Hermes and OpenClaw connect to. The difference is how the product proves who it is: a chat product has a browser to send you to and no config file to hold a token, so it uses OAuth; a harness on a server has a config file and no browser, so it carries a [static token](https://docs.getgraft.ai/graft/harnesses/any-mcp-client.md). Both end at one agent each.

## What you need

- A Graft account. If you do not have one, the consent step offers **Create an account** and brings you straight back.
- On Claude.ai, a plan with custom connectors: Pro, Max, Team or Enterprise at the time of writing. On a Team or Enterprise plan, an owner adds the connector for the organisation.
- On ChatGPT, a plan with connectors and **Developer mode** turned on: Plus, Pro, Team, Enterprise or Edu at the time of writing. In a workspace, an admin has to allow connectors first.
- The URL: `https://app.getgraft.ai/mcp` for Graft Cloud, or your deployment's public origin plus `/mcp`. It has to be `https` unless it is `localhost`; both products refuse a plain `http` server elsewhere.

## Claude.ai

### Step 1: Add the connector

Open **Customize → Connectors** and choose **+ → Add custom connector** (older interfaces keep Connectors under **Settings**). Give it a name (`Graft`) and paste the URL into **Remote MCP server URL**. Leave the OAuth client id and secret under **Advanced settings** empty: Graft registers Claude as a client itself, so there is nothing to fill in. Choose **Add**.

### Step 2: Connect

On the new connector, choose **Connect**. Claude opens Graft in a new window. Sign in if you are not already, or create an account; either way you land on the consent page.

### Step 3: Consent, and name the agent

The page reads **Connect Claude to Graft** and shows where Claude will be sent back (`claude.ai`). Under **Connect as**, keep **A new agent**, keep or change the **Name**, and under **Scope** tick the connections this agent may use. You can change both later on the agent's page. Or pick an agent you already have from the same list; its scope, working set and approvals then apply as they are. Choose **Connect**. The window returns to Claude and the connector shows as connected.

### Step 4: Use it in a chat

In a conversation, open the tools menu (the **+** or **Search and tools** control under the message box) and turn the Graft connector on. Graft's meta-tools appear beside Claude's own; an authored tool appears as `<vendor>__<name>` once it is promoted. A tool promoted during a conversation is not offered until the next one; see [Tools mid-conversation](#tools-mid-conversation). When a tool needs your approval, Graft asks once per agent, as a card in the chat: the build approval, a keyless connection, and a connection another agent of yours already holds are answered on the card, and a card you dismiss falls back to a link into the console, where you answer under **Pending actions**. A secret is never asked for in the chat; the card sends you to the console for it.

Claude's redirect address is one it registers with Graft when it connects, and the consent page shows its host, so nothing else can claim to be Claude.

## ChatGPT

### Step 1: Turn on Developer mode

Open **Settings → Connectors**, then **Advanced settings**, and turn on **Developer mode**. This is what lets you add a connector that is not in OpenAI's directory. Team, Enterprise and Edu workspaces need an admin to have allowed it.

### Step 2: Create the connector

Back on **Connectors**, choose **Create**. Give it a name (`Graft`) and a short description, paste the URL into **MCP Server URL**, and under **Authentication** choose **OAuth**. Leave the client id and secret empty for the same reason as on Claude. Tick the acknowledgement that you trust the server and choose **Create**.

### Step 3: Consent, and name the agent

ChatGPT sends you to Graft. Sign in or create an account, and the consent page reads **Connect ChatGPT to Graft**, showing `chatgpt.com` as where you will be sent back. Keep **A new agent** or pick an existing one, set the name and the scope, and choose **Connect**. You return to ChatGPT with the connector connected.

### Step 4: Use it in a chat

In a conversation, open the tools menu under the message box, choose **Developer mode**, and select the Graft connector. ChatGPT asks before it runs a write tool; Graft asks too, once per agent, as the same card in the chat, with the console link as the fallback.

Menu names and plan requirements are the products' own and move; when one has, the [GitHub issues](https://github.com/getmodern-ai/graft/issues) are where to say.

## Tools mid-conversation

Claude.ai reads Graft's tool list when a conversation starts and does not pick up `tools/list_changed` in the middle of one. A tool that `acquire` promotes during a chat, and the `execute__<connection id>` tool of a connection made during a chat, are offered from the next conversation on.

In the current conversation the agent reaches them through `run_tool`, the meta-tool that runs any tool in the toolbox by vendor and name. `acquire_status` reports the new tool's name when the job succeeds and says to call it through `run_tool` until the list has it, so nothing is lost by staying in the chat; the next conversation shows the tool first-class, with its own input schema.

## What the product does, and what Graft does

The product never sees a Graft token you typed. It asks the endpoint without one, is refused with a header that names Graft's metadata, reads that metadata to find the sign-in, registers itself, and opens the consent page in your browser with a one-time challenge. When you connect, Graft hands the product a code, the product trades it for an access token and a refresh token, and every later request carries the access token. The access token lasts an hour and the product renews it with the refresh token on its own, for as long as the agent lives; each renewal retires the old refresh token, so a stolen one is worth nothing once the product has moved on. None of this needs you after the consent.

The agent the consent created shows in **Agents** with the product's name in the Harnesses column and **OAuth** in the Token column: it has no token to copy because the product holds the tokens. **Connect a harness** on its page gives the MCP URL and says to choose this agent under **Connect as** at the product's consent, where a Hermes agent's setup shows where its token goes.

## Disconnecting

**Revoke agent** on the agent's page ends the connection at once: the product's next call is refused, its attempt to renew is refused, and it asks you to connect again. Connecting again is a new consent and, unless you pick the same agent, a new agent; the old one keeps its working set and history as your records.

Disconnecting from the product's side (removing the connector in Claude or ChatGPT) tells Graft nothing. The agent stays active with tokens nobody will present again; revoke it in the console when you are done with it.

## Connecting the same product twice

Each connector you add is its own registration with Graft, and each consent is its own agent, so Graft in two Claude workspaces is two agents over one toolbox, exactly as two Hermes installs would be. If you want two products to share one agent, choose the existing agent on the second consent.

## Prompts to try

```text
Which connections are you allowed to use right now?
```

```text
Find a tool that lists my open pull requests, and if there is none, acquire one.
```

```text
Show me your working set and demote the tools you do not need for this.
```

## Where next

- [Any MCP client](https://docs.getgraft.ai/graft/harnesses/any-mcp-client.md): The two doors in protocol terms: the OAuth path this page uses and the static bearer path Hermes uses.
- [Agents](https://docs.getgraft.ai/graft/console/agents.md): What the agent's page shows for a connected product, and how to revoke it.
