# Set up an agent


# Set up an agent

One `banish init` command wires banish into your agent. Pick yours below. If you
are [hitting Claude Code usage limits too fast](/docs/guides/claude-code-usage-limits),
this is the fix.

## Claude Code

```sh
banish init claude-code
```

This registers a PreToolUse hook so Bash commands are routed through banish
automatically. banish only auto-approves commands your existing permission rules
already allow; state-changing commands still prompt you.

## Cursor

```sh
banish init cursor
```

## Any MCP agent

For any agent that speaks the Model Context Protocol, register banish as an MCP
server:

```sh
banish init mcp
```

Under the hood this points your agent at `banish serve`, which exposes every
verb in your extensions as an MCP tool over stdio. See
[MCP server](/docs/concepts/mcp-server) for what that gives you.

For step-by-step setup in a specific agent, see the integration guides for
[Gemini CLI](/docs/integrations/gemini-cli), [OpenAI Codex](/docs/integrations/codex),
[Windsurf](/docs/integrations/windsurf), [Cline](/docs/integrations/cline), and
[GitHub Copilot](/docs/integrations/copilot).

## What init writes

`banish init` is idempotent and only touches the config for the agent you name.
Re-run it any time to repair the wiring. Each command prints exactly what it
created, so you can see what changed.

> Prefer to wire things by hand? `banish init mcp` writes a `.mcp.json` in the
> current directory with the MCP server config
> (`{"banish": {"command": "banish", "args": ["serve"]}}`) - inspect it or move
> it into your agent's settings yourself.
