S
Supabase2mo ago
dzek

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
cazza
cazza2mo ago
did you solve this one mate?
dzek
dzekOP2mo ago
Yes
cazza
cazza2mo ago
What was the trick? I'm still battling...
dzek
dzekOP2mo ago
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server-supabase@latest",
"--read-only",
"--project-ref=<your-project-ref>",
"--access-token=<your-access-token>"
]
}
}
}
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server-supabase@latest",
"--read-only",
"--project-ref=<your-project-ref>",
"--access-token=<your-access-token>"
]
}
}
}
cazza
cazza2mo ago
are you on windows?
dzek
dzekOP2mo ago
This is what I used Yes Tell me if it works for you
cazza
cazza2mo ago
nope 😦
dzek
dzekOP2mo ago
You want to set it as project scope or local?
cazza
cazza2mo ago
I think project? Cloud? Is that what you mean?
dzek
dzekOP2mo ago
I mean you want to you supabase mcp server only for your current project or for all projects?
cazza
cazza2mo ago
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
cazza
cazza2mo ago
No description
cazza
cazza2mo ago
and I'm using the access token from o/dashboard/account/tokens
dzek
dzekOP2mo ago
For project-ref what do you use?
cazza
cazza2mo ago
The Project ID from the General/Project Settings page
dzek
dzekOP2mo ago
Ok. Did you try to generate a new token?
cazza
cazza2mo ago
Yep I did I'll even do it again now just to be sure!
dzek
dzekOP2mo ago
Also when you changed the mcp json file you exited claude code and then run it again?
cazza
cazza2mo ago
yep, using the "exit" command
cazza
cazza2mo ago
dzek
dzekOP2mo ago
Ok send me the error you get
cazza
cazza2mo ago
all of my PATs are sbp_***
dzek
dzekOP2mo ago
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
cazza
cazza2mo ago
No description
dzek
dzekOP2mo ago
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’
cazza
cazza2mo ago
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
dzek
dzekOP2mo ago
You remove the access token correct? Is not empty in the actual file right? 🤣
cazza
cazza2mo ago
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
dzek
dzekOP2mo ago
It should be there inside the file
cazza
cazza2mo ago
No description
dzek
dzekOP2mo ago
Add another argument “-y” Before @supabase/mcp…..
cazza
cazza2mo ago
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
cazza
cazza2mo ago
No description
dzek
dzekOP2mo ago
Bro send me the file without your PAT Its weird that access token is remove by itself
cazza
cazza2mo ago
why not do it with an env per docs?
dzek
dzekOP2mo ago
It should be there
cazza
cazza2mo ago
is it there why you run the command?
dzek
dzekOP2mo ago
It didnt work on my end but you are open to try:)
cazza
cazza2mo ago
Ive tried everything!
dzek
dzekOP2mo ago
Send me your .mcp.json file here without the Access Token in it
cazza
cazza2mo ago
you might see my task master mcp, that was also hard to get going! I'm forcing it to look at the directory
dzek
dzekOP2mo ago
I will have a look to your file and see where is the issue because its very weird
cazza
cazza2mo ago
cazza
cazza2mo ago
I've tried without the task master mcp too and it doesn't improve it
dzek
dzekOP2mo ago
You are on windows correct?
cazza
cazza2mo ago
correct
dzek
dzekOP2mo ago
And you are using WSL?
cazza
cazza2mo ago
no I'm using Cursor
dzek
dzekOP2mo ago
I speak about your terminal
cazza
cazza2mo ago
ahhhh I'm using node I think I didn't realise I could use different ones I can try in wsl
dzek
dzekOP2mo ago
wait Send me a screenshot of your terminal you are using
cazza
cazza2mo ago
No description
cazza
cazza2mo ago
I tried in wsl and it didn't work either
dzek
dzekOP2mo ago
dzek
dzekOP2mo ago
copy paste this new file Adjust your PATs and try again
cazza
cazza2mo ago
still not working however
cazza
cazza2mo ago
if I do the PAT like this it does show
dzek
dzekOP2mo ago
If you add it like this you have to remove " = "
cazza
cazza2mo ago
i got this version to say "connecting" when I ran it in WSL before
dzek
dzekOP2mo ago
after --access-token "--access-token=" to "--access-token"
cazza
cazza2mo ago
yep thanks
dzek
dzekOP2mo ago
try it
cazza
cazza2mo ago
nope 😦
dzek
dzekOP2mo ago
but it shows PAT in claude code?
cazza
cazza2mo ago
yep if I run claude mcp list in terminal I can now see the PAT
dzek
dzekOP2mo ago
Ok this is a good sign we are making progress 😄
cazza
cazza2mo ago
wwhhhyyyy does it have to be so hard thanks for your help
dzek
dzekOP2mo ago
now revert back to your previous values command: npx and remove /c, npx from args
cazza
cazza2mo ago
so, if I got back to wsl and change the command back to npx, I get this now
No description
cazza
cazza2mo ago
oh haha it just failed ignore me yep did this
cazza
cazza2mo ago
No description
dzek
dzekOP2mo ago
{ "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
cazza
cazza2mo ago
No description
cazza
cazza2mo ago
No description
dzek
dzekOP2mo ago
how is that possible? in your file you didnt mention project-ref and in the terminal there is a project-ref
cazza
cazza2mo ago
true wtf
dzek
dzekOP2mo ago
kill the terminal and open a new one
cazza
cazza2mo ago
still happening...
dzek
dzekOP2mo ago
For my projects I am using WSL and its different from yours but I have tried now with your settings and its working
dzek
dzekOP2mo ago
dzek
dzekOP2mo ago
replace <personal-access-token> put the file in your project directory root
dzek
dzekOP2mo ago
No description
cazza
cazza2mo ago
wtf
cazza
cazza2mo ago
No description
cazza
cazza2mo ago
not even showing the task master one mcp now
dzek
dzekOP2mo ago
click on it and send me a screeshot
cazza
cazza2mo ago
haha
cazza
cazza2mo ago
No description
dzek
dzekOP2mo ago
For some reason it format it in wrong way -y and the rest should be in "args" and not in command
cazza
cazza2mo ago
I'm going to try in powershell outside of curosr
dzek
dzekOP2mo ago
No description
cazza
cazza2mo ago
huh is that wsl?
dzek
dzekOP2mo ago
No PowerShell Like your settings
cazza
cazza2mo ago
in Cursor?
dzek
dzekOP2mo ago
yes
cazza
cazza2mo ago
wtf why man why
dzek
dzekOP2mo ago
Im not sure what are you doing to be honest 😄
cazza
cazza2mo ago
could it be node settings? or something in the node or npm install?
dzek
dzekOP2mo ago
do you have node and npm installed?
cazza
cazza2mo ago
yep definitely
dzek
dzekOP2mo ago
indeed.. so not an issue with these
cazza
cazza2mo ago
ok small problem now... can't run claude
cazza
cazza2mo ago
No description
dzek
dzekOP2mo ago
the file name must be .mcp.json and stored in your project root
cazza
cazza2mo ago
do I have to install or initaite everytime?
dzek
dzekOP2mo ago
how did you install claude code? no. only once and then just run claude command
cazza
cazza2mo ago
I've exited cursor and opened and now can't run CC commands
dzek
dzekOP2mo ago
use this "npm install -g @anthropic-ai/claude-code"
cazza
cazza2mo ago
No description
cazza
cazza2mo ago
wtf
dzek
dzekOP2mo ago
I sent you pm

Did you find this page helpful?