ChatGPT and Codex CLI handle two complementary halves of quantitative investment work. ChatGPT is fast for conversational screening, framing hypotheses, and reviewing tear-sheet tradeoffs. Codex CLI shines when you are iterating directly on Python strategy files, writing reusable optimizers, or scripting CLI/API checks in a local repository.
Because both connect to the same remote ENSEMBLE MCP server (https://api.ensemble.markets/mcp), a model you draft in ChatGPT is immediately inspectable from Codex CLI, the web workspace, and the REST API.
Connecting ChatGPT vs. Codex CLI
Option 1: ChatGPT (Official plugin directory)
ENSEMBLE is published in the U.S. ChatGPT plugin directory (version 2.0.0; host plan and workspace settings apply). Visit the ChatGPT connection guide or follow three steps:
- Open ENSEMBLE in the ChatGPT plugin directory and select Install plugin.
- Sign in to your intended ENSEMBLE account via OAuth when prompted.
- Start a conversation and ask ChatGPT to confirm your connected ENSEMBLE account and available credit before building or running anything.
Option 2: Codex CLI (Terminal OAuth MCP)
If you work in the terminal with OpenAI Codex CLI, connect ENSEMBLE with two documented OAuth commands:
codex mcp add ensemble --url https://api.ensemble.markets/mcp
codex mcp login ensemble
Complete the OAuth sign-in flow in the browser window that opens, then launch Codex. Discover available tools directly from the connected MCP server rather than hardcoding a tool count.
Four high-signal workflows in ChatGPT and Codex
| Workflow | Best client | What the agent executes via ENSEMBLE |
|---|---|---|
| ETF structure screening | ChatGPT | Queries list_assets and get_asset for tax form, reset cadence, exposure components, and prospectus citations |
| Rapid strategy prototyping | ChatGPT | Checks data coverage and credit, creates a model with declared inputs_schema, and inspects baseline metrics |
| Custom Python & optimizer authoring | Codex CLI | Edits local strategy or optimizer Python, calls create_model with validate_only=true (free) before spending build credit |
| Matched-window sensitivity sweeps | Either | Runs isolated tests (intent=test) varying one input at a time, then summarizes compare_runs over identical dates |
Guardrails for safe agentic research
Follow three operational habits whenever working with ChatGPT or Codex on portfolio models:
- Confirm the workspace first. Start every session by confirming
get_profile/get_accountso you know which account and spending cap are active. - Validate before spending. When supplying Python strategy code from Codex, run free
validate_onlychecks to verify imports, runtime contract, andinputs_schemabefore launching a metered build. - Keep tests separate from live defaults. Always ask the agent to run variations with
intent=testand inspectcompare_runsover matched dates before promoting a run or changing a scheduled model.
Connect ChatGPT or Codex now
Use the starter request below to connect your client, confirm your workspace, and build your first saved allocation model with explicit inputs and retained runs.
Use ENSEMBLE to confirm my connected account. Help me turn an investment idea into a saved allocation model. Establish the universe, rules and inputs with me, check data coverage and available credit, then build it and explain the saved results.
Frequently asked questions
- How do I install ENSEMBLE inside ChatGPT?
- Open ENSEMBLE in the U.S. ChatGPT plugin directory (v2.0.0), choose Install plugin, and sign in to your ENSEMBLE account via OAuth. Account and workspace access settings in ChatGPT control plugin availability. See /chatgpt for the current directory link and setup steps.
- How do I connect ENSEMBLE to OpenAI's Codex CLI?
- Run `codex mcp add ensemble --url https://api.ensemble.markets/mcp` followed by `codex mcp login ensemble` in your terminal, complete the browser OAuth sign-in, and start a Codex session. Both ChatGPT and Codex talk to the same ENSEMBLE workspace.
- Can ChatGPT or Codex place live brokerage trades through ENSEMBLE?
- No. ENSEMBLE is research and allocation infrastructure. Agents can screen assets, build and test models, compare runs, and prepare CSV or broker-format export files (on Business), but ENSEMBLE never connects to a brokerage to submit orders.
- How do I prevent an agent from overwriting my live model defaults during a chat?
- Ask the agent to run parameter variations with test intent (intent=test) and compare them with compare_runs over matching dates. Live defaults only change when you explicitly decide to promote a verified run.
Related
- AI agentsAn MCP server for investment research you can return to.
Give your agent access to asset research, allocation models and saved runs. Work through a supported client while ENSEMBLE keeps the underlying records.
- AI agentsBuild and investigate a portfolio with Claude.
Connect Claude to ENSEMBLE, define a portfolio model, and keep its results available for the next question. Follow the saved 60/40 comparison below.
- AI agentsQuant workflows with Cursor and Claude Code.
Pair Cursor or Claude Code with ENSEMBLE's remote MCP server and CLI to author custom Python strategies, validate free, and maintain reusable optimizers.
- AI agentsRead a saved run via the REST API and CLI.
Fetch metrics, target allocations, look-through trees, and side-by-side run comparisons from ENSEMBLE using the /v1 REST API or ensemble CLI.