Skip to content
Agentic Levels
Start hereLevelsTracksPromptsAbout
Get my levelGet my level

  • Start hereYour first useful task with AI.
  • Level quiz8 questions. No AI needed.
  • Fluency ScoreYour Level and a score, from your own AI.

  • LevelsThe 11 levels, in order.
  • LessonsShort lessons, filter by level.
  • TracksGuided paths by tool, role or goal.
  • Set up your AI tool
  • Starter packFree files that help AI remember.

  • PromptsReady prompts to copy and adapt.
  • ChatGPT vs Claude vs GeminiPick the right one for the job.
  • How-tos
  • ReferenceCommands for Claude Code, Codex, Antigravity.
  • ResourcesHand-picked reading and tools.

  • Your progress
  • Your next moveAn interview that picks your next skill.
  • Your next lessonsThe next lessons at your level.
  • Updates

  • Pricing
  • About
  • FAQ & Feedback
  • Work with us
  • How we handle your data
Sign inPreferences
AboutPricingHow-tosPromptsStarter packMy stackHow we handle your data

© 2026 Fuentes Studio

PrivacyTermsRefundsAccessibilityAI content policyCredits
yourCouncil
Ready to help
✦

What do you want to understand?

Ask anything about what you're learning.

←Codex Fundamentals
  1. Tracks
  2. ›Codex Fundamentals: Module 5
  3. ›Use MCP only for a real gap
6

Level 6 · Lesson 8 of 12 · Free

Use MCP only for a real gap

More tools only help when they close a task boundary

After this, you'll be able to name the gap an MCP server closes for Codex and reject MCP setup when the repo already has enough context.

Before you start

Complete Review diffs before commit first.

The idea

MCP hands Codex context or tools it doesn't already have.

Worked example

Before and after

Before: Install every MCP server so Codex has more power (more access, no named gap). After: Does this task need an MCP server? I want the pricing page built from a Figma design, so name the gap, the approval risk, and a simpler fallback.

What the AI might say

Yes, a Figma server fits, because the design lives outside your repo and I can't see it today. It should be read-only, so approve it narrowly. The fallback is to share the design details in the prompt.

Why it works

The After asked for the gap, the risk, and a fallback. A design outside the repo is a real gap, so MCP earned its place.

MCP stands for Model Context Protocol, a standard plug that connects Codex to an outside app, and the MCP server is the small program on the other end. Codex already reads your repo, runs your commands, and uses the surfaces you've set up, so add MCP only when a real boundary blocks it.

Gap TestMove through Use MCP only for a real gap, check proof, then fix only the weak part.
yesnorun it again
StartBegin with the real task
Use MCP only for a real gapAfter this, you'll be able to name the gap an MCP server closes for Codex and reject
1Proof visible?The answer names the context or action gap
Ready to useRun the MCP gap test for one Codex task and decide add or skip
Fix the weak partBreaks when MCP expands access without adding useful task context

First ask: do you need a connection at all? Can you paste the file, the text, or the link into your prompt instead? If a pasted copy finishes the task, stop there, and nothing new gets access to anything.

A connection earns its place only when copying by hand keeps failing. That means you paste the same ticket details every day, or the data changes too fast to paste.

A real gap has three parts. Codex needs outside context or action. The server actually provides that context or action, and the added access has a clear review and approval story.

A browser tool for a login-dependent flow, Figma (a design tool) context for implementation, or a database read tool with safe limits are real gaps. A filesystem MCP so Codex can read files and folders it already reads is not.

The app, the terminal version, and the IDE extension all support MCP. They share one configuration, so once a server is set up, all three can reach it. ChatGPT on the web does not read it, and uses plugins instead.

In the desktop app, open Settings, then MCP servers, then Add server. Name it, choose STDIO (a program that runs on your computer) or Streamable HTTP (a server you reach by web address), then Save and Restart. Select Authenticate if it asks you to sign in.

In the IDE extension, use the gear menu, then MCP servers, then Add server, and Restart extension. In the terminal, run codex mcp add <name> -- <command>, then codex mcp list to check it, and codex mcp login <name> if it needs a sign-in. In any chat, type /mcp to see which servers Codex has.

Keep secrets out. Never paste a key into a prompt.

