The Merge CLI is a lightweight command-line tool for interacting with Agent Handler. It provides semantic tool search, schema inspection, and tool execution — purpose-built for AI coding agents like Claude Code and Cursor that need progressive tool discovery without overwhelming the context window.
Test access keys must be paired with test registered users, and production keys with production users.
Run the interactive setup:
This saves your credentials to ~/.merge/config.json.
Alternatively, set environment variables:
Find tools using natural language:
Output:
Use --no-schema to reduce output size, or --connector slack to filter by connector.
--connector <slug>: Filter search or list results by connector (e.g., slack, jira, github)--no-schema: Omit input schemas from search results to reduce context size--full: Include full schemas when listing tools--max-results <n>: Limit number of search results (default: 2, max: 50)Credentials are resolved in this priority order (highest to lowest):
--api-key, --tool-pack-id, --registered-user-id, --base-urlMERGE_AH_API_KEY, MERGE_AH_TOOL_PACK_ID, MERGE_AH_REGISTERED_USER_ID, MERGE_AH_BASE_URL~/.merge/config.jsonExample config file:
The CLI outputs structured JSON to stdout with hint fields that guide agents on next steps. Warnings go to stderr so they never contaminate the JSON output.
The fastest way to configure your AI agent is the merge setup command:
This automatically:
CLAUDE.md (creates it if it doesn’t exist)Bash(merge *) permission to .claude/settings.jsonSafe to run multiple times — it won’t duplicate content.
This appends merge CLI instructions to your .cursorrules (or creates it if it doesn’t exist).
This appends merge CLI instructions to your AGENTS.md (or creates it if it doesn’t exist) — the cross-tool standard supported by Claude Code, Cursor, Codex, Windsurf, and more.
Once configured, your agent follows this workflow:
merge search-tools "<intent>" — find the right toolmerge get-tool-schema <tool> — get its input parametersmerge execute-tool <tool> '<json_params>' — execute with JSON paramsAll commands return JSON with a consistent structure.
Success:
Error:
Keep your API key secure. Never commit it to version control. Use environment variables or merge configure to store credentials safely.