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

# Installation

> Install the Yellow.pro MCP server, register it with your AI agent client, and verify it works.

## Prerequisites

The installer clones over HTTPS and builds locally, so it needs:

* **Node.js 18 or newer**
* **`git`** and **`npm`** on your `PATH`
* **Network access** to GitHub and the npm registry

Relevant for locked-down machines and CI images: the install will fail without a `git` binary or outbound network.

## Install

<Warning>
  This package is **not published to the npm registry**. `npm install -g yellow-pro-mcp` will fail with a 404. Use one of the two paths below.
</Warning>

### Option A — one-line installer

Installs from GitHub and registers with Claude Code in a single step:

```bash theme={null}
curl -fsSL -H 'Accept: application/vnd.github.raw+json' \
  'https://api.github.com/repos/layer-3/yellow-pro-mcp/contents/install.sh?ref=main' | bash && \
  YELLOW_PRO_API_KEY=... YELLOW_PRO_API_SECRET=... YELLOW_PRO_APP_SESSION_ID=... \
  yellow-pro setup claude-code
```

The installer checks the Node version, builds in a temporary directory, installs a packed tarball globally, and cleans up afterwards. If the system npm prefix is not writable, it installs under `~/.local` instead and prints a `PATH` hint.

<Info>
  The repository is public, so installation does not require GitHub credentials. If your environment does not permit `curl | bash`, inspect `install.sh` before running it. Note that credentials passed on the command line land in your shell history.
</Info>

### Option B — local checkout

```bash theme={null}
git clone https://github.com/layer-3/yellow-pro-mcp.git
cd yellow-pro-mcp
npm ci && npm run build
npm install -g .
```

Either path gives you both the `yellow-pro-mcp` server and the `yellow-pro` CLI.

## Register with a client

For Claude Code:

```bash theme={null}
claude mcp add yellow_pro -s user \
  -e YELLOW_PRO_API_KEY=... -e YELLOW_PRO_API_SECRET=... -e YELLOW_PRO_APP_SESSION_ID=... \
  -- yellow-pro-mcp
```

### Setup helpers

| Command                        | What it does                                                                                 |
| ------------------------------ | -------------------------------------------------------------------------------------------- |
| `yellow-pro setup claude-code` | Registers via `claude mcp add` (user scope), passing your current `YELLOW_PRO_*` variables   |
| `yellow-pro setup codex`       | Registers via `codex mcp add`, passing your variables; falls back to a `config.toml` snippet |
| `yellow-pro setup openclaw`    | Writes an `~/.openclaw/openclaw.json` mcpServers entry including your variables              |
| `yellow-pro setup hermes`      | Registers via `hermes mcp add`; falls back to a `config.yaml` snippet                        |
| `yellow-pro setup json`        | Prints generic MCP JSON for any other client                                                 |

<Warning>
  **`hermes` is an exception.** The successful `hermes mcp add` path registers the server **without** passing your credentials, so account tools will fail with a missing-credentials error. Credentials only appear in the fallback YAML snippet, which is printed when the hermes binary is absent. Until this is fixed, add the environment block to your hermes config by hand after running setup.
</Warning>

## Manual configuration

<Tabs>
  <Tab title="Codex CLI">
    Add to `~/.codex/config.toml`:

    ```toml theme={null}
    [mcp_servers.yellow_pro]
    command = "yellow-pro-mcp"
    env = { YELLOW_PRO_API_KEY = "...", YELLOW_PRO_API_SECRET = "...", YELLOW_PRO_APP_SESSION_ID = "..." }
    ```
  </Tab>

  <Tab title="OpenClaw / Claude Desktop / Cursor">
    Add to the client's MCP config (e.g. `~/.openclaw/openclaw.json`):

    ```json theme={null}
    { "mcpServers": { "yellow_pro": { "command": "yellow-pro-mcp", "env": { "YELLOW_PRO_API_KEY": "..." } } } }
    ```
  </Tab>
</Tabs>

## Verify it works

Restart your client first — MCP servers connect at session start.

**1. Confirm the server starts.** This handshake needs no credentials:

```bash theme={null}
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | yellow-pro-mcp
```

A healthy response looks like this — a `serverInfo` block and a clean exit:

```json theme={null}
{"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{"listChanged":true}},
"serverInfo":{"name":"yellow_pro","version":"20260722"},"instructions":"..."},"jsonrpc":"2.0","id":1}
```

**2. Ask your agent for market data.** Something like *"get the BTCUSDT-PERP ticker from Yellow\.pro"*. A good answer returns a live price and 24h figures. This confirms the client is spawning the server and reaching the API — with no credentials involved.

**3. Ask for a balance.** Only once step 2 works. *"What's my Yellow\.pro spot balance?"* exercises your credentials and signature. If step 2 passed and this fails, the problem is credentials, not installation — see [Troubleshooting](/mcp/troubleshooting).

## Update and uninstall

**Update:** re-run the one-line installer, or `git pull` and `npm install -g .` in a local checkout. The server reports a date-based build version in `serverInfo.version`; compare it against the latest commit to tell whether you are current.

**Uninstall:**

```bash theme={null}
npm uninstall -g yellow-pro-mcp
claude mcp remove yellow_pro
```

Remove the `mcpServers` entry by hand for clients configured manually, and revoke the API key if you no longer need it.

## Agent skill (non-MCP agents)

For agents that don't speak MCP, the repository ships an agent skill at `skills/yellow-pro/SKILL.md` that teaches agents to use the `yellow-pro` CLI. Copy it into your agent's skills directory, for example `~/.claude/skills/yellow-pro/`.
