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

# Quickstart

> Get the Yanga Wallet running locally in under 5 minutes

## Prerequisites

<CardGroup cols={2}>
  <Card title="Node.js ≥ 18" icon="node-js" href="https://nodejs.org">
    JavaScript runtime
  </Card>

  <Card title="pnpm" icon="box" href="https://pnpm.io/installation">
    Workspace-aware package manager
  </Card>
</CardGroup>

**Optional:**

* [Rust / Cargo](https://rustup.rs/) — required only for [Kora gasless relay](/infra/kora)
* [Docker](https://www.docker.com/) — required only for [containerized deployment](/infra/docker)

***

## Installation

<Steps>
  <Step title="Clone the repository">
    ```bash theme={null}
    git clone https://github.com/xavierScript/agent-economy-wallet.git
    cd agent-economy-wallet
    ```
  </Step>

  <Step title="Install dependencies">
    ```bash theme={null}
    pnpm install
    ```
  </Step>

  <Step title="Build the workspace">
    ```bash theme={null}
    pnpm build
    ```

    This builds all packages in the correct order: `wallet-core` → `cli` → `mcp-server` → `sdk`.
  </Step>

  <Step title="Configure environment variables">
    ```bash theme={null}
    cp .env.example .env
    ```

    Edit `.env` with your values:

    ```env .env theme={null}
    # Required
    WALLET_PASSPHRASE=your-strong-passphrase-here
    SOLANA_RPC_URL=https://api.devnet.solana.com
    SOLANA_CLUSTER=devnet
    OWNER_ADDRESS=YourBase58PublicKeyHere

    # Economics & Trust
    PROTOCOL_FEE_ADDRESS=YourTreasuryWalletAddress
    PROTOCOL_FEE_BPS=50
    REPUTATION_PROGRAM_ID=A1N2w7TTbQXRcmV3xqq5dqsG6cja1mNmjkKKnKAXxDLz
    ```

    For a full reference of every variable, see the [`.env.guide.md`](https://github.com/xavierScript/agent-economy-wallet/blob/main/.env.guide.md) in the repo root.
  </Step>

  <Step title="Secure your master wallet (recommended)">
    The master wallet automatically funds new agent wallets. Import securely:

    1. Set `MASTER_WALLET_SECRET_KEY` in `.env` with your base58 private key.
    2. Run `pnpm key:import` — the key is encrypted with AES-256-GCM and saved to `~/.agent-economy-wallet/keys/`.
    3. Remove `MASTER_WALLET_SECRET_KEY` from `.env`.
    4. Set `MASTER_WALLET_KEY_LABEL=master-funder` in `.env`.
    5. Clear your shell history (`history -c && history -w` on bash).

    <Warning>
      Never commit private keys to source control. The encrypted keystore is the only safe storage method.
    </Warning>
  </Step>

  <Step title="Start the server">
    ```bash theme={null}
    pnpm start
    ```

    This launches the hybrid MCP/Express server:

    * **MCP transport** on `stdio` — for Claude Desktop, Cursor, VS Code
    * **Express API** on `http://localhost:3000` — for HTTP clients and merchant endpoints
  </Step>
</Steps>

***

## Connect an MCP Client

Point your AI client at the built MCP server. For Claude Desktop, update your config:

<CodeGroup>
  ```json macOS theme={null}
  // ~/Library/Application Support/Claude/claude_desktop_config.json
  {
    "mcpServers": {
      "agent-economy-wallet": {
        "command": "node",
        "args": ["/absolute/path/to/agent-economy-wallet/packages/mcp-server/dist/index.js"]
      }
    }
  }
  ```

  ```json Windows theme={null}
  // %APPDATA%\Claude\claude_desktop_config.json
  {
    "mcpServers": {
      "agent-economy-wallet": {
        "command": "node",
        "args": ["C:\\path\\to\\agent-economy-wallet\\packages\\mcp-server\\dist\\index.js"]
      }
    }
  }
  ```
</CodeGroup>

Restart your MCP client to load the new tools.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="I want to sell services" icon="store" href="/sdk/merchant">
    Set up x402 paywalls, publish your manifest, and register on-chain.
  </Card>

  <Card title="I want to buy services" icon="robot" href="/sdk/buyer">
    Discover merchants, evaluate trust, and pay autonomously.
  </Card>

  <Card title="Run the demo" icon="terminal" href="/demo">
    22 copy-paste prompts to exercise every capability of the system.
  </Card>

  <Card title="Use the SDK in your app" icon="code" href="/sdk/overview">
    Install from npm and embed Yanga Market into your own Node.js app.
  </Card>
</CardGroup>
