Skip to content

The app does not load a local MCP server defined in .codex/config.toml. #297

@rzseattle

Description

@rzseattle

I am trying to configure a local MCP server in .codex/config.toml using the following example:

[mcp_servers.system-mcp]
command = "dotenvx"
args = ["-q", "run", "-f", ".env", "-f", ".env.local", "-o", "--", "tools/system-mcp/run.sh"]
startup_timeout_sec = 180
cwd = "."

The server definition appears to be picked up, but the actual startup fails because the working directory is different from what the command expects, so the relative path to tools/system-mcp/run.sh is not visible/resolvable for Codex.

Expected behavior

The local MCP server should be started with the expected working directory, or relative paths in args / cwd should be resolved consistently relative to the project root.

Actual behavior

The MCP configuration is present, but the server does not start successfully because the runtime working directory differs from the expected one, causing the relative script path to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions