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

# Getting Started

> Build on top of crypto with agents powered by Herd's institutional-grade infrastructure. We handle the full operational lifecycle from due diligence to execution and monitoring.

# Herd Agent

Herd connects AI agents to on-chain data and actions through multiple interfaces. Query contracts, decode transactions, analyze wallets, build/simulate actions, and query onchain data — all using natural language.

The MCP server, CLI, and TypeScript SDK all expose the same set of tools and capabilities.

## MCP Install

Add Herd as an MCP server to your AI coding client.

```bash theme={null}
claude mcp add --transport http herd-mcp https://mcp.herd.eco/v1
```

* **Claude Code**: `claude mcp add --transport http herd-mcp https://mcp.herd.eco/v1`
* **Cursor**: Add via Settings → MCP
* **Codex**: Add via MCP configuration

### Authenticate

1. Open **/mcp** in your IDE (Claude, Cursor, or Codex)
2. Find **herd-mcp** in the MCP list
3. Click **Authenticate** to complete the OAuth flow
4. Sign in with your Herd account at [herd.eco](https://herd.eco)

### Manage

```bash theme={null}
# List configured MCPs (Claude Code)
claude mcp list

# Remove
claude mcp remove herd-mcp
```

## CLI Install

Install the [Herd CLI](https://github.com/herd-labs/herd-cli) for terminal-based access to all Herd tools.

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/herd-labs/herd-cli/main/install.sh | bash
```

### Authenticate

```bash theme={null}
herd login
```

This opens a browser for OAuth authentication. On successful login, the CLI automatically provisions an API key stored at `~/.herd/credentials.json`. This API key can also be used with the TypeScript SDK.

### Commands

| Group            | Commands                                                                       | Description                                      |
| ---------------- | ------------------------------------------------------------------------------ | ------------------------------------------------ |
| `herd contract`  | `metadata`, `deployed`, `roles`, `diff`                                        | Contract info, deployments, roles, version diffs |
| `herd tx`        | `query`, `latest`                                                              | Transaction inspection, recent activity          |
| `herd wallet`    | `overview`, `tokens`, `transactions`                                           | Wallet profiling, token activity, tx history     |
| `herd bookmarks` | `list`, `update`                                                               | Manage saved items                               |
| `herd hal`       | `create`, `get`, `search`, `update`, `delete`, `simulate`, `simulate-existing` | HAL actions, adapters, code blocks, collections  |
| `herd docs`      | `read`                                                                         | Read HAL and platform documentation              |

### Output Formats

```bash theme={null}
--format pretty   # Indented JSON (default for TTY)
--format json     # Compact JSON for piping
--format table    # ASCII table for lists
```

## SDK Install

Install the [Herd TypeScript SDK](https://www.npmjs.com/package/@herd-labs/sdk) to integrate Herd tools into your applications.

```bash theme={null}
npm install @herd-labs/sdk
```

### Authentication

Use an API key generated via the CLI (`herd login`) or set the `HERD_API_KEY` environment variable.

```typescript theme={null}
import { HerdSDK } from "@herd-labs/sdk";

const herd = new HerdSDK({
  apiKey: process.env.HERD_API_KEY,
});
```

The SDK provides programmatic access to all the same tools available through the MCP server and CLI.

***

## Capabilities

<CardGroup cols={2}>
  <Card title="Contracts" icon="file-code">
    Fetch metadata, search source code, compare proxy implementations, inspect role topology
  </Card>

  <Card title="Transactions" icon="arrow-right-arrow-left">
    Decode traces, parse logs, track balance changes
  </Card>

  <Card title="Wallets" icon="wallet">
    Detect wallet types, view holdings, list deployments
  </Card>

  <Card title="HAL" icon="code">
    Create and simulate actions, adapters, code blocks, and collections
  </Card>

  <Card title="Bookmarks" icon="bookmark">
    Save and manage wallets, contracts, and transactions
  </Card>
</CardGroup>

## Supported Networks

| Network  | Status    |
| -------- | --------- |
| Ethereum | Supported |
| Base     | Supported |

## Tools Quick Reference

### Contract Tools

| Tool                                                   | Use For                                         |
| ------------------------------------------------------ | ----------------------------------------------- |
| [Contract Metadata](/herd-mcp/tools/contract-metadata) | Contract info, ABI, proxy history, token data   |
| [Code Analysis](/herd-mcp/tools/code-analysis)         | Search contract source code with regex          |
| [Diff Versions](/herd-mcp/tools/diff-versions)         | Compare implementation version upgrades         |
| [Role Topology](/herd-mcp/tools/role-topology)         | Inspect role/permission structure of a contract |

### Transaction Tools

| Tool                                                         | Use For                                   |
| ------------------------------------------------------------ | ----------------------------------------- |
| [Query Transaction](/herd-mcp/tools/query-transaction)       | Decoded traces, logs, balances, transfers |
| [Latest Transactions](/herd-mcp/tools/latest-transactions)   | Recent function/event calls with filters  |
| [Transaction Activity](/herd-mcp/tools/transaction-activity) | Address tx history with filters           |

### Wallet Tools

| Tool                                                     | Use For                                     |
| -------------------------------------------------------- | ------------------------------------------- |
| [Wallet Overview](/herd-mcp/tools/wallet-overview)       | Wallet type, balances, tx count, signers    |
| [Token Activity](/herd-mcp/tools/token-activity)         | Token transfer history for a given position |
| [Deployed Contracts](/herd-mcp/tools/deployed-contracts) | Contracts deployed by an address            |

### Bookmark Tools

| Tool                                   | Use For                             |
| -------------------------------------- | ----------------------------------- |
| [Bookmarks](/herd-mcp/tools/bookmarks) | List, add, edit, remove saved items |

### HAL Tools

| Tool                                                       | Use For                                                 |
| ---------------------------------------------------------- | ------------------------------------------------------- |
| [Actions & Adapters](/herd-mcp/tools/hal-actions-adapters) | Create, search, update, delete HAL actions and adapters |
| [Code Blocks](/herd-mcp/tools/hal-code-blocks)             | Create, update, execute TypeScript code blocks          |
| [Collections](/herd-mcp/tools/hal-collections)             | Organize actions and adapters into collections          |
| [Evaluation](/herd-mcp/tools/hal-evaluation)               | Simulate and test HAL expressions                       |
| [Documentation](/herd-mcp/tools/documentation)             | Read HAL and platform docs                              |
