Module 07 · intermediate · 1 hour

MCP Servers

MCP gives Codex typed tools and resources backed by external systems. A good server has narrow capabilities, clear schemas, predictable errors, and least-privilege authentication.

01

What MCP adds

Tools perform actions or queries. Resources expose readable context. Prompts package reusable interactions. Codex can connect to local stdio servers and supported remote transports.

  • Tools: Typed operations
  • Resources: Readable context
  • Auth: Scoped access
02

Configure a server

Use the MCP configuration surface or config.toml. Keep credentials in the supported environment or authentication flow rather than committing them.

[mcp_servers.docs]
url = "https://developers.openai.com/mcp"
03

Inspect status

Open /mcp to see connected servers and diagnose unavailable tools. Validate the transport, authentication, tool list, and error response separately.

/mcp
# inspect server status and exposed tools
04

Design for safety

Separate read-only and mutating tools, validate inputs server-side, expose precise descriptions, and require confirmation for consequential actions.

Continue learning

Use the official OpenAI Codex documentation as the final reference for current commands, settings, and availability.

Return to the full curriculum.

Search Codex Me

navigateEnter openEsc close