Skip to main content

Herd Agent

Herd connects AI agents to on-chain data and actions through multiple interfaces. Query contracts, decode transactions, analyze wallets, and build HAL expressions — 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.
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

Manage

# List configured MCPs (Claude Code)
claude mcp list

# Remove
claude mcp remove herd-mcp

CLI Install

Install the Herd CLI for terminal-based access to all Herd tools.
curl -fsSL https://raw.githubusercontent.com/herd-labs/herd-cli/main/install.sh | bash

Authenticate

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

GroupCommandsDescription
herd contractmetadata, deployed, roles, diffContract info, deployments, roles, version diffs
herd txquery, latestTransaction inspection, recent activity
herd walletoverview, tokens, transactionsWallet profiling, token activity, tx history
herd bookmarkslist, updateManage saved items
herd halcreate, get, search, update, delete, simulate, simulate-existingHAL actions, adapters, code blocks, collections
herd docsreadRead HAL and platform documentation

Output Formats

--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 to integrate Herd tools into your applications.
npm install @herd-labs/sdk

Authentication

Use an API key generated via the CLI (herd login) or set the HERD_API_KEY environment variable.
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

Contracts

Fetch metadata, search source code, compare proxy implementations, inspect role topology

Transactions

Decode traces, parse logs, track balance changes

Wallets

Detect wallet types, view holdings, list deployments

HAL

Create and simulate actions, adapters, code blocks, and collections

Bookmarks

Save and manage wallets, contracts, and transactions

Supported Networks

NetworkStatus
EthereumSupported
BaseSupported

Tools Quick Reference

Contract Tools

ToolUse For
Contract MetadataContract info, ABI, proxy history, token data
Code AnalysisSearch contract source code with regex
Diff VersionsCompare implementation version upgrades
Role TopologyInspect role/permission structure of a contract

Transaction Tools

ToolUse For
Query TransactionDecoded traces, logs, balances, transfers
Latest TransactionsRecent function/event calls with filters
Transaction ActivityAddress tx history with filters

Wallet Tools

ToolUse For
Wallet OverviewWallet type, balances, tx count, signers
Token ActivityToken transfer history for a given position
Deployed ContractsContracts deployed by an address

Bookmark Tools

ToolUse For
BookmarksList, add, edit, remove saved items

HAL Tools

ToolUse For
Actions & AdaptersCreate, search, update, delete HAL actions and adapters
Code BlocksCreate, update, execute TypeScript code blocks
CollectionsOrganize actions and adapters into collections
EvaluationSimulate and test HAL expressions
DocumentationRead HAL and platform docs