---
title: Connect with OAuth sign-in
description: Add openmemory to an app that signs in with OAuth (ChatGPT, claude.ai, Claude Desktop, Claude Code, Cursor, Grok) without copying a key. You sign in to your openmemory account and pick the memory; the app gets its own member there.
---

<!--
Verified November 2026 against:
- https://claude.com/docs/connectors/custom/add-unlisted.md
- https://claude.com/docs/connectors/building/authentication.md
- https://code.claude.com/docs/en/mcp
- https://cursor.com/docs/context/mcp
- https://developers.openai.com/plugins/build/plugins.md
- https://docs.x.ai/grok/connectors
-->

Apps that support OAuth for MCP can connect to openmemory with a sign-in page instead of a key. You never copy a key, the app renews its access by itself, and it joins your memory as a member of its own, so everything it writes is signed with its name.

The sign-in page asks you to sign in to your [openmemory account](/docs/accounts) (or create one), then which of your memories the app may use. Every app you connect this way can land in the same memory.

## Connect

Add `https://mcp.openmemory.sh` as a remote MCP server in the app and leave every authentication field empty: no header, no client ID, no client secret. The app finds the sign-in page by itself and opens it.

| App | Where |
| --- | --- |
| claude.ai, Claude Desktop | **Customize > Connectors > Add custom connector**, URL `https://mcp.openmemory.sh`, then **Add**. On Team and Enterprise plans an Owner adds it under **Organization settings > Connectors**, and each person clicks **Connect**. |
| Claude Code | `claude mcp add --transport http openmemory https://mcp.openmemory.sh`, then `/mcp` in a session (or `claude mcp login openmemory`). |
| Cursor | Add `{ "url": "https://mcp.openmemory.sh" }` under `mcpServers` in `mcp.json`, without `headers`. Cursor signs in when it connects. |
| ChatGPT | [ChatGPT Plugins](https://chatgpt.com/plugins) > plus button > **Add custom MCP server**, URL `https://mcp.openmemory.sh`. Or install the [openmemory plugin](/docs/guides/chatgpt#option-b-the-openmemory-plugin). |
| Grok | [grok.com/connectors](https://grok.com/connectors) > **New Connector** > **Custom**, URL `https://mcp.openmemory.sh`. |

As with a key, the URL takes `?tools=`: in chat apps (claude.ai, Claude Desktop, ChatGPT, Grok), use `https://mcp.openmemory.sh?tools=chat` to list the twelve tools a person needs there, including import, activity, and usage. Use `?tools=all` to list every tool ([which tools are listed](/docs/mcp-tools#which-tools-are-listed)).

## The sign-in page

The page shows which app is asking and where its access will go. Sign in with your email and password, or create an account. Then choose:

- **One of your memories.** Listed with the apps already in each, most recently used first. The app joins it with your role there.
- **Start a new memory.** A new memory in your account, with the app in it.
- **Add a memory I already have.** For a memory not in your account yet (made before accounts, or one you were invited to). Paste one of:
  - an **invite code** (`omi_...`). Ask any agent already connected to make one with `invite_create`. You and the app join with the invite's role.
  - an **owner key** (`om_...`). You and the app join as owners. A member's key is refused.
  - the memory's **recovery code** (`omr_...`). You and the app join as owners, the code is replaced, and the new one is shown once.

  The memory is added to your account, so next time it's in the list.

Nothing you paste is stored. A typo shows an error; go back and try again within ten minutes.

If the app publishes a [Client ID Metadata Document](https://datatracker.ietf.org/doc/draft-ietf-oauth-client-id-metadata-document/) (Claude does), the page names the domain that vouches for it. Apps that registered themselves are marked as not verified. If access goes to `localhost`, the page warns you: continue only if you just started connecting from an app on your computer.

## What the app gets

- **Its own member**, named after the app (`claude`, `cursor`, ...; `-2` is added if the name is taken). [`member_list`](/docs/sharing#see-which-app-each-member-uses) shows it with `oauth.client_id`, and `oauth.domain` when the app is verified.
- **An access token for an hour, and a refresh token.** The app refreshes on its own. The connection lasts while the app uses it, and ends after 90 days without use, the same as an unused space.
- **The rights of its role.** There is one scope, `memory`. What a member may do is decided by its role, as for any member.

Tokens work only for MCP at `https://mcp.openmemory.sh`. The REST API takes keys.

## Disconnect an app

Remove its member, from any owner:

```bash
curl -s -X DELETE https://api.openmemory.sh/v1/space/members/mb_... -H "Authorization: Bearer $OPENMEMORY_KEY"
```

Or ask a connected agent to call `member_remove`. The app's tokens stop working at once. What it wrote stays, signed with its name. Connecting the app again creates a new member.

## How it works

- Discovery follows the MCP authorization spec: a request without a token gets `401` with `WWW-Authenticate: Bearer resource_metadata="..."`, pointing at `https://mcp.openmemory.sh/.well-known/oauth-protected-resource`. That names the authorization server, `https://mcp.openmemory.sh`, whose metadata is at `/.well-known/oauth-authorization-server`.
- Endpoints: `/authorize` (the sign-in page), `/oauth/token` (tokens and revocation), `/oauth/register` (dynamic client registration). PKCE with `S256` is required.
- The protocol is handled by Cloudflare's [workers-oauth-provider](https://github.com/cloudflare/workers-oauth-provider). Tokens are stored only as hashes. The app's member key travels inside its tokens, encrypted with a key only the token can unwrap, so the stored data alone opens nothing.
- Starting a new memory on the sign-in page counts toward the limit on new spaces per IP address, and pasted codes toward the limit on codes tried. See [Limits](/docs/limits).

## Related

- [Keys and recovery](/docs/keys-and-recovery)
- [Share a memory box](/docs/sharing)
- [Claude Desktop and claude.ai](/docs/guides/claude-desktop)
- [ChatGPT](/docs/guides/chatgpt)
- [Grok](/docs/guides/grok)
- [Other MCP clients](/docs/guides/mcp-clients)
