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
{
"mcpServers": {
"supabase": {
"command": "wsl",
"args": [
"npx",
"-y",
"@supabase/mcp-server-supabase@latest",
"--access-token",
"123faketoken"
]
}
}
}
{
"mcpServers": {
"supabase": {
"command": "wsl",
"args": [
"npx",
"-y",
"@supabase/mcp-server-supabase@latest",
"--access-token",
"123faketoken"
]
}
}
}
No description
32 Replies
inder
inder3mo ago
A solution mentioned in this github discussion is to remove @latest from the end. Simply @supabase/mcp-server-supabase This is a different error
I goon to clippy
I goon to clippyOP3mo ago
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
inder
inder3mo ago
Not completely sure but I think if you're running from within wsl ubuntu, then you can simply write it this way.
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server-supabase@latest",
"--access-token",
"123faketoken"
]
}
}
}
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": [
"-y",
"@supabase/mcp-server-supabase@latest",
"--access-token",
"123faketoken"
]
}
}
}
I goon to clippy
I goon to clippyOP3mo ago
holy, this worked so it was just bad command
I goon to clippy
I goon to clippyOP3mo ago
No description
I goon to clippy
I goon to clippyOP3mo ago
i didnt get an error this time
inder
inder3mo ago
Yes, the first one will work if you run from windows
I goon to clippy
I goon to clippyOP3mo ago
thank you for your help ❤️
ShubhamSingh047
ShubhamSingh0472mo ago
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 ??
inder
inder2mo ago
Can you use supabase cli with the token you have right now?
ShubhamSingh047
ShubhamSingh0472mo ago
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 @inder
inder
inder2mo ago
Are you sure access token is being passed to mcp server?
ShubhamSingh047
ShubhamSingh0472mo ago
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
inder
inder2mo ago
Sorry I can't, you can post your queries here secret key or access token? there is a difference between the two
ShubhamSingh047
ShubhamSingh0472mo ago
sorry i mean access token !
ShubhamSingh047
ShubhamSingh0472mo ago
from here
No description
ShubhamSingh047
ShubhamSingh0472mo ago
i think the location .mcp.json should be diffent but in officail doc its was suggested to keep in root of the project !
ShubhamSingh047
ShubhamSingh0472mo ago
already added my calude is not able to access the mcp access token !
No description
ShubhamSingh047
ShubhamSingh0472mo ago
for mac is the set up any differnt ?? i have done the set up for figma mcp as well never felt any issue !
inder
inder2mo ago
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 there
ShubhamSingh047
ShubhamSingh0472mo ago
i 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
inder
inder2mo ago
I didn't understand
ShubhamSingh047
ShubhamSingh0472mo ago
when i run ❯ npx supabase bootstrap in my cli i saw a entry created in my access tokens
No description
inder
inder2mo ago
Have you tried using cursor? supabase mcp with cursor
ShubhamSingh047
ShubhamSingh0472mo ago
nope i use claude may there might be an issue with claude only
inder
inder2mo ago
Yes, that's what I was thinking. Trying with some other AI will confirm that. I think vscode too now supports mcp
I goon to clippy
I goon to clippyOP2mo ago
@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
cazza
cazza2mo ago
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.
No description
I goon to clippy
I goon to clippyOP2mo ago
You need to run it in the same terminal space as Claude code, so you wouldn't be able to use windows here 😦
I goon to clippy
I goon to clippyOP2mo ago
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
I goon to clippy
I goon to clippyOP2mo ago
but change the command to match the one above. and it should work

Did you find this page helpful?