[WSL] MCP server is running on host OS
Resolved 💬 3 comments Opened Aug 17, 2025 by sator-imaging Closed Jan 17, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.22.0
Which model were you using?
_No response_
What platform is your computer?
Windows + WSL
What steps can reproduce the bug?
When starting codex by npx codex on Powershell (windows terminal), it automatically move to wsl terminal. (ie. codex runs on wsl)
but, it seems that mcp servers are started on on host OS so that codex gets request timed out error.
it's nice to have mcp servers also moved to wsl automatically.
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
3 Comments
Ich habe einen eigenen MCP-Server (Node.js) geschrieben, der eine PostgreSQL-DB per psql/pg mit der KI verbindet. In Claude Code funktioniert alles. In Codex hingegen scheitert die DB-Verbindung.
Problem
Codex meldet, dass die IP der Datenbank nicht gefunden/erreicht wird, obwohl der MCP lokal läuft und die Datenbank im selben Netzwerk ist. Die Tools/Funktionen des MCPs lassen sich aufrufen, aber sobald der MCP die Datenbank anwählt, wird der Zugriff blockiert.
Erwartetes Verhalten
Der MCP-Server sollte in Codex genauso wie in Claude Code eine Verbindung zur DB aufbauen können.
Tatsächliches Verhalten
DB-Connect schlägt in Codex fehl, z. B. mit:
Error: connect UNKNOWN <WAN-IP>:5432 - Local (undefined:undefined)
(mit LAN-IP teils ebenfalls kein Erfolg)
Zusätzlich hatte ich zuvor TOML-Fehler in der Config (je nach Schreibweise):
newlines are unsupported in inline tables
invalid type: integer '5432', expected a string
Was ich probiert habe
Fragen
Das könnte ein reines WSL-Problem sein. WSL muss, je nach Netzwerkmethode, für einen Netzwerkzugriff konfiguriert werden.
Closing out old bugs.