Connect your AI
Connect to Codex CLI
Ask about any US public company and get the real numbers back — revenue, margins, segments, a decade of history. Your assistant stops hallucinating figures and answers from live, verified data, grounded in what each company actually reported. So you can dig into a business, size it up against peers, and chase any question as far as the filings go — with every number traceable to where it came from.
Codex CLI, OpenAI's terminal coding agent, speaks the Model Context Protocol (MCP), connecting to remote servers so it can pull live fundamentals from OpenCapitalwhile it works. Add the server once and it's available in your terminal from then on.
Fastest way: just ask Codex CLI
Already working in Codex CLI? Skip the steps below. Tell it to connect and it sets everything up for you.
let's connect to opencapital.sh mcpCodex CLI adds the OpenCapital server and opens your browser to approve read-only access. Prefer to wire it up by hand? The full walkthrough is below.
How to connect
Add the OpenCapital MCP server
codex mcp add opencapital --url https://api.opencapital.sh/mcpEither way you need a recent Codex — check with codex --version and update via npm i -g @openai/codex or brew upgrade codexif remote servers aren't picked up. Older builds also require experimental_use_rmcp_client = true under [features].
Authenticate with OpenCapital
codex mcp login opencapitalThe OAuth callback uses localhost, so run this on a machine with a browser. On a headless or SSH session the login can't complete.
Verify the connection
codex mcp listInside the Codex TUI you can also run /mcp to see active servers and their tools.
Now just ask.
You're all set. Open Codex in any project and ask about fundamentals, segments, or peer comparisons — it'll call OpenCapital as needed, right alongside your code.
Codex CLI calls OpenCapital automatically — no special prefix needed.

Try asking
Lives in your terminal
Works with recent Codex builds that support remote MCP servers. Data is read live while you work.
Read-only by design
Exposes read-only research data from public SEC filings. Codex cannot place trades or change any account.
Troubleshooting
My AI doesn't see OpenCapital's tools
@OpenCapital.The sign-in window didn't open
/mcp → Authenticate; in the Codex CLI, run codex mcp login opencapital.It says “needs login” or stopped working
Connection failed or the server is unreachable
https://api.opencapital.sh/mcp, the transport is Streamable HTTP (not stdio), and your client is up to date.Still stuck?
Disclosures
Informational only — not investment advice
OpenCapital provides financial data and research, not recommendations. Nothing here is an offer or personalized investment, legal, or tax advice — do your own research.
Data sources and accuracy
Derived automatically from public SEC filings and other sources; it may contain errors or delays and is provided “as is.” Verify against primary sources — see our methodology.
Read-only access
The OpenCapital MCP server is read-only — it cannot place trades, move money, or modify any account.
Third-party AI clients
Your prompts and the data returned are processed by your AI client (Claude, ChatGPT, Codex, Cursor) under its own terms. AI can be wrong — verify before acting.
Authorization
Connecting grants read access via OAuth; revoke it anytime from your client's settings. Use is governed by our Terms and Privacy Policy.