Connect to Codex

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 move fast on what you find — with every number traceable to where it came from.

Codex, OpenAI's coding agent, speaks the Model Context Protocol (MCP), so the IDE extension and app can pull live fundamentals from OpenCapital as you work. Prefer the terminal? Use the Codex CLI guide instead.

How to connect

01

Add the server in Codex

Two interchangeable ways to register OpenCapital — use whichever you prefer.
In the Codex IDE extension (VS Code, Cursor, JetBrains), open the gear menu, choose MCP settings Add server, select Streamable HTTP, name it opencapital (the lowercase id the config key and codex mcp login command both use), and paste the connector URL below.
https://api.opencapital.sh/mcp

Exact menu labels vary by extension version.

02

Authenticate with OpenCapital

Click Authenticate in Codex, or run the command below. Codex opens your browser to sign in (Google) and approve read-only access, then stores the token for you.
codex mcp login opencapital
03

Start asking about stocks

You're all set. Ask Codex about fundamentals, segments, or peer comparisons in any session — it'll call OpenCapital as needed, right alongside your code.

Try these prompts

What's Uber's Mobility take rate over the last 8 quarters?
How does Airbnb's ADR compare across regions?
Show me DoorDash Marketplace GOV every quarter since IPO.
Compare cloud revenue across AWS, Azure, GCP, and Oracle.
Find me 10 large-caps growing revenue over 20% with positive free cash flow and a P/E under 30.
Before Nvidia reports, summarize what their suppliers, hyperscaler customers, and competitors said in their last filings.

Codex calls the OpenCapital tools automatically — no special prefix needed. If it doesn't reach for them, ask it to “use the OpenCapital MCP server”.

Works across every Codex surface

Codex shares one MCP configuration across the IDE extension, app, and CLI — add OpenCapital once and it's available everywhere. Data is read live from the OpenCapital index, so Codex always sees the latest fundamentals and price data.

Read-only by design

The OpenCapital MCP server only exposes read-only stock research data — fundamentals, price performance, and earnings dates derived from public SEC filings. Codex cannot place trades or modify any account state.

Troubleshooting

My AI doesn't see OpenCapital 's tools
Make sure the connector is added andenabled, and that you finished the OAuth sign-in. If it still won't use them, ask it directly to “use the OpenCapital MCP server.” In ChatGPT, start the message with @OpenCapital .
The sign-in window didn't open
Authorization happens in your browser. If it didn't open automatically, allow pop-ups and try again, or copy the URL your client shows and open it manually. In Claude Code, run /mcp and choose Authenticate; in the Codex CLI, run codex mcp login opencapital.
It says “needs login” or stopped working
Sign-in tokens can expire. Re-authorize from your client's connector settings, or remove and re-add the OpenCapital server and sign in again — that resolves most connection issues.
Connection failed or the server is unreachable
Confirm the URL is exactly https://api.opencapital.sh/mcp and that you chose the Streamable HTTP transport (not stdio). Make sure your client is up to date — the older SSE transport is deprecated in favor of HTTP.
Still stuck?
Email support@opencapital.sh and we'll help you get connected.

Disclosures

Informational only — not investment advice

OpenCapital provides financial data and research tools, not recommendations. Nothing surfaced through the MCP server is an offer, solicitation, or recommendation to buy or sell any security, and it is not personalized investment, legal, or tax advice. Do your own research and consider consulting a licensed professional before making decisions.

Data sources and accuracy

Fundamentals are derived from public SEC filings and other third-party sources and processed automatically. Data may contain errors, omissions, or delays and is provided “as is” without warranty of accuracy or completeness. Verify against primary sources before relying on it. See our methodology for how the numbers are built.

Read-only access

The OpenCapital MCP server is read-only. It exposes research data only and cannot place trades, move money, or modify any account — yours or anyone else's.

Third-party AI clients

When you connect an AI client (such as Anthropic Claude, OpenAI ChatGPT or Codex, or Cursor), your prompts and the data returned are processed by that third party under its own terms and privacy policy. OpenCapital does not control and is not responsible for third-party AI behavior, output, or data handling. AI can be inaccurate or incomplete — verify before acting on anything it tells you.

Authorization

Connecting grants your client read access to OpenCapital research data via OAuth. You can revoke that access at any time from your client's connector settings. Use is governed by our Terms and Privacy Policy.