MCP servers
The built-in tools cover your files and your shell. MCP is how everything else gets in: a database, a ticket tracker, an internal service.
An MCP server is a separate program that exposes tools. You register it once and its tools join the list Codex can use.
codex mcp add sqlite -- npx -y @modelcontextprotocol/server-sqlite --db-path ./links.dbAdded global MCP server 'sqlite'.
Everything after the double dash is the command that starts the server. That is a real run, and here is the configuration it wrote:
[mcp_servers.sqlite]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-sqlite", "--db-path", "./links.db"]Which means you can also write it by hand, and commit a project's servers in .codex/config.toml so a colleague gets the same tools by cloning.
Checking what is connected
codex mcp listName Command Args Status Auth sqlite npx -y @modelcontextprotocol/server-sqlite --db-path ./links.db enabled Unsupported
Name, how it starts, whether it is enabled, and whether it supports authentication. When a tool you expected is missing, this is the first place to look.
codex mcp listNo MCP servers configured yet. Try `codex mcp add my-tool -- my-command`.
And that is the same command after removing it again, which is what a clean machine looks like.
Remote servers
A server does not have to be a local command. --url registers a remote one, with OAuth details where the service needs them, which is how hosted tools are added without running anything yourself.
- Add a server for something you use daily, then run
codex mcp list. - Move it from your user config into a project config and see who gets it.
Little by little, you're building something great.