codex icon indicating copy to clipboard operation
codex copied to clipboard

how to add supabase mcp into codex cli ?

Open Rasantis opened this issue 1 year ago • 11 comments

What version of Codex is running?

No response

Which model were you using?

gpt5

What platform is your computer?

windows

What steps can reproduce the bug?

how to integrate supabase mcp into codex cli

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

Rasantis avatar Sep 11 '25 17:09 Rasantis

It's not running for me too it says request timed out or program not found

Vikranth-jagdish avatar Sep 11 '25 19:09 Vikranth-jagdish

OpenAI makes such garbage software and still wants to replace Claude Code. They can't even fix a MCP problem on Windows. Why don't you take a look at how others implement it?

AyinMostima avatar Sep 12 '25 10:09 AyinMostima

Because other commands are invoked through Node and have no problem with the shell, while this one uses rust::command, that’s why the issue occurs. The problem is that it should be launched via which(), which is Windows-friendly and under the hood resolves the exact path to .exe, .bat, etc., which is required on Windows.

Why they haven’t applied this fix, I don’t know :) I even submitted a ready PR, but certain aspects didn’t quite fit, which is understandable. Still, that was more than two weeks ago, and they could have at least applied this small fix. Perhaps it requires some internal discussion on their side.

So on Windows, in MCP, provide the full path to the executable file.

adsqx avatar Sep 13 '25 19:09 adsqx

Here is the config that works for me on windows. [mcp_servers.supabase] type = "stdio" command = 'C:\Program Files\nodejs\npx.cmd' args = ["-y", "@supabase/mcp-server-supabase", "--project-ref=[project ref]"] env = { APPDATA = 'C:\Users[user]\AppData\Roaming',LOCALAPPDATA = 'C:\Users[user]\AppData\Local',HOME = 'C:\Users[user]',"SUPABASE_ACCESS_TOKEN" = "[token]",SystemRoot = 'C:\Windows'} startup_timeout_ms = 20_000

iharc-jordan avatar Sep 16 '25 15:09 iharc-jordan

I cannot make it work for local Python MCP server too. Same config/server works in Gemini CLI.

[mcp_servers.gemini-image-generator]
command = "python"
args = ["C:/Users/Dron/.gemini/my_mcp/image_gen_google.py"]
startup_timeout_ms = 20_000
env = { GEMINI_API_KEY = "..." }

Update: It works this way (seen here):

[mcp_servers.gemini-image-generator]
#type = "stdio"
command = "python"
args = ["C:\\Users\\Dron\\.gemini\\my_mcp\\image_gen_google.py"]
env = { GEMINI_API_KEY="...", APPDATA="C:\\Users\\Dron\\AppData\\Roaming", LOCALAPPDATA="C:\\Users\\Dron\\AppData\\Local", HOME="C:\\Users\\Dron", SystemRoot="C:\\Windows" }

Dron007 avatar Sep 17 '25 03:09 Dron007

@iharc-jordan you are my savior on supabase. Worked for me. Although seems like it's not universal solution. While supabase timeout stopped occuring, serena using uvx is not really working.

[mcp_servers.serena]
type = "stdio"
command = 'c:\users\[myusername]\.local\bin\uvx.exe'
args = ["--from", 
        "git+https://github.com/oraios/serena", 
        "serena-mcp-server",
        "--context",
        "ide-assistant",
        "--project",
        ".",
        "--enable-web-dashboard",
        "false"]

EDIT : I used this answer and serena worked for me. https://github.com/openai/codex/issues/3510#issuecomment-3287599187

shintarotakechi avatar Sep 17 '25 16:09 shintarotakechi

For Windows users, this works for me with Codex 0.38.0:

[mcp_servers.context7]
command = "cmd"
args = [
    "/c",
    "npx",
    "-y",
    "@upstash/context7-mcp",
    "--api-key",
    "YOUR_API_KEY",
]
env = { SystemRoot="C:\\Windows" }
startup_timeout_ms = 20_000

wbdb avatar Sep 17 '25 22:09 wbdb

Codex 0.5.12 and this works for me on Win 11

[mcp_servers.supabase] command = "C:\\Program Files\\nodejs\\npx.cmd" args = ["-y", "@supabase/mcp-server-supabase@latest", "--project-ref=<redacted>"] startup_timeout_ms = 120000 env = { APPDATA = "C:\\Users\\<redacted>\\AppData\\Roaming", LOCALAPPDATA = "C:\\Users\\<redacted>\\AppData\\Local", HOME = "C:\\Users\\<user>", SystemRoot = "C:\\Windows", ComSpec = "C:\\Windows\\System32\\cmd.exe", SUPABASE_ACCESS_TOKEN = "<redacted>" }

BinaryBeastMaster avatar Sep 19 '25 16:09 BinaryBeastMaster

For Windows users, this works for me with Codex 0.38.0:

[mcp_servers.context7]
command = "cmd"
args = [
    "/c",
    "npx",
    "-y",
    "@upstash/context7-mcp",
    "--api-key",
    "YOUR_API_KEY",
]
env = { SystemRoot="C:\\Windows" }
startup_timeout_ms = 20_000

Works for supabase ! Thanks dude !

kur0s4ki avatar Sep 23 '25 15:09 kur0s4ki

welcome, remember to post your solutions if they work 👍

[mcp_servers.supabase]
command = "cmd"
args = [
    "/c",
    "npx",
    "-y",
    "@supabase/mcp-server-supabase@latest",
    "--access-token",
    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
]
env = { SystemRoot="C:\\Windows" }
startup_timeout_ms = 20_000

jonathanlal avatar Oct 30 '25 22:10 jonathanlal

Thanks for posting your solutions. Closing the issue since there doesn't appear to be anything actionable for the codex team at this time.

etraut-openai avatar Nov 20 '25 09:11 etraut-openai