# Merget in Replit

Step 2 of https://sema.merget.ai/agent-setup/prompt.md, for Replit Agent. The human does the browser steps; you run what you can inside the Repl. When `merget_status` is among your tools, continue at the prompt's step 3.

## Install

MCP server (`https://sema.merget.ai/mcp`), one click — the human opens https://replit.com/integrations?mcp=eyJkaXNwbGF5TmFtZSI6Ik1lcmdldCIsImJhc2VVcmwiOiJodHRwczovL3NlbWEubWVyZ2V0LmFpL21jcCJ9 (the payload is the base64 of `{"displayName":"Merget","baseUrl":"https://sema.merget.ai/mcp"}`). Replit adds Merget to their integrations and runs the sign-in.

Skills install per Repl, not globally (no `-g`; they land in `.agents/skills`), so run this in every Repl that works with Merget:

```
npx -y skills add MergetAI/merget-plugin -a replit -y
```

## Sign in

The integration's sign-in is Merget's page: the human picks the organization and your permissions. To change either, they remove the integration and add it again.

## Check

Merget's tools, `merget_status` first, appear once the integration is connected; if not, the human reconnects it under their integrations, then starts a new chat.

## Updates

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

## Dead ends

- `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 run with no browser to sign in takes an agent key, created by the human under Settings › Agents, in the server's `Authorization: Bearer` header.
