# Codex + Keel

Add the Keel server to Codex and it can search components, compose and validate strategies in the Keel DSL, and run backtests on real Hyperliquid history — from the session you already have open.

- Client: OpenAI · One command · Terminal
- Endpoint: https://mcp.usekeel.io/mcp
- Guide: https://usekeel.io/agents/codex

## Quick start

1. **Add the Keel server** — One command, no install. The server is the hosted endpoint.

   ```bash
   codex mcp add keel --url https://mcp.usekeel.io/mcp
   codex mcp login keel
   ```

2. **Sign in** — codex mcp login keel. Sign in with your Keel account on the page that opens; there is no API key to paste.
3. **Ask for a strategy** — The first prompt to try. The agent reads Keel's instructions and starts from the strategy-creation skill.

   ```
   Connect to Keel (usekeel.io), then compose a carry strategy and backtest it.
   ```

## What Codex gets

- **26 tools** — The hosted tool list, with schemas your client reads by name.
- **7 skills** — Keel's own method, served to the session as prompts and through keel_help.
- **18 knowledge topics** — The DSL reference and the component knowledge base, attachable to the session.

Verified in Codex: Tools.

## Prompts to try

- Connect to Keel (usekeel.io), then compose a carry strategy and backtest it.
- Search Keel components for a volatility filter and show me how to wire it.
- Fork the Keel library's carry entry and run a backtest on it.
- Read my strategy's memory notes and suggest the next iteration.
- Read https://usekeel.io/agents and tell me what Keel (usekeel.io) is and why I would use it, then walk me through connecting Keel to you here, step by step.

## Troubleshooting

The first request to https://mcp.usekeel.io/mcp answers 401 with sign-in metadata. That is the handshake, not an error: Codex opens the Keel consent page, you approve, and the tools appear in the session. Nothing to install and no API key to paste.

**The tools do not appear after connecting**

The sign-in did not finish. Remove and re-add the connection, then sign in with your Keel account when the consent page opens.

**A tool answers with an authentication error**

Reconnect from your client; its OAuth flow refreshes the token. Nothing to install and no key to paste.

**You want to run the strategy on your account**

The agent builds, tests and reads. When you want to run a strategy on your account, it hands it to the Keel app and you take it from there.

## Docs

- Agent setup: https://usekeel.io/docs/agents/setup
- Agent briefing: https://usekeel.io/agents.md
- All agents: https://usekeel.io/agents

## Related guides

- Claude Code: https://usekeel.io/agents/claude-code
- Claude: https://usekeel.io/agents/claude
- ChatGPT: https://usekeel.io/agents/chatgpt
