Codex Integration and Connection
Codex supports integration with a variety of development tools and platforms, expanding its capabilities and application scenarios.
GitHub Integration
Codex is deeply integrated with GitHub, allowing code review directly in PRs.
Feature Overview
| Function | Description |
|---|---|
| PR Review | Comment @codex review in a PR to get a review |
| Automatic Review | Automatically trigger a review for every new PR |
| CI Fixes | @codex fix the CI failures |
| Cloud Tasks | Other @codex commands to start cloud tasks |
Setting Up GitHub Integration
- Configure Codex Cloud
- Go to the settings page to enable Code Review
- Authorize access to your GitHub repositories
- Select the repositories to enable
Request a review
Use in PRs
Enter in a PR comment:
@
codex review
Specify Review Focus
@
codex review
for
security issues
Review performance issues
@
codex review
for
performance regressions
Codex Response
Codex will:
- React to a PR with 👀
- Analyze code changes
- Publish review comments
- Flag issues found (P0 and P1 by default)
Review Guideline Customization
Define review rules in the repository's AGENTS.md:
Review Guidelines
Review guidelines
Don't log PII
(
Personally Identifiable Information
)
Verify authentication middleware wraps every route
Check for SQL injection vulnerabilities
Ensure error messages don't leak sensitive info
Treat typos in docs as P1 issues
Codex flags only P0 and P1 issues by default, which can be adjusted in AGENTS.md.
Slack Integration
Through Slack integration, team members can use Codex directly in channels.
Set Up Slack Integration
- Go to the Codex settings page
- Find the Integrations section
- Add the Slack app
- Authorize access to the Slack workspace
Usage
Use in Slack
In a Slack channel
@
codex review this PR: https:
//
github.com
/
xxx
/
pull
/
123
Explain code
@
codex explain this
function
Assign tasks
@
codex fix the bug
in
auth module
Applicable scenarios
- Quickly get AI assistance during team collaboration discussions
- Delegate tasks to remote team members
- Asynchronous work scenarios
Linear Integration
Linear is a project management tool, and Codex can work with it to handle Issues.
Set Up Linear Integration
- Go to the Codex settings page
- Add Linear integration
- Authorize access to the Linear workspace
- Configure Issue handling rules
Use Cases
| Scenario | Description |
|---|---|
| Issue Handling | Automatically create code changes based on Issues |
| Review Result Sync | Add review findings to Issues |
| State Update | Automatically update Issue status |
| Comment Replies | @codex in Issue comments |
MCP(Model Context Protocol)
MCP is the protocol that connects Codex with external tools.
MCP Overview
- STDIO Server: a local process that communicates via standard input and output
- HTTP server: a remote server that communicates via HTTP API
Configure MCP servers
MCP Configuration
~/.codex/config.toml
STDIO Server
[mcp_servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "./docs"]
HTTP server
[mcp_servers.api]
url = "https://api.example.com/mcp"
bearer_token_env_var = "API_TOKEN"
Common MCP servers
| Server | Function |
|---|---|
| filesystem | File system access |
| github | GitHub API |
| postgres | PostgreSQL database |
| fetch | Web Scraping |
| openai-docs | OpenAI documentation |
MCP tool permissions
Tool permission configuration
Tool allowlist
[mcp_servers.filesystem]
enabled_tools = ["read_file", "write_file"]
Tool denylist
disabled_tools = ["delete_file"]
Tool approval mode
[mcp_servers.filesystem.tools.write_file]
approval_mode = "ask" # ask | approve | deny
OAuth Authentication Configuration
Some MCP servers require OAuth authentication:
OAuth Configuration
[mcp_servers.figma]
url = "https://api.figma.com/mcp"
scopes = ["file:read"]
oauth_resource = "codex-integration"
OAuth callback port
mcp_oauth_callback_port = 8080
Credential storage
mcp_oauth_credentials_store = "keyring"
Common questions
Q: What plan is required for GitHub integration?
A Codex Cloud subscription (Plus or above) is required.
Q: Can I limit the repositories Codex can access?
You can selectively authorize repositories in the settings.
Q: How are MCP servers installed?
Most MCP servers are installed via npm, and Codex manages them automatically.
Q: Are other integrations supported?
Codex continues to add new integrations; keep an eye on official updates.