Supabase MCP & Claude Code
Is there any issue with supabase mcp server? I’m trying to connect it to my claude code and every time I get the error that is not connected
111 Replies
did you solve this one mate?
Yes
What was the trick?
I'm still battling...
are you on windows?
This is what I used
Yes
Tell me if it works for you
nope 😦
You want to set it as project scope or local?
I think project? Cloud? Is that what you mean?
I mean you want to you supabase mcp server only for your current project or for all projects?
is there an issue doing for all projects?
I only have 1 project currently... except I am trying to get the mcp setup in a standalone clean project to try and make it work
I have anther mcp in the same project working well, but can't get the supabase one to work

and I'm using the access token from o/dashboard/account/tokens
For project-ref what do you use?
The Project ID from the General/Project Settings page
Ok. Did you try to generate a new token?
Yep I did
I'll even do it again now just to be sure!
Also when you changed the mcp json file you exited claude code and then run it again?
yep, using the "exit" command
just to check, the PAT from https://supabase.com/dashboard/account/tokens
Access Tokens | Supabase
Supabase Studio
Ok send me the error you get
all of my PATs are sbp_***
Yes is correct
Change your pat one more time, update the mcp json file, exit claude code and run it again in project directory (where you store .mcp.json file) and send me the error

Why it says Supabase MCP Server?
You change the value after mcpServers?
Exit claude code and in your terminal run the command ‘claude mcp list’
supabase: npx -y @supabase/mcp-server-supabase@latest --read-only --project-ref=qcjufilyvouznpqkddho --access-token=
task-master-ai: C:\Program Files\nodejs\node.exe C:\Users\samro\AppData\Roaming\npm\node_modules\task-master-ai\mcp-server\server.js
You remove the access token correct? Is not empty in the actual file right?
🤣
haha
it's a good question
in the file I can see it, but am surprised it's smart enough to exclude on its own
maybe I've written it in wrong in the file
It should be there inside the file

Add another argument “-y”
Before @supabase/mcp…..
yep
supabase: npx -y @supabase/mcp-server-supabase@latest --read-only --project-ref=qcjufilyvouznpqkddho --access-token=
task-master-ai: C:\Program Files\nodejs\node.exe C:\Users\samro\AppData\Roaming\npm\node_modules\task-master-ai\mcp-server\server.js
I did have that before

Bro send me the file without your PAT
Its weird that access token is remove by itself
why not do it with an env per docs?
It should be there
is it there why you run the command?
It didnt work on my end but you are open to try:)
Ive tried everything!
Send me your .mcp.json file here without the Access Token in it
you might see my task master mcp, that was also hard to get going! I'm forcing it to look at the directory
I will have a look to your file and see where is the issue because its very weird
I've tried without the task master mcp too and it doesn't improve it
You are on windows correct?
correct
And you are using WSL?
no I'm using Cursor
I speak about your terminal
ahhhh
I'm using node I think
I didn't realise I could use different ones
I can try in wsl
wait
Send me a screenshot of your terminal you are using

I tried in wsl and it didn't work either
copy paste this new file
Adjust your PATs and try again
still not working
however
If you add it like this you have to remove " = "
i got this version to say "connecting" when I ran it in WSL before
after --access-token
"--access-token=" to "--access-token"
yep thanks
try it
nope 😦
but it shows PAT in claude code?
yep
if I run claude mcp list in terminal I can now see the PAT
Ok this is a good sign
we are making progress 😄
wwhhhyyyy does it have to be so hard
thanks for your help
now revert back to your previous values
command: npx
and remove /c, npx from args
so, if I got back to wsl and change the command back to npx, I get this now

oh haha
it just failed
ignore me
yep did this

{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server-supabase@latest",
"--access-token",
"123faketoken"
]
}
}
}
copy paste this code
and see if its working
without changing anything

how is that possible? in your file you didnt mention project-ref and in the terminal there is a project-ref
true
wtf
kill the terminal and open a new one
still happening...
For my projects I am using WSL and its different from yours but I have tried now with your settings and its working
replace <personal-access-token>
put the file in your project directory root

wtf

not even showing the task master one mcp now
click on it and send me a screeshot
haha

For some reason it format it in wrong way
-y and the rest should be in "args" and not in command
I'm going to try in powershell outside of curosr

huh
is that wsl?
No
PowerShell
Like your settings
in Cursor?
yes
wtf
why man why
Im not sure what are you doing to be honest 😄
could it be node settings?
or something in the node or npm install?
do you have node and npm installed?
yep definitely
indeed.. so not an issue with these
ok small problem now... can't run claude

the file name must be .mcp.json and stored in your project root
do I have to install or initaite everytime?
how did you install claude code?
no. only once and then just run claude command
I've exited cursor and opened and now can't run CC commands
use this "npm install -g @anthropic-ai/claude-code"

wtf
I sent you pm