Introduction
Foundational runs a hosted Model Context Protocol (MCP) server at https://mcp.foundational.io/mcp. Connecting it to ChatGPT or Codex gives them direct access to your end-to-end column-level lineage, table and column definitions, ownership and metadata, usage and cost signals, and the code behind your data assets. ChatGPT answers questions about your data stack, and Codex writes safer pipeline code, because they can look up the real dependency graph instead of guessing.
This article covers ChatGPT and the Codex command-line interface (CLI). Setup requires no API key.
Looking for a different tool? See Use Foundational MCP with your AI tools for the full client list, use cases, and machine-to-machine authentication.
Before you begin
You need an active user account in the Foundational app. The MCP server authorizes against your Foundational identity and returns only the assets your account can already see.
ChatGPT can only reach servers on the public internet. This works with Foundational’s hosted MCP server; it does not apply to self-hosted or air-gapped deployments.
Your network must allow outbound HTTPS to
mcp.foundational.io.
Connect ChatGPT
Open ChatGPT and go to Settings > Plugins > MCPs, then click Add server.
Fill in the form, then click Save:
Name: For example, Foundational
Type: Streamable HTTP
Server URL:
https://mcp.foundational.io/mcp
Find the Foundational MCP server in the MCPs list, click Authenticate, and complete the Foundational sign-in in your browser.
Foundational now shows as connected in the MCPs list.
Connect the Codex CLI
Add the server. In a terminal, run:
codex mcp add foundational --url <https://mcp.foundational.io/mcp>
Authenticate. Run this command, then complete the Foundational sign-in in your browser:
codex mcp login foundational
Verify. Start Codex by running codex, then run /mcp. The foundational server appears in the list with its tools.
Write and refactor pipeline code safely
Codex is at its most useful here. Before it edits a dbt model, Airflow DAG, or Spark job, it can query Foundational for the upstream sources, downstream consumers, column types, and existing definitions of every table involved ~~~~. The change it proposes then accounts for consumers that live outside the repository it is working in.
“Refactor this dbt model, but first check Foundational for anything downstream that reads the columns I’m renaming.”
“Add a column to this Spark job consistent with how the same field is defined upstream.”
Troubleshooting
The sign-in fails or loops
The sign-in fails or loops
Confirm you can sign in to the Foundational app (https://app.foundational.io) in the same browser. The MCP server authorizes your Foundational user account, so an expired session or a different single sign-on (SSO) account is the usual cause. In the Codex CLI, run codex mcp login foundational again to retry.
ChatGPT can’t connect to the server
ChatGPT can’t connect to the server
Check that Type is Streamable HTTP and that the URL is exactly https://mcp.foundational.io/mcp. ChatGPT connects only to servers on the public internet, so it can’t reach a self-hosted or air-gapped Foundational deployment.
Connection fails behind a corporate proxy or firewall
Connection fails behind a corporate proxy or firewall
Allow outbound HTTPS to mcp.foundational.io. See Allowing IP access to Foundational.
Useful Links
