Setup your agent locally

Connect Agent Handler to a locally running agent via the Merge CLI.

Use the Merge CLI to connect Agent Handler to a locally running agent. The CLI handles authentication and gives your agent access to Agent Handler tools without any manual MCP JSON setup.

1

Install the CLI

Install with pipx:

$pipx install merge-api

Verify your installation:

$merge --version
2

Configure credentials

Run the interactive setup:

$merge configure
3

Log in

Log in with the simplified MCP URL:

$merge login
4

Add Agent Handler MCP to Claude Code

Register the Agent Handler MCP server with Claude Code:

$claude mcp add --transport http agent-handler https://ah-api.merge.dev/mcp
5

Verify the connection

Open Claude Code and run:

/mcp

You should see agent-handler listed under Local MCPs with a connected status.

Claude Code /mcp showing agent-handler connected
6

Authenticate your tools

Select the agent-handler MCP from the list. This opens a browser window where you can authenticate the tools you want your agent to access.

Tool selection screen
7

Use your tools

Ask your agent to perform a task using one of your selected tools. The first time you use a connector, a Magic Link will appear to authenticate it. Once authenticated, your agent can call that tool on your behalf.