> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coingecko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Wire CoinGecko into OpenAI's Codex terminal coding agent — MCP server, SKILL, and prompt rules in one place.

[Codex](https://chatgpt.com/codex/) is OpenAI's coding agent available in both terminal and native application for developers to build and ship applications using AI. Plug CoinGecko in through any combination of the three integrations below — they're complementary, not exclusive.

## 1. Install the SKILL

The fastest setup. Gives Codex built-in knowledge of the CoinGecko API so it writes correct requests without you pasting reference docs every session.

<CodeGroup>
  ```bash npm theme={null}
  npx skills add coingecko/skills -g -y
  ```
</CodeGroup>

Full instructions: [SKILL docs](/docs/ai-agent-hub/skills).

## 2. Add the MCP Server

Connects Codex to live CoinGecko data — prices, market caps, onchain pools, OHLCV, NFTs, and more.

Add to your `~/.codex/config.toml` (or project-level MCP config) with the following

<CodeGroup>
  ```bash Keyless theme={null}
  codex mcp add coingecko_mcp -- npx -y mcp-remote https://mcp.api.coingecko.com/mcp
  ```

  ```bash Authenticated (BYOK) theme={null}
  codex mcp add coingecko_mcp -- npx -y mcp-remote https://mcp.pro-api.coingecko.com/mcp
  ```
</CodeGroup>

Full instructions: [MCP Server docs](/docs/ai-agent-hub/mcp-server).

## 3. Add AI prompt rules

If you're generating code that uses the official CoinGecko SDKs, drop our prompt rules into your `AGENTS.md` so Codex follows the right patterns (auth, retries, error handling).

* [Python rules](/docs/ai-agent-hub/python-ai-prompts)
* [TypeScript rules](/docs/ai-agent-hub/typescript-ai-prompts)

## What to try next

Once everything's wired up, try asking Codex:

> *"Using the CoinGecko MCP, show me the top 10 trending pools on Base in the last 5 minutes and export them to CSV."*

> *"Write a Python script using coingecko-sdk that tracks my portfolio and sends me a Slack alert if any coin moves more than 10% in an hour."*

***
