> For the complete documentation index, see [llms.txt](https://docs.amoeba.farm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amoeba.farm/getting-started/04-claude-code-codex.md).

# Connecting to Claude Code or Codex

MCP is a small local connection between an assistant and Petri. Once it is enabled, Claude Code or Codex can ask Petri for market and oracle information instead of making you copy commands and results into chat.

You do not need to understand MCP, edit a settings file, or run a server command to use it.

## Turn It On

1. Open Petri.
2. From **Home**, open **Connect Claude/Codex**.
3. Select **Enable Petri MCP**.
4. Restart or reload Claude Code or Codex if it is already open.

That is the whole setup. Your choice stays enabled after Petri closes, after the computer restarts, and when you open a different project.

Petri does not install a program that runs all day in the background. Claude Code or Codex starts the local Petri connection when the assistant opens and stops it when the assistant closes.

This setup is for Claude Code and local Codex clients. It does not add Petri to a web-only chat.

## What You Can Ask

Try requests such as:

* "Show me the current RAMX market status."
* "Which monthly contracts can I trade?"
* "Explain why this oracle print moved."
* "Show my public wallet balances and recent Petri history."
* "Prepare this fixed-risk trade for me to review."

The connection can inspect markets, contracts, oracle evidence, balances, history, and drafts. It can prepare unsigned work for your review.

## What It Cannot Do By Default

The Petri MCP connection cannot sign or submit value-moving transactions. It does not put a private key, seed phrase, or wallet file into Claude Code or Codex settings.

Keep those secrets private. Never paste a seed phrase, private key, keypair file, or private API key into a chat.

## Turn It Off

Return to **Home > Connect Claude/Codex** and select **Disable Petri MCP**. Restart or reload an assistant that is already open. Petri removes or disables only its own connection and leaves your other assistant settings alone.

If the page says **Needs repair**, follow the button shown there. Petri may ask you to disable the old connection and enable it again. Then restart or reload the assistant.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amoeba.farm/getting-started/04-claude-code-codex.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
