Skip to main content

What are Apps & Connectors?

Apps & Connectors allow Codex to integrate with external services and ChatGPT apps, extending its capabilities beyond the terminal. This feature enables Codex to access data from connected services and use tools provided by ChatGPT apps.
Apps & Connectors bring ChatGPT’s ecosystem of integrations into your command-line workflow.

Using Connectors in Composer

The easiest way to use apps is through the composer with the $ prefix.

Inserting a Connector

Type $ in the composer to trigger the connector popover:
1

Open the composer

Start typing your prompt in Codex.
2

Type $ to trigger connector popover

A popover appears listing accessible apps.
3

Select an app

Use arrow keys to navigate and press Enter to select an app.
4

Complete your prompt

The connector is inserted into your prompt:

Which Apps Appear?

The popover lists:
  • Connected apps - Apps you’ve already authorized, labeled as “connected”
  • Available apps - Apps that can be installed
Connected apps appear first for easy access.

Managing Apps

Use the /apps slash command to manage your connected apps.

Listing Available Apps

This shows:
  • All available ChatGPT apps
  • Which apps are currently connected
  • Which apps can be installed

Example Output

Configuring MCP Servers

Codex can connect to Model Context Protocol (MCP) servers configured in ~/.codex/config.toml.

What is MCP?

The Model Context Protocol is a standardized way for AI applications to connect to external data sources and tools. MCP servers expose resources and tools that Codex can use.

Configuration

Add MCP server configuration to your config.toml:

Available MCP Servers

Popular MCP servers include:

Filesystem

@modelcontextprotocol/server-filesystemProvides file system access to specified directories.

GitHub

@modelcontextprotocol/server-githubAccess GitHub repositories, issues, and pull requests.

Google Drive

@modelcontextprotocol/server-gdriveRead and write Google Drive documents.

Slack

@modelcontextprotocol/server-slackSend messages and search Slack conversations.
See the MCP documentation for a complete list of available servers.

Managing MCP Servers via CLI

Codex provides commands to manage MCP servers:

Example: Adding GitHub MCP Server

Using Codex as an MCP Server

Codex can also function as an MCP server, allowing other MCP clients to use Codex as a tool.

Starting the MCP Server

This launches Codex in MCP server mode, exposing its capabilities to other agents.

Testing with MCP Inspector

Test Codex as an MCP server using the official inspector:
This opens a web interface where you can:
  • See available tools
  • Test tool calls
  • View responses

Using Codex as a Tool

Other agents can use Codex to:
  • Execute code in a sandboxed environment
  • Analyze codebases
  • Perform refactoring
  • Generate code with context awareness

Common Use Cases

Querying External Services

Integrating Data into Code

Cross-Service Workflows

Configuration Reference

Full MCP Server Configuration

Environment Variable Substitution

MCP server configurations support environment variable substitution:
Codex will substitute ${VAR_NAME} with the value from your environment.

Security Considerations

Apps and MCP servers can access external services on your behalf. Only connect apps you trust and review permissions carefully.

Best Practices

Before connecting an app, review what data it can access and what actions it can perform.
Store API keys and tokens in environment variables, not directly in config.toml:
For filesystem servers, only grant access to specific directories:
Periodically review connected apps with /apps and disconnect ones you no longer use.

Troubleshooting

App Not Appearing in Popover

  1. Verify the app is installed and connected
  2. Run /apps to check connection status
  3. Restart Codex to refresh app connections

MCP Server Connection Failed

  1. Check that the server command is correct and accessible:
  2. Verify environment variables are set:
  3. Check Codex logs for detailed error messages:

Permission Errors

  1. Ensure API keys have the necessary permissions
  2. Check that OAuth tokens haven’t expired
  3. Re-authenticate the app if needed

Examples

Example: GitHub Integration

Usage:

Example: Notion Integration

Usage:

Example: Custom MCP Server

Usage:

Next Steps

MCP Documentation

Learn more about the Model Context Protocol

Configuration Guide

Complete configuration reference

Skills System

Create skills that use MCP servers

Security

Understand Codex’s security model