Skip to content

Get started - CLI

Use the agent-data CLI to give AI agents access to real-time, structured data. Agents use it to discover endpoints, inspect docs, and call routes directly from the terminal.

Prefer MCP? agent-data is also available as a remote MCP server for Claude, Cursor, ChatGPT, and every other MCP client.

If you’re using an AI agent like OpenClaw, Hermes Agent, or Claude Code, run init and the CLI sets itself up — opens the browser to generate an API key, installs globally, and drops a SKILL.md into every detected agent’s skills directory.

Terminal window
npx -y agent-data init

After installing the skills, you may need to restart your agent or agent gateway for it to discover them.

You can also install the CLI manually:

Terminal window
# Install globally with npm
npm install -g agent-data
Terminal window
# Interactive setup (opens browser, prompts for API key)
agent-data init
# Or set via environment variable
export AGENT_DATA_API_KEY=mtk_YOUR-KEY

Three commands take you from a search query to live data: searchdocscall.

  1. Search across endpoints.

    Terminal window
    agent-data search "restaurant reservations"
    {
    "listings": [
    {
    "id": "e79d7149-781a-482c-b101-0d1e15d29c9c",
    "name": "Restaurant Availability API",
    "short_description": "Real-time restaurant search and reservation availability",
    "published_at": "2026-04-29T19:00:46.649Z"
    }
    ]
    }
  2. Inspect the endpoint’s routes.

    Terminal window
    agent-data docs e79d7149-781a-482c-b101-0d1e15d29c9c
    {
    "listing": {
    "id": "e79d7149-781a-482c-b101-0d1e15d29c9c",
    "name": "Restaurant Availability API",
    "description": "Search restaurants and check real-time reservation availability across OpenTable and Resy..."
    },
    "api": {
    "base_url": "https://e2lceefo2d.execute-api.us-east-2.amazonaws.com/prod",
    "routes": [
    { "method": "GET", "path": "/v1/restaurants/search", "slug": "search-restaurants", "parameters": [ ... ] },
    { "method": "GET", "path": "/v1/availability", "slug": "check-availability", "parameters": [ ... ] }
    ]
    }
    }

    The response lists every route with its slug, parameters, and response schema. Use the slug and relevant parameters to pull data.

  3. Call a route.

    Terminal window
    agent-data call e79d7149-781a-482c-b101-0d1e15d29c9c search-restaurants [--params...]

Every published endpoint follows the same shape.