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

# Local MCP Server

> Give your AI agent direct, read-only access to 0xinsider intelligence over stdio.

[`@0xinsider/mcp`](https://www.npmjs.com/package/@0xinsider/mcp) is the official local Model Context Protocol server. It exposes the same data as the REST API (trader grades, whale trades, smart-money flow, positions, insider detection) as MCP tools your agent calls directly.

Works with **Claude Code, Cursor, Codex, Gemini CLI**, and any stdio MCP client.

<Note>
  Need a hosted HTTP endpoint instead of a local subprocess? See [Remote MCP](/api-reference/endpoint/remote-mcp).
</Note>

## Install in one command

```bash theme={null}
npx -y @0xinsider/mcp init
```

`init` detects your installed clients and writes the right config in the right place. It asks for your API key once.

Prefer to edit configs by hand? The per-client paths and snippets are below.

## Manual install per client

<Tabs>
  <Tab title="Claude Code">
    `~/.claude/settings.json`

    ```json theme={null}
    {
      "mcpServers": {
        "0xinsider": {
          "command": "npx",
          "args": ["-y", "@0xinsider/mcp"],
          "env": { "OXINSIDER_API_KEY": "oxi_sk_live_..." }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Cursor">
    `~/.cursor/mcp.json` (restart Cursor after saving)

    ```json theme={null}
    {
      "mcpServers": {
        "0xinsider": {
          "command": "npx",
          "args": ["-y", "@0xinsider/mcp"],
          "env": { "OXINSIDER_API_KEY": "oxi_sk_live_..." }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Codex">
    `~/.codex/config.toml`

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

    [mcp_servers."0xinsider".env]
    OXINSIDER_API_KEY = "oxi_sk_live_..."
    ```
  </Tab>

  <Tab title="Gemini CLI">
    `~/.gemini/settings.json`

    ```json theme={null}
    {
      "mcpServers": {
        "0xinsider": {
          "command": "npx",
          "args": ["-y", "@0xinsider/mcp"],
          "env": { "OXINSIDER_API_KEY": "oxi_sk_live_..." }
        }
      }
    }
    ```

    Gemini exposes the tools through `/mcp`.
  </Tab>

  <Tab title="Other clients">
    Any stdio-MCP client works:

    ```bash theme={null}
    OXINSIDER_API_KEY=oxi_sk_live_... npx -y @0xinsider/mcp
    ```

    See all options:

    ```bash theme={null}
    npx -y @0xinsider/mcp --help
    ```
  </Tab>
</Tabs>

## What the server exposes

### Tools (read-only)

| Tool                    | What it does                                                         |
| ----------------------- | -------------------------------------------------------------------- |
| `get_trader`            | Wallet profile: grade, P\&L, win rate, strategy, category strengths. |
| `get_whale_trades`      | Recent large trades, filterable by size, category, grade.            |
| `get_leaderboard`       | Top-ranked traders (S/A/B) with optional category/strategy filter.   |
| `get_positions`         | Current positions across traders or markets.                         |
| `get_position_timeline` | Per-market trader fills with running amount and average entry price. |
| `search_markets`        | Keyword search across prediction markets.                            |
| `explore_markets`       | Browse whale-active markets by category, platform, status.           |
| `get_market_intel`      | Smart-money breakdown for a single market.                           |
| `get_insider_radar`     | Suspicious accumulation and timing patterns.                         |

Every tool advertises `readOnlyHint: true`. The server can't place trades or write data.

### Resources (auto-attached context)

| URI                             | What you get                                      |
| ------------------------------- | ------------------------------------------------- |
| `oxinsider://docs/api`          | Full API reference, ready for the model to read.  |
| `oxinsider://docs/agents`       | Decision tree for agents: when to use which tool. |
| `oxinsider://data/leaderboard`  | Live top 20 traders.                              |
| `oxinsider://data/whale-trades` | Live latest 20 whale trades.                      |

### Prompts (one-shot templates)

| Prompt            | Use when                                                    |
| ----------------- | ----------------------------------------------------------- |
| `analyze_trader`  | You want a full breakdown of a specific wallet.             |
| `market_report`   | You want smart-money flow on a market topic.                |
| `trading_signals` | You want a scan for high-conviction signals across markets. |

## Try it

After install, ask your agent:

* "Who are the top prediction-market traders right now?"
* "What are A-grade or better whales buying in crypto markets today?"
* "Analyze trader `0x863134d00841b2e200492805a01e1e2f5defaa53`. Is their strategy worth following?"
* "Are there suspicious accumulation patterns on the Trump election market?"
* "Show me the position timeline for that whale on the Ethereum market."

The agent picks the right tool and calls it for you.

## Environment variables

| Variable            | Required | What it controls                                    |
| ------------------- | -------- | --------------------------------------------------- |
| `OXINSIDER_API_KEY` | Yes      | Your API key (`oxi_sk_live_...`).                   |
| `OXINSIDER_API_URL` | No       | Override the base URL (mostly for self-hosted dev). |

<Note>
  The MCP server uses your normal API key and shares the 100 req/min rate limit with direct API calls. One key, one budget. Get yours at [0xinsider.com/developers](https://0xinsider.com/developers).
</Note>
