Browse docs

Codex CLI

Codex CLI is OpenAI's local coding agent. Add AI Accounting as an MCP server so Codex can work with your ledger.

Add the MCP server

bash
# Install Codex CLI (if you haven't)
npm i -g @openai/codex

# Add AI Accounting as an HTTP MCP server with your API key as a header
codex mcp add flywheel \
--url https://ai-accounting-software.vercel.app/mcp \
--header "Authorization: Bearer ak_your_key_here"

# Start Codex
codex

Flag names vary by version

Codex's MCP flags have changed across releases. If --header isn't recognized, check codex mcp add --help for the current way to pass HTTP headers, or fall back to a config-file entry with headers.Authorization. The endpoint URL and the Authorization: Bearer ak_… value stay the same.

Verify

List configured MCP servers:

bash
codex mcp list

flywheel should appear with the accounting tools available. Then ask Codex to, for example, "post a journal entry for $300 of office supplies and show the trial balance." See MCP tools.