Supabase MCP server in Cursor: ERR_MODULE_NOT_FOUND for stdio.js when using @latest
Using @supabase/mcp-server-supabase@latest from mcp.json in Cursor on macOS (Node 22.17.0) fails to build tools. npx exits with ERR_MODULE_NOT_FOUND: Cannot find module node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js. The reporter says @latest was 0.5.0-dev.3 at the time, while the maintainer found the npm latest tag is actually 0.4.5. How should I configure the MCP server so Cursor loads the tools?
Originally asked on GitHub: https://github.com/supabase/mcp/issues/115
5 answers
Status: still open in the thread, with no package-side fix confirmed. The fix that worked in the thread is to pin a stable version in Cursor's mcp.json instead of @latest.
For Cursor, use this configuration with 0.4.5:
json{ "mcpServers": { "supabase": { "command": "npx", "args": [ "-y", "@supabase/mcp-server-supabase@0.4.5", "--read-only", "--project-ref=YOUR_PROJECT_REF" ], "env": { "SUPABASE_ACCESS_TOKEN": "YOUR_TOKEN" } } } }The equivalent terminal command that worked: npx -y @supabase/mcp-server-supabase@0.4.5 --read-only --project-ref=YOUR_PROJECT_REF
A maintainer checked npm and said the @latest dist-tag is actually 0.4.5 (0.5.0-dev.x builds are experimental under @dev), but in the thread npx with @latest still failed with ERR_MODULE_NOT_FOUND, even for npx ... --version, while a global install (npm install -g @supabase/mcp-server-supabase@latest) resolved to 0.4.5 and ran fine. That points to an npx module-resolution issue rather than the version alone. Another user hit the same error even with an explicit version and fixed it by pinning 0.4.4.
General advice: keep SUPABASE_ACCESS_TOKEN only in the env block and do not commit it to your repository.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter ran npx -y @supabase/mcp-server-supabase@latest --read-only --project-ref=... on macOS with Node 22.17.0, which threw ERR_MODULE_NOT_FOUND for @modelcontextprotocol/sdk/dist/esm/server/stdio.js and Cursor did not load tools.
Source: https://github.com/supabase/mcp/issues/115 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Worked)
Reporter pinned version 0.4.5 in both the npx command and the mcp.json args; Cursor then loaded the Supabase tools successfully.
Source: https://github.com/supabase/mcp/issues/115 (opens external site)
Did this work for you?What @juanmacedan1co tried on GitHub (Worked)
A commenter hit the same ERR_MODULE_NOT_FOUND even when setting the version explicitly and fixed the issue by pinning version 0.4.4.
Source: https://github.com/supabase/mcp/issues/115#issuecomment-3109189552 (opens external site)
Did this work for you?What @dnywh tried on GitHub (Partly worked)
Running npx -y @supabase/mcp-server-supabase@latest --version produced the same module error, while npm install -g @supabase/mcp-server-supabase@latest resolved to 0.4.5 and the installed command ran fine.
Source: https://github.com/supabase/mcp/issues/115#issuecomment-3111527756 (opens external site)
Did this work for you?