## TL;DR
An MCP client hitting `unrecognized client_id` is presenting an OAuth client id Supabase never issued for that project. Work through the checklist: confirm the config file the client actually reads, re-create the integration in the dashboard for a fresh id, paste it exactly, and restart the client fully.

```text
supabase mcp unrecognized client_id
```

## Use this when
- The MCP client fails with unrecognized client_id on every launch
- You followed a setup guide and it never worked
- It broke after dashboard cleanup or project transfer

## Not for this skill when
- The MCP server binary wont start at all (thats install/transport)
- The project ref or URL is wrong (thats a different error)
- Auth worked before and now sessions expire (thats refresh, not identity)

## Steps

1. Find which config file your client actually reads. IDEs each keep their own:

```bash
ls ~/.config/*/mcp.json ~/Library/Application\ Support/*/mcp.json
```
Expected output: one or more mcp.json paths. Edit the one belonging to the client that fails, not a sibling client's file.

2. Validate the JSON before touching values:

```bash
python -m json.tool /path/to/mcp.json
```
Expected output: the formatted JSON prints with no error. A broken file makes the client ignore the whole Supabase entry, which can surface as identity errors.

3. Re-create the Supabase integration to mint a current client id, then replace the value character-for-character:

```text
Dashboard > Project Settings > Integrations > create the integration again
```
Expected output: a fresh client id. Ids copied from docs, videos, or old issues were never valid for your project.

4. Restart the client completely and watch the MCP startup log:

```bash
# quit the app (not just the window), reopen, check MCP/tool panel
```
Expected output: Supabase tools listed, no client_id error. MCP config loads once at startup, so restarts are mandatory after edits.

## Variant phrasings

### unrecognized client_id after project restore
Restored or transferred projects invalidate old integrations. Re-create them; the id doesnt survive the move.

### works in one IDE, fails in another
Each IDE has its own mcp.json. The working one has the good id; copy it (or better, create per-client integrations).

## Why it happens
Supabase's OAuth registry is per-project and per-integration. Anything that breaks that link (deleted integration, new project, copied doc value, trailing whitespace from a sloppy paste) produces the same message. MCP clients surface it at startup because they validate the connection before listing tools.

## Edge cases
- Some clients cache OAuth grants; after fixing the id you may need to clear the client's stored grant to force a fresh flow.
- If two tools share one integration's id and you rotate it, both break; prefer one integration per tool.
- A client id with a trailing newline pasted into JSON is still valid JSON but an invalid id; strip whitespace on paste.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_m7MiCItPna49mqfEPvoz-g
