Migrate from Codex
Section titled “Migrate from Codex”Import your Codex config.toml MCP servers, skills, custom prompts, and global AGENTS.md instructions directly inside the Antigravity App—no CLI commands or manual conversion required.
Import in the Antigravity App
Section titled “Import in the Antigravity App”-
Start the import
Open the Antigravity App and start the built-in migration in any of three ways:
-
From the Home screen: If you selected Software Engineering during onboarding, click Bring over my setup from other Agentic Developer Tools above the composer.
-
Built-in skill: Type
/migrate-agent-settingsin any conversation to run the built-in migration skill. -
Natural language: Ask the agent directly:
Import my setup from Codex into Antigravity.
-
-
Confirm what to import
The agent inspects
~/.codex/and lists what it found by count and name (without printing secret values in chat), along with anything that will be skipped. Before writing any files, confirm:- Whether to import everything or leave specific items out.
- What to name the generated plugin (defaults to
migrated-settings).
-
Finish and configure MCP variables
Antigravity writes
~/.gemini/config/plugins/<plugin-name>/, validatesplugin.jsonandmcp_config.json, and returns a direct link to the plugin in Customizations.- If no variables are needed, the plugin loads automatically and is ready on your next turn.
- If any migrated MCP server uses
bearer_token_env_var,env_http_headers, or${VAR}placeholders, Antigravity declares those entries invariablesand starts the plugin disabled. Open the plugin page, enter the values, and toggle the plugin on.
What migrates automatically
Section titled “What migrates automatically”The Antigravity App’s built-in migrate-agent-settings skill imports everything below into ~/.gemini/config/plugins/<name>/:
| Codex source | Destination in plugin | Conversion details |
|---|---|---|
~/ ([mcp_) | mcp_config.json | Maps command, args, env, cwd, url, http_headers, env_http_headers, and bearer_token_env_var |
~/ | skills/<skill>/SKILL.md | Copies each skill folder whole, including scripts/ and references/ |
~/ | skills/<prompt>/SKILL.md | Converts prompts to /<name> skills and rewrites $ARGUMENTS / $1 |
~/ | rules/codex.md | Adds trigger: always_on frontmatter (up to 24 KB per rule file) |
How Codex config.toml MCP servers convert
Section titled “How Codex config.toml MCP servers convert”Antigravity converts [mcp_servers.<name>] tables from ~/.codex/config.toml into mcp_config.json inside your migrated plugin:
- Stdio servers:
command,args,env, andcwdmap directly. Relative or~/$HOMEcwdpaths are resolved to absolute paths. - Remote HTTP servers:
urlmaps tourl, andhttp_headersmaps toheaders. - Environment-backed headers and bearer tokens: Because plugin MCP configs substitute
${VAR}values from declaredvariablesrather than expanding arbitrary OS environment variables, Codexbearer_token_env_var = "API_TOKEN"becomes"Authorization": "Bearer ${API_TOKEN}"with anAPI_TOKENentry invariables, and eachenv_http_headersentryHeader = "X"becomes"Header": "${X}"plus anXentry invariables.
Before
[mcp_servers.github]
url = "https://api.githubcopilot.com/mcp/"
bearer_token_env_var = "GITHUB_MCP_TOKEN"
[mcp_servers.local_db]
command = "npx"
args = ["-y", "@acme/postgres-mcp"]
cwd = "~/projects/api"
After
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer ${GITHUB_MCP_TOKEN}"
},
"variables": [
{
"name": "GITHUB_MCP_TOKEN",
"title": "GitHub MCP Token",
"description": "Bearer token for the GitHub MCP server"
}
]
},
"local_db": {
"command": "npx",
"args": ["-y", "@acme/postgres-mcp"],
"cwd": "/Users/alex/projects/api"
}
}
}
What does not migrate automatically
Section titled “What does not migrate automatically”- Legacy SSE MCP servers: Servers pointing to a legacy
/sseendpoint without Streamable HTTP are flagged during discovery. Update them to Streamable HTTP or bridge them vianpx -y mcp-remote <url>. - Instruction files larger than 24 KB: Antigravity caps each rule file at 24 KB. If
~/.codex/AGENTS.mdexceeds 24 KB, the agent informs you rather than truncating it so you can split it into smaller rules or skills. - Name collisions: If a Codex MCP server has the same name as an existing Antigravity server, the migrated entry is prefixed (for example,
codex-github).
Disable or revert a migration
Section titled “Disable or revert a migration”Once created, your migrated plugin works in both the Antigravity App and the Antigravity CLI:
- Antigravity App: Open Customizations > Installed to inspect, toggle, configure MCP variables, or uninstall
migrated-settings. - Antigravity CLI: Run
agy plugin listto view staged components,agy plugin disable migrated-settingsto pause it, oragy plugin uninstall migrated-settingsto remove it.
Related documentation
Section titled “Related documentation”- Migrate from Claude Code: Import Claude Code MCP servers, skills, commands, subagents,
CLAUDE.md, and plugins. - Migrate from Cursor: Convert Cursor
.mdcrules andmcp.jsonconfigurations. - Migrate from Gemini CLI: Import Gemini CLI extensions, skills, and MCP servers.
- Plugins, Agent skills, and MCP: Manage and extend your Antigravity setup.