Skip to content
Learning Outcomes
  • Find the Codex binary, which is often not where you expect.
  • Install the Foundry Connect skills and add the connection by hand.
  • Sign in with OAuth, or with a token on an older instance.

Codex CLI

Codex installs the Foundry Connect skill and commands from the plugin repository, but the connection itself is added separately, with one command.

That extra step is not an oversight. Codex stores a bundled server's address exactly as written and never expands a variable inside it, so a single published plugin cannot point at your organization's instance. Adding the connection yourself is the supported path, not a workaround.

New here? Do Getting Started first.

Measured against codex-cli 0.153.0.

Step 1 — find the binary

There is often no codex on your PATH, even with Codex installed. On macOS the working CLI ships inside the VS Code extension:

~/.vscode/extensions/openai.chatgpt-<version>-darwin-arm64/bin/macos-aarch64/codex

Either call that path directly or put it on your PATH. Do not assume a codex command exists, and do not count on a desktop app being present, since macOS users are being moved to the ChatGPT desktop app.

Step 2 — install the skills

codex plugin marketplace add UMMS-Biocore/foundry-connect-plugin
codex plugin add foundry-connect@foundry-connect

That gives you the foundry-pipelines skill and the three command wrappers.

Step 3 — add the connection

codex mcp add foundry --url https://foundry.your-org.edu/mcp

Use your own hostname, keep the /mcp on the end, and keep the name foundry. A server you add this way takes precedence over the plugin's own unusable entry of the same name, so the placeholder disappears from the list once yours exists.

Step 4 — check it worked

codex mcp list

The Url column must show your real hostname. If it still shows https://${instance_host}/mcp, the manual add did not happen, and nothing will connect.

Signing in

codex mcp login foundry

Requires Foundry Connect 2.22.0 or later

Codex works out its sign-in address by building one itself, and it never falls back to the address other assistants use. Instances before 2.22.0 do not answer at that address, so codex mcp login cannot complete against them, and the failure looks like a malformed response rather than a missing feature.

On an older instance, use a token instead: generate an MCP token under Personal Access Tokens and supply it with --bearer-token-env-var, so the value comes from your environment rather than sitting in config.toml as literal text.

Claude and Copilot are unaffected either way, because they follow the address Foundry Connect hands them instead of guessing one.

See also