Mezcal ExplorerMezcalDocs
QuickstartBuildAgentsReference
Open explorer
Documentation homeQuickstartConceptsMonitor 10 Wallets
BuildAPIAdvanced UtilitiesProtocol RoutesAPI Surface PolicySDKTypeScript SDK

Live reference

Interactive API referenceReference hub
AgentsAgent CLIMCP Quickstart
Reference Catalogs
Docs/Agents

Agents

Use Mezcal with coding agents through the CLI and hosted MCP transport.

API referenceReferenceQuickstartCLI

In this guide

Recommended orderFirst working setupWorking MCP config snippetBest first toolsWhy two paths existWhen not to start here
Loading documentation content…
PreviousTypeScript SDKUse the first-party Mezcal TypeScript client when you want typed explorer reads in application code.NextAgent CLIUse the Mezcal CLI for shell workflows, release validation, and local-first exports.

On this page

Recommended orderFirst working setupWorking MCP config snippetBest first toolsWhy two paths existWhen not to start here
Mezcal ExplorerMezcalDocumentation

One product surface across the explorer, HTTP API, CLI, SDK, and MCP transport. The docs should guide you into the right path instead of behaving like a separate app.

Open explorerAPI referenceBack to top

Agents

Use the Agents lane when a human or model is operating Mezcal through tools instead of raw REST requests.

Mezcal currently exposes two agent-facing paths:

  • CLI path: best for Codex, Claude Code, and local shell workflows
  • MCP path: best for remote clients that speak the Model Context Protocol

Recommended order

  1. Start with the CLI guide
  2. Then move to MCP quickstart if you need remote agent access

First working setup

For most agent users, the shortest path is:

  1. install mezcal
  2. point it at the hosted external /api base
  3. let the client run mezcal mcp serve --transport remote

Shared environment:

export MEZCAL_BASE_URL="https://<your-mezcal-host>/api"
export MEZCAL_API_KEY="mzk_test_your_key_here"
export MEZCAL_CHAIN="SN_MAIN"

Working MCP config snippet

If your agent client wants a JSON config instead of a one-shot command, this is the minimum useful shape:

{
  "mcpServers": {
    "mezcal": {
      "command": "mezcal",
      "args": ["mcp", "serve", "--transport", "remote"],
      "env": {
        "MEZCAL_BASE_URL": "https://<your-mezcal-host>/api",
        "MEZCAL_API_KEY": "${MEZCAL_API_KEY}",
        "MEZCAL_CHAIN": "SN_MAIN"
      }
    }
  }
}

That is the practical parent-page answer for Claude Code, Codex-adjacent setups, Cursor-like MCP clients, and other tool-calling environments.

Best first tools

When you are replacing lightweight chain reads with an agent, start with:

  • status
  • token_total_supply
  • token_balance_of
  • token_transfers

Those give the agent a narrow, typed Mezcal surface before it starts guessing at raw chain structure.

Why two paths exist

They solve different problems:

  • CLI is the fastest and simplest path for power users, local exports, and deterministic terminal workflows
  • MCP is the structured remote contract for tool-calling clients

That separation is intentional. It keeps the local developer flow fast while giving remote agent consumers a safer, more explicit auth and policy boundary.

When not to start here

  • Use the REST API for direct service integrations.
  • Use the SDK for typed application code.
  • Use the CLI when you need explicit commands or local exports more than tool calls.
  • Stay in the explorer app when the job is visual investigation rather than automation.