mcp with claude code
Hi guys , im following the supabase docs for getting the mcp installed in claude code https://supabase.com/docs/guides/getting-started/mcp?queryGroups=os&os=wsl#claude-code but i keep getting the error [ERROR] MCP server "supabase" Connection failed: spawn wsl ENOENT
im using WSL ubuntu to use claude code
node version -18.19.1
npx version 9.2.0
and this is how my .mcp.json file looks like

32 Replies
@latest
from the end. Simply @supabase/mcp-server-supabase
I’ll give it a try just one more question. I’m running Claude code using WSL with ubuntu when trying to set up the MCP should I keep the command as WSL?
A Linux base system before so I’m unsure how this would work thanks
Not completely sure but I think if you're running from within wsl ubuntu, then you can simply write it this way.
holy, this worked
so it was just bad command

i didnt get an error this time
Yes, the first one will work if you run from windows
thank you for your help ❤️
Guys i am able to connect to superbase but when i am asking claude to do somathing its saying could not access giving error:-
Error: {"error":{"name":"Error","message":"Unauthorized. Please provide
a valid access token to the MCP server via the --access-token flag or
SUPABASE_ACCESS_TOKEN."}}
but i am prety much sure i am giving a valid token ??
Can you use supabase cli with the token you have right now?
i have not actully install superbase locally when i am trying to do so i am getting :-
npm WARN deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm ERR! code 1
npm ERR! path /Users/shubhamsingh/.npm-global/lib/node_modules/supabase
npm ERR! command failed
npm ERR! command sh -c node scripts/postinstall.js
npm ERR! node:internal/process/esm_loader:34
npm ERR! internalBinding('errors').triggerUncaughtException(
npm ERR! ^
npm ERR! Installing Supabase CLI as a global module is not supported.
npm ERR! Please use one of the supported package managers: https://github.com/supabase/cli#install-the-cli
npm ERR!
npm ERR! (Use
node --trace-uncaught ...
to show where the exception was thrown)
npm ERR!
npm ERR! Node.js v20.11.1
npm ERR! A complete log of this run can be found in: /Users/shubhamsingh/.npm/_logs/2025-07-05T18_40_25_619Z-debug-0.log
~/Des/plans2pick_be_lates 1 ✘ 5s 12:10:27 AM
@inderAre you sure access token is being passed to mcp server?
actully its working on my local and showing list of projects as well
but with mcp i am not sure what is the issue ! i have copied the secreate key and pasted as well
can we connect ??
@inder
Sorry I can't, you can post your queries here
secret key or access token?
there is a difference between the two
sorry i mean access token !
from here

i think the location .mcp.json should be diffent but in officail doc its was suggested to keep in root of the project !
already added my calude is not able to access the mcp access token !

for mac is the set up any differnt ??
i have done the set up for figma mcp as well never felt any issue !
I don't think there would be any difference between the setup. Its just running a command with some args.
Try running claude with
--debug
flag. Maybe there is something in therei dont know its routing again to this issue Now let me test the connection:
⎿ Error: {"error":{"name":"Error","message":"Unauthorized. Please provide
a valid access token to the MCP server via the --access-token flag or
SUPABASE_ACCESS_TOKEN."}} tried using env varible as well no help
using cli a access token create automatically in my superbase cli_shubhamsingh@Shubhams-MacBook-Air-2.local_1751741057
I didn't understand
when i run ❯ npx supabase bootstrap in my cli i saw a entry created in my access tokens

Have you tried using cursor?
supabase mcp with cursor
nope i use claude
may there might be an issue with claude only
Yes, that's what I was thinking. Trying with some other AI will confirm that. I think vscode too now supports mcp
@ShubhamSingh047 can you run me the steps that you did to connect the mcp
Im using claude code and was able to set it up pretty easily so i might be able to help
I have tried for hours to get the MCP working in Claude Code, only now to find this thread! I was super hopeful this different way of writing the mcp server would work but it hasn't.... any further ideas? This is a windows (not wsl) terminal.

You need to run it in the same terminal space as Claude code, so you wouldn't be able to use windows here 😦
just follow the same steps as you would in the guide https://supabase.com/docs/guides/getting-started/mcp#claude-code
Model context protocol (MCP) | Supabase Docs
Connect your AI tools to Supabase using MCP
but change the command to match the one above.
and it should work