Codex
Connect OpenAI's Codex to Ainecto via MCP.
Add the Ainecto MCP server
Codex reads MCP server configuration from ~/.codex/config.toml:
[mcp_servers.ainecto]
url = "https://ainecto.com/mcp"
Restart Codex. The first tool call against Ainecto triggers the OAuth flow — sign in and approve.
Codex's MCP support changes; consult the Codex docs for the current configuration format if needed.
Try it
Inside a Codex session:
List my Ainecto ERD documents.
In ERD document <uuid>, add a posts table with columns: id (bigint pk auto), title (varchar 255 not null), body (text), author_id (bigint fk users.id), created_at (timestamp default now).
Codex will call the appropriate Ainecto MCP tools and produce a snapshot tagged with your description.
Tips
- Be explicit about the ERD document - pass the UUID (or unambiguous title) so Codex doesn't have to guess.
- Always include a description — every write tool requires it; a good description makes version history readable.
- Check version history — every MCP write creates a snapshot you can restore.
Troubleshooting
Codex doesn't show Ainecto tools Re-check the config file location and TOML syntax. Codex must be restarted after editing config.
OAuth flow doesn't open Copy the URL from the terminal and open it manually.
Permission denied Confirm your Ainecto account can edit the target document. MCP write tools respect the same role model as the web app - see Concepts -> Permissions.