AI assistant setup

Use GridIron Data NFL fantasy data in OpenAI Codex (MCP setup)

Quick answer: Add a [mcp_servers.gridiron-data] table with url = "https://api.gridirondata.com/mcp" to ~/.codex/config.toml, then run codex mcp login gridiron-data and sign in with your GridIron Data account in the browser. Or skip OAuth: set bearer_token_env_var = "GRIDIRON_API_KEY" and export your key. The same config serves the Codex CLI, the IDE extension and the desktop app.

Server URL
https://api.gridirondata.com/mcp
Config
~/.codex/config.toml
Sign-in
OAuth or API key
Time
About 2 minutes

What do I need first?

  • Codex installed (CLI, IDE extension or desktop app). They share one config file.
  • A GridIron Data account for OAuth sign-in, or your API key from the dashboard. No account? Sign up free (no credit card).

How do I add GridIron Data to Codex?

  1. Add the server to config.toml. Open ~/.codex/config.toml (or a trusted project's .codex/config.toml) and add:
    [mcp_servers.gridiron-data]
    url = "https://api.gridirondata.com/mcp"
  2. Sign in. Run codex mcp login gridiron-data. A browser opens on a GridIron Data page: sign in and click Allow. On a machine without a browser, add --no-browser and paste the full redirect URL back when asked.
  3. Check it. Run codex mcp list, or type /mcp in the Codex TUI, and look for gridiron-data.

The CLI can also add the entry for you: codex mcp add gridiron-data --url https://api.gridirondata.com/mcp. OpenAI's docs show codex mcp add with --url only together with other options, so if your version rejects it, edit config.toml as above.

In the Codex app or IDE extension: open Settings → MCP servers → Add server (in the IDE extension, from the gear menu), choose Streamable HTTP, enter the URL, restart, then Authenticate.

Can I use my API key instead of OAuth?

Yes. Codex can send a bearer token read from an environment variable, so the key never sits in the config file:

[mcp_servers.gridiron-data]
url = "https://api.gridirondata.com/mcp"
bearer_token_env_var = "GRIDIRON_API_KEY"
export GRIDIRON_API_KEY=YOUR_KEY

Your key is on your dashboard. No codex mcp login is needed.

What can I ask Codex?

Ask in your own words; the assistant picks the tool. A few that work well:

  • "Use gridiron-data to get this week's top 12 QB projections and save them as qbs.csv."
  • "Write a script that compares my roster's projections for this week in half-PPR."
  • "Pull Justin Jefferson's 2023 weekly stats and plot fantasy points by week." (Basic)
  • "Any injury news on Malik Nabers this week?" (Basic)
  • "Which defenses allow the most fantasy points to running backs over the last four weeks?" (Pro)

A free GridIron Data account answers player lookups and this week's projections. Stats, snap share, news, matchups, rest-of-season projections, the schedule and other weeks need Basic ($5/month or $45/year). Prop probabilities, defense vs position, betting lines, the injury-changes feed, depth charts and inactives need Pro ($29/month or $249/year), the betting plan. A question outside your plan comes back with the plan it needs, and the assistant tells you. See plans. Prop probabilities are a model estimate, not betting advice.

Player names, positions and ids are matched case-insensitively. Scoring is PPR unless you ask for half-PPR or standard. All 21 tools are listed on the AI assistant setup hub.

Troubleshooting

  • Server doesn't start or times out. Codex waits 10 seconds for a server by default. On a slow network add startup_timeout_sec = 30 to the [mcp_servers.gridiron-data] table.
  • "unauthorized". Run codex mcp login gridiron-data again, or check that GRIDIRON_API_KEY is exported in the shell that starts Codex.
  • Codex asks before running a tool. That's its approval mode. Every GridIron Data tool reads data except request_news_scrape; you can set default_tools_approval_mode on the server table if you want fewer prompts.
  • Sign-in page says the link expired. The sign-in has 15 minutes. Start the connection again from your assistant.
  • Asked to sign in again. You regenerated your API key, your plan ended, or the connection went unused for 30 days. Reconnect and sign in.
  • "Not available on this account's current plan". That question needs Basic or Pro. The reply names the plan; see plans.

Frequently asked questions

Does OpenAI Codex support remote MCP servers?

Yes. Codex connects to Streamable HTTP MCP servers configured under [mcp_servers.<name>] with a url in ~/.codex/config.toml, with OAuth (codex mcp login) or a bearer token from an environment variable.

Is this the same as adding GridIron Data to ChatGPT?

No. Codex reads its own config.toml. ChatGPT uses Plugins → Add custom MCP server; see the ChatGPT guide.

Do the Codex app and IDE extension need separate setup?

No. The Codex CLI, IDE extension and desktop app share ~/.codex/config.toml, so one entry covers all three.

Is it free?

A free GridIron Data account answers player lookups and this week's projections. Stats, snaps, news and other weeks need Basic ($5/month or $45/year); prop probabilities, defense vs position and betting lines need Pro ($29/month or $249/year).

Where does the data come from?

GridIron Data's API: projections, actuals from 2020, snap counts, news, injury status checked against ESPN every 2 minutes from 8am to 1am ET, and Pro betting data.

Using a different assistant?

Every assistant connects to the same server, https://api.gridirondata.com/mcp. The AI assistant setup hub compares them.