Claude Code, Codex and Gemini CLI: connect a trading MCP
Add Prow's MCP server to Claude Code, Codex or Gemini CLI with a key, keep the key out of your repo, check it works and see what a terminal agent can do.
By the Prow teamPublished Updated 7 min read
On this page
- What can a terminal agent do with Prow?
- What do I need before I start?
- How do I add Prow to Claude Code?
- How do I add Prow to Codex?
- How do I add Prow to Gemini CLI?
- How do I check that it works?
- What should I ask first?
- Why should a terminal agent get a limited key?
- Frequently asked questions
- Can Claude Code place trades through Prow?
- Does Prow work with ChatGPT?
- Where is the key stored on my machine?
- Can I use one key in all three tools?
- What if the tool list is empty?
- Sources
You can connect a terminal coding agent to Prow with one command or one config entry. Claude Code, Codex and Gemini CLI all accept a remote MCP server with a request header, so the server address is https://app.prowdex.com/api/mcp and your Prow key goes in a header named x-api-key. The agent can then read funding and markets on Hyperliquid, Aster and Lighter, look at your bots, build a bot as a draft and hand you a link, and pause or stop bots. It cannot place an order or start a bot. You start every bot in Prow with your own signature.
The setup differs in one thing that matters: where the key ends up on disk. This guide gives the exact steps for each client, shows how to keep the key out of a shared repository, and lists what to ask first. We took the syntax from each tool's own documentation on December 6, 2026.
What can a terminal agent do with Prow?
A coding agent is useful here because it can both talk to Prow and write the script around it. In one session you can ask it to read funding on three venues, pick a coin, build a grid draft with your numbers, and save the result to a file.
What the connection allows depends on the key. A key with See your account and bots reads markets, your Hyperliquid account and your bots. A key with Build, pause and stop your bots also builds drafts of every bot type, copies bots, tightens a running bot's take profit and trailing, and pauses and stops bots. It never places an order, starts a bot or moves money. The concepts page has the full list, and the tool list has the tools by name.
What do I need before I start?
- A Prow key. Open Settings, then AI assistants and API, tap Create key, and choose the permission. Prow shows the key once. Create a key if you have none.
- The agent installed and signed in.
- One key per tool is a good habit. You can have 10 keys, and a log shows which one made each call.
Treat the key like a password. It is made in your browser and Prow stores only a fingerprint, so nobody can read it back to you. If it leaks, revoke it in Settings and it stops within a minute.
How do I add Prow to Claude Code?
Run this in a terminal. Claude Code's documentation shows the --header option for a remote server:
claude mcp add --transport http prow https://app.prowdex.com/api/mcp \
--header "x-api-key: YOUR_KEY"
By default the server is added in the local scope: it is yours, for the current project only, stored in ~/.claude.json and not shared. Check it:
claude mcp list
Inside a session, /mcp shows each server's status, such as Connected or Failed to connect. A wrong key shows there as Failed to connect.
Sharing a setup with a team. Claude Code can write a server into .mcp.json in the project (--scope project), and that file goes into version control. Never put a real key there. Use a variable instead. Claude Code expands ${VAR} in the headers of .mcp.json:
{
"mcpServers": {
"prow": {
"type": "http",
"url": "https://app.prowdex.com/api/mcp",
"headers": { "x-api-key": "${PROW_KEY}" }
}
}
}
Claude Code asks each person to approve a server from .mcp.json the first time, and claude mcp list shows Pending approval until they do. Each person then sets PROW_KEY in their own shell. If the variable is unset, Claude Code sends the literal text ${PROW_KEY} and the connection fails, and claude mcp list warns you.
How do I add Prow to Codex?
Codex reads MCP servers from ~/.codex/config.toml. Its documentation lists env_http_headers, a map from a header name to the name of an environment variable, which keeps the key out of the file:
[mcp_servers.prow]
url = "https://app.prowdex.com/api/mcp"
env_http_headers = { "x-api-key" = "PROW_API_KEY" }
Export the variable in the shell where you start Codex:
export PROW_API_KEY="paste your key here"
codex mcp list
codex mcp list shows the configured servers. Codex's documentation lists no --header option for codex mcp add, so the config file is the way to send a custom header.
How do I add Prow to Gemini CLI?
Gemini CLI's mcp add command takes a transport and a header:
gemini mcp add --transport http --scope user --header "x-api-key: YOUR_KEY" prow https://app.prowdex.com/api/mcp
Look at --scope. Gemini CLI defaults to project, which writes .gemini/settings.json inside the current project, and that file is easy to commit by mistake. --scope user puts it in ~/.gemini/settings.json instead. In a session, /mcp shows the server, its connection status and its tools. Gemini's documentation describes variable expansion for a server's env block, not for headers, so we do not rely on it for the key.
How do I check that it works?
Start the agent and open its MCP list: /mcp in Claude Code and Gemini CLI, codex mcp list in a terminal for Codex. Prow should show as connected, with its tools. A new key can take a few seconds to start working. You can also test the key without any agent, with the standard MCP call:
curl -sS https://app.prowdex.com/api/mcp \
-H "x-api-key: $PROW_KEY" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
A list of tools means the key and the address are right, and the problem is in the client's config. The key page in Prow shows Connected once a client has used the key.
What should I ask first?
Start with reads, then build.
- "Which has the highest ETH funding right now, Hyperliquid, Aster or Lighter?"
- "Show my bots and which of them are paused."
- "Look at SOL on Hyperliquid and design a long grid bot for $100 with 2x leverage at most. Check it with Prow and give me the link."
- "Pause my SOL grid bot."
For the third, the agent reads the market, asks Prow for a live example, checks the settings and saves a draft. You open the link, read the limits and start it yourself. Build a grid bot with an AI assistant walks through that request, and Hyperliquid API trading bot without writing exchange code shows the same flow as a script.
Why should a terminal agent get a limited key?
Because a coding agent reads a lot of text you did not write: files in a repository, web pages, issue comments, package READMEs. Any of it can contain instructions meant for the agent. That is prompt injection, and the agent may follow it. With a key that cannot trade or withdraw, the worst result is a bad draft you never start, or a pause or stop you did not want. With an exchange key that can trade, it could be a position you did not choose.
So keep the key's permission to what the job needs, use See your account and bots while you only read, and read the draft before you press Start. Is it safe to give an AI assistant a trading API key? goes through prompt injection and a checklist. To judge any other MCP server before you connect it, see Hyperliquid MCP server.
Prow's fee applies only to trades a bot makes in Prow and is 0% until Dec 31, 2026, then 0.025% per trade. The connector and the key are free. Your agent's own plan or usage is billed by its maker.
Frequently asked questions
Can Claude Code place trades through Prow?
No. Through Prow it can read, build a bot as a draft with a link, and pause and stop bots. It cannot place or cancel an order, start a bot or withdraw.
Does Prow work with ChatGPT?
Not yet. ChatGPT does not accept an API key header for a custom connector, and Prow's key travels in that header.
Where is the key stored on my machine?
For Claude Code in the local scope, in ~/.claude.json. For Codex with the setup above, only in the environment variable, not in the config. For Gemini CLI in ~/.gemini/settings.json when you use --scope user. In all three the key is in plain text on your disk or in your shell, so protect the machine.
Can I use one key in all three tools?
You can, but one key per tool is better: a leak is then easy to trace and revoke, and the log shows which tool made each call.
What if the tool list is empty?
Check the header name, which is exactly x-api-key, the address, and that the key has not expired or been revoked. Then run the curl check above. If curl works and the agent does not, the client config is the problem.
Sources
Checked December 6, 2026:
- Claude Code documentation: Connect Claude Code to tools via MCP
- Codex documentation: Model Context Protocol
- Gemini CLI documentation: MCP servers
- Prow docs: AI assistants and API keys, API quick start, Errors and limits