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

# AI & Agents

> Connect your AI to Monaco to trade, analyze markets, or learn how to build.

## Monaco MCP Server

The MCP server works in two modes:

* **Public mode** connects without credentials. Use it for docs search, market discovery, orderbooks, candles, and recent trades.
* **Authenticated mode** connects with `MONACO_PRIVATE_KEY` and `MONACO_CLIENT_ID`. Use it for account context, vault actions, testnet faucet requests, and order management.

<Tabs>
  <Tab title="Claude Code">
    <CodeGroup>
      ```bash Public (read-only) theme={null}
      claude mcp add monaco \
        -e MONACO_NETWORK=staging \
        -- npx -y @0xmonaco/mcp-server
      ```

      ```bash Authenticated theme={null}
      claude mcp add monaco \
        -e MONACO_NETWORK=staging \
        -e MONACO_PRIVATE_KEY=0x... \
        -e MONACO_CLIENT_ID=688a21440e304c06b935f743dae88278 \
        -- npx -y @0xmonaco/mcp-server
      ```
    </CodeGroup>

    Run once in your terminal, then start a new Claude Code session.
  </Tab>

  <Tab title="Claude Desktop">
    <CodeGroup>
      ```json Public (read-only) theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging"
            }
          }
        }
      }
      ```

      ```json Authenticated theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging",
              "MONACO_PRIVATE_KEY": "0x...",
              "MONACO_CLIENT_ID": "688a21440e304c06b935f743dae88278"
            }
          }
        }
      }
      ```
    </CodeGroup>

    Paste into `claude_desktop_config.json`, then restart Claude Desktop.
  </Tab>

  <Tab title="Cursor">
    <CodeGroup>
      ```json Public (read-only) theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging"
            }
          }
        }
      }
      ```

      ```json Authenticated theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging",
              "MONACO_PRIVATE_KEY": "0x...",
              "MONACO_CLIENT_ID": "688a21440e304c06b935f743dae88278"
            }
          }
        }
      }
      ```
    </CodeGroup>

    Paste into `~/.cursor/mcp.json`, then reload Cursor.
  </Tab>

  <Tab title="VS Code">
    <CodeGroup>
      ```bash Public (read-only) theme={null}
      code --add-mcp '{"name":"monaco","command":"npx","args":["-y","@0xmonaco/mcp-server"],"env":{"MONACO_NETWORK":"staging"}}'
      ```

      ```bash Authenticated theme={null}
      code --add-mcp '{"name":"monaco","command":"npx","args":["-y","@0xmonaco/mcp-server"],"env":{"MONACO_NETWORK":"staging","MONACO_PRIVATE_KEY":"0x...","MONACO_CLIENT_ID":"688a21440e304c06b935f743dae88278"}}'
      ```
    </CodeGroup>

    Run once in your terminal, then reload the VS Code window.
  </Tab>

  <Tab title="Codex CLI">
    <CodeGroup>
      ```toml Public (read-only) theme={null}
      [mcp_servers.monaco]
      command = "npx"
      args = ["-y", "@0xmonaco/mcp-server"]

      [mcp_servers.monaco.env]
      MONACO_NETWORK = "staging"
      ```

      ```toml Authenticated theme={null}
      [mcp_servers.monaco]
      command = "npx"
      args = ["-y", "@0xmonaco/mcp-server"]

      [mcp_servers.monaco.env]
      MONACO_NETWORK = "staging"
      MONACO_PRIVATE_KEY = "0x..."
      MONACO_CLIENT_ID = "688a21440e304c06b935f743dae88278"
      ```
    </CodeGroup>

    Add this to `~/.codex/config.toml`, then restart Codex CLI.
  </Tab>

  <Tab title="Windsurf">
    <CodeGroup>
      ```json Public (read-only) theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging"
            }
          }
        }
      }
      ```

      ```json Authenticated theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging",
              "MONACO_PRIVATE_KEY": "0x...",
              "MONACO_CLIENT_ID": "688a21440e304c06b935f743dae88278"
            }
          }
        }
      }
      ```
    </CodeGroup>

    Paste into `~/.codeium/windsurf/mcp_config.json`, then reload Windsurf.
  </Tab>

  <Tab title="Cline">
    <CodeGroup>
      ```json Public (read-only) theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging"
            }
          }
        }
      }
      ```

      ```json Authenticated theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging",
              "MONACO_PRIVATE_KEY": "0x...",
              "MONACO_CLIENT_ID": "688a21440e304c06b935f743dae88278"
            }
          }
        }
      }
      ```
    </CodeGroup>

    Paste into Cline's MCP Servers settings, then reload Cline.
  </Tab>

  <Tab title="Zed">
    <CodeGroup>
      ```json Public (read-only) theme={null}
      {
        "context_servers": {
          "monaco": {
            "command": {
              "path": "npx",
              "args": ["-y", "@0xmonaco/mcp-server"],
              "env": {
                "MONACO_NETWORK": "staging"
              }
            }
          }
        }
      }
      ```

      ```json Authenticated theme={null}
      {
        "context_servers": {
          "monaco": {
            "command": {
              "path": "npx",
              "args": ["-y", "@0xmonaco/mcp-server"],
              "env": {
                "MONACO_NETWORK": "staging",
                "MONACO_PRIVATE_KEY": "0x...",
                "MONACO_CLIENT_ID": "688a21440e304c06b935f743dae88278"
              }
            }
          }
        }
      }
      ```
    </CodeGroup>

    Paste under `context_servers` in Zed's `settings.json`, then reload Zed.
  </Tab>

  <Tab title="Other (JSON)">
    <CodeGroup>
      ```json Public (read-only) theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging"
            }
          }
        }
      }
      ```

      ```json Authenticated theme={null}
      {
        "mcpServers": {
          "monaco": {
            "command": "npx",
            "args": ["-y", "@0xmonaco/mcp-server"],
            "env": {
              "MONACO_NETWORK": "staging",
              "MONACO_PRIVATE_KEY": "0x...",
              "MONACO_CLIENT_ID": "688a21440e304c06b935f743dae88278"
            }
          }
        }
      }
      ```
    </CodeGroup>

    Paste into any MCP client that accepts a standard `mcpServers` JSON block.
  </Tab>
</Tabs>

<Warning>
  Use a dedicated staging key for authenticated agent access. Authenticated mode requires `MONACO_PRIVATE_KEY`, `MONACO_CLIENT_ID`, and an explicit `MONACO_NETWORK`: the server refuses to default an authenticated session to mainnet. During private alpha, request a client ID from Monaco; public testnet and mainnet issuance will be documented with those launches.
</Warning>

## What you can do

In public read-only mode, your AI can search Monaco docs, list trading pairs, resolve a market by symbol, inspect market metadata, fetch candlesticks, read orderbooks, and review recent trades. This is the right mode for market analysis, documentation lookup, app planning, and learning how Monaco works without connecting a wallet.

In authenticated trading mode, your AI can inspect profile and balance context, read movements, simulate fees, place market or limit orders, replace orders, cancel one or many orders, close open positions, approve and move funds through the account vault, check allowances, and request testnet faucet assets. Use this mode when you want an assistant to act through a configured wallet on staging or another selected Monaco network.

## For agents & raw access

* [`/llms.txt`](https://docs.0xmonaco.com/llms.txt) gives agents a compact docs index.
* [`/llms-full.txt`](https://docs.0xmonaco.com/llms-full.txt) gives agents the full docs bundle.
* [REST](/api-reference), WebSocket, and [gRPC](/reference/grpc) APIs are available for direct integrations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.