A server's sign-in secret can be saved in Codex's settings file (config.toml), so treat that file like a password. If a key ever leaks, revoke it where it was issued and make a new one.

To remove a server, ask Codex to take it out of its settings and show you what changed, then run /mcp to confirm it is gone. Treat what a server sends back as information to check, not orders to follow.

In Claude Code and Antigravity: Claude Code adds a remote server with claude mcp add --transport http <name> <url> and a local one with claude mcp add --transport stdio <name> -- <command>. Type /mcp to see status. This track's sources don't cover how Antigravity adds MCP servers, so check its own docs before you rely on one.

If repo files, terminal proof, and a clear brief can finish the job, skip MCP for now.

Try it (14 min)

Paste this into Codex

Run the MCP gap test:

Task: [describe task]
What Codex can already see: [repo, tests, browser, files, docs]
External context or action needed: [Figma, browser, docs, database, app, none]
Candidate MCP server: [name, or unknown]
Approval risk: [read-only, write, destructive, unknown]

No task of your own? Use this one: you want a menu page for the practice site, built from a price list that lives in an online spreadsheet.

First answer: can you paste the list in instead?

Return:
1. Add MCP or skip MCP.
2. The exact gap it closes.
3. The approval or proof needed after adding it.
4. A simpler fallback if MCP is not ready.

What a good response looks like

1. Skip MCP for now. 2. The gap would be that Codex can't see the spreadsheet. But you need the 12 rows once, and you can close the gap in a minute by pasting them into the prompt, or saving them as prices.txt in the practice folder. 3. If you later needed live prices every day, use a read-only spreadsheet server. Test it first on a copy with made-up rows, and check each reply against the sheet before acting on it. 4. Fallback: paste the rows and ask Codex to build menu.html from them, then run the check and open the page.

Check yours against

  • The answer names the context or action gap
  • MCP is skipped when Codex already has enough access
  • Approval risk is named
  • A fallback exists
  • Installing MCP before defining the missing capability.
  • Giving Codex write-capable tools when read-only proof would be enough.
  • Duplicating file access Codex already has.
  • Trusting a server's reply without a look. A reply can hide instructions meant to steer Codex, so read what comes back before you act on it.
  • Adding a server when pasting the file or text would have finished the task.

When this breaks

  • Breaks when MCP expands access without adding useful task context.
  • Breaks when tool responses are trusted without review and introduce hostile instructions.

AI can help with this

Use Codex to help you name the gap an MCP server closes for Codex and reject MCP setup when the repo already has enough context. Start with the exercise prompt and your real input. Ask for one draft, then check it against this proof: The answer names the context or action gap. Accept only the version you can verify yourself.

You can now

✓

You can name the gap MCP closes

  • ✓You can skip MCP when it adds no value
  • ✓You can classify MCP approval risk
  • ✓You can choose a fallback

Try it from memory

Pulling this out of your own head now is the part that actually moves it into long-term memory. Re-reading only feels like it does.

Name one thing in your work that Codex cannot reach today. Write the gap in one sentence. Then say whether an MCP server would close it, and how you'd check what it returns.

One good answer: 'Codex cannot read my team's issue tracker, so it guesses at bug details. An MCP server for the tracker closes that gap. I check each response against the original ticket before acting on it.' Check yours: if the gap is named before the tool, and the tool's output is checked, you're there.

Key takeaways

Add MCP for a real boundary Codex cannot cross. More tools without a gap create more risk, not better work.

  1. 1MCP connects Codex to outside tools and context.
  2. 2Ask first whether pasting the file or text would do.
  3. 3Codex shares one MCP setup across the app, CLI and IDE extension.
  4. 4A useful MCP server closes a named gap.
  5. 5Tool responses still need trust checks.

Go deeper

  • Codex MCPlearn.chatgpt.com (opens in a new tab) ↗
  • Claude Code MCPcode.claude.com (opens in a new tab) ↗
  • Wire Your First MCPOn this site
  • Trust No Tool ResponseOn this site
Up nextAdd skills, plugins and computer use without bloat→

Was this helpful?

Related lessons

Wire Your First MCPRead a Tool Schema Like the Model DoesTrust No Tool Response
← Back to Codex Fundamentals