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:
Which Apps Appear?
The popover lists:- Connected apps - Apps you’ve already authorized, labeled as “connected”
- Available apps - Apps that can be installed
Managing Apps
Use the/apps slash command to manage your connected apps.
Listing Available Apps
- 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 yourconfig.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
Testing with MCP Inspector
Test Codex as an MCP server using the official inspector:- 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:${VAR_NAME} with the value from your environment.
Security Considerations
Best Practices
Review app permissions
Review app permissions
Before connecting an app, review what data it can access and what actions it can perform.
Use environment variables for secrets
Use environment variables for secrets
Store API keys and tokens in environment variables, not directly in config.toml:
Limit MCP server access
Limit MCP server access
For filesystem servers, only grant access to specific directories:
Audit connected apps regularly
Audit connected apps regularly
Periodically review connected apps with
/apps and disconnect ones you no longer use.Troubleshooting
App Not Appearing in Popover
- Verify the app is installed and connected
- Run
/appsto check connection status - Restart Codex to refresh app connections
MCP Server Connection Failed
-
Check that the server command is correct and accessible:
-
Verify environment variables are set:
-
Check Codex logs for detailed error messages:
Permission Errors
- Ensure API keys have the necessary permissions
- Check that OAuth tokens haven’t expired
- Re-authenticate the app if needed
Examples
Example: GitHub Integration
Example: Notion Integration
Example: Custom MCP Server
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