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.
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
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"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 toolsDesign 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.