Demo, all content is generated
Question

Supabase MCP shows 'failed' in /mcp and I can't see why

Solved · 151 views · asked by lucy_hart · edited

Followed a tutorial to add the Supabase MCP server so Claude can look at my tables. In /mcp it's listed but with a red failed. No other info. I'm on a Mac, node installed with nvm.

claude mcp add supabase -- npx -y @supabase/mcp-server-supabase@latest --project-ref=abcd1234
What I’ve tried

Removed and added it again, restarted Claude Code, ran the npx command alone in the terminal (it just sits there, which I think is normal?).

Comment
Run claude mcp list in a normal terminal, does it show a connection error there? jb_supa · edited
It says 'Failed to connect', nothing more. lucy_hart · edited

2 answers

Marked as helpful by the asker
jb_supa · edited

It sitting there when run alone is normal, it's waiting for input on stdin.

What's missing is the access token. The server needs a personal access token (Supabase dashboard > Account > Access Tokens), passed as env:

claude mcp remove supabase
claude mcp add supabase -e SUPABASE_ACCESS_TOKEN=sbp_xxx -- npx -y @supabase/mcp-server-supabase@latest --read-only --project-ref=abcd1234

Note --read-only. Keep it on unless you really want Claude running writes against your database.

To see the real error next time, start with claude --debug; MCP startup errors are printed there.

Comment
Token was it. It lists my tables now. Keeping read-only on, promise. lucy_hart · edited
And point it at a dev project, not prod, if you have one. Read-only still means it can read your users table. chidi_eze · edited
tom_brewer · edited

For the nvm part: if a server ever fails with no output, check which npx in the same shell you start claude from. GUI-launched terminals sometimes don't load nvm and the server can't find node.

Comment
Good to know for later, npx was found in my case. lucy_hart · edited