# Merget in other agents

Step 2 of https://sema.merget.ai/agent-setup/prompt.md, for every agent without a page of its own: Amp, Warp, OpenCode, Cline, Zed, JetBrains Junie, Goose, Factory Droid and the rest. Run the commands yourself; the human signs in. When `merget_status` is among your tools, continue at the prompt's step 3.

## Install

Merget is a remote MCP server, `merget` at `https://sema.merget.ai/mcp` (streamable HTTP, OAuth sign-in, no API key), plus skills. Add the server with the client's own command where it has one, else with the generic one, and choose one route only: a plugin and a hand-added server at the same URL list every tool twice.

- Amp: `amp mcp add merget https://sema.merget.ai/mcp`; Amp opens the sign-in page when the server starts.
- Warp: Settings › Agents › MCP servers › + Add, paste `{"mcpServers": {"merget": {"url": "https://sema.merget.ai/mcp"}}}`; or the same in `~/.warp/.mcp.json`. The first start opens the browser.
- OpenCode: under `"mcp"` in `opencode.json` (the project) or `~/.config/opencode/opencode.json`: `"merget": {"type": "remote", "url": "https://sema.merget.ai/mcp", "enabled": true}`, then `opencode mcp auth merget`.
- An agent `npx add-mcp` knows (among them `cline`, `zed`, `junie`, `goose`, `factory-droid`, `windsurf`, `opencode`, `codex` and `claude-desktop`; `npx add-mcp list-agents` prints them all): `npx -y add-mcp https://sema.merget.ai/mcp -a <agent> -g -y`.
- Anything else: the URL in the client's MCP settings, usually as `{"mcpServers": {"merget": {"type": "http", "url": "https://sema.merget.ai/mcp"}}}`; drop `type` if the client rejects it.

Skills (`-a` names the agent as `npx skills` knows it — `amp`, `warp`, `opencode`, `zed`, `codex` and more — and `-g` installs them for every project):

```
npx -y skills add MergetAI/merget-plugin -a <agent> -g -y
```

Not when a plugin ships them already.

## Sign in

The client opens the browser the first time the server connects, or on its login command (`opencode mcp auth merget`). On Merget's sign-in page the human picks the organization and your permissions; logging out and in again changes either.

## Check

List the `merget` server's tools in the client; `merget_status` is the first. If none appear, restart the server or the client and read the client's MCP log.

## Updates

The server needs none. Skills: run the `npx -y skills add` line again.

## Dead ends

- No shell: hand the commands and the JSON to the human.
- `-g` writes under the home directory; the sandbox may ask the human to approve it.
- `invalid_redirect_uri`, "doesn't recognize this application", or a saved connection that stops connecting: stop and point the human to https://sema.merget.ai/orgs/<slug>/docs/mcp.
- A runner that cannot open a browser takes an agent key, below.

## Cloud and headless

Amp Orbs, Warp Oz and other headless or cloud runners cannot sign in through a browser, and a plain URL server with OAuth does not connect there: they take an agent key in the server's `Authorization` header. The human creates one at https://sema.merget.ai/orgs/<slug>/settings/agents › Create agent key (Merget's sign-in page shows it once; you never see it, and it goes in no URL or prompt) and stores it in the runner's secrets as `MERGET_KEY`; the header references that secret the runner's own way:

- Amp Orbs: `.amp/settings.json` › `amp.mcpServers` › `merget` with the `url` and `"headers": {"Authorization": "Bearer ${MERGET_KEY}"}`; the secret under Amp's workspace, project or personal settings.
- Warp Oz: `--mcp` on `oz agent run-cloud`, or `mcp_servers` in the agent config file, with `"headers": {"Authorization": "Bearer {{MERGET_KEY}}"}`; `oz secret create` stores the secret.
- Anything else: the client's `headers` for the server, with its own reference to the secret in place of the key.
