# Agents

## Introduction

Connect Claude, Cursor, or any MCP client to nthbouncer. The assistant can then
find your pools, get a short-lived key, and call your origin through a
concurrency limit. It never receives the origin's credentials.

The MCP URL is:

```text
https://nthbouncer.com/mcp
```

There is no token to paste. You can copy the same URL from **Settings →
Connected agents**. Self-hosted installs use `/mcp` on your own host.

You need an nthbouncer account and at least one pool. If you have none, the
authorization screen tells you to create one first.

## Cursor

Create `.cursor/mcp.json` in the project, or `~/.cursor/mcp.json` for every
project:

```json
{
  "mcpServers": {
    "nthbouncer": {
      "type": "http",
      "url": "https://nthbouncer.com/mcp"
    }
  }
}
```

Save the file. Cursor opens a browser for authorization. Do not add a token or
an `Authorization` header.

You can also paste the URL under **Cursor Settings → Tools & MCP**.

## Claude Code

```bash
claude mcp add --transport http nthbouncer https://nthbouncer.com/mcp
```

The first tool call opens the authorization screen.

## Claude.ai and other clients

Add a custom connector (Claude.ai) or a remote MCP server and paste
`https://nthbouncer.com/mcp`. Any client that speaks streamable HTTP MCP and
OAuth 2.1 will work.

## Approve the grant

Your browser opens nthbouncer. Choose:

- **All pools.** Every current and future pool in this organization. On HTTP
  pools, check **Allow writes** if the assistant may send methods other than
  `GET`, `HEAD`, and `OPTIONS`.
- **Specific pools.** Only the pools you pick. The write opt-in appears per
  HTTP pool.

Database pools have no separate write gate. Writes stay blocked on HTTP unless
you allow them. Prefer leaving writes off unless the work must change data at
the origin.

Click **Allow access**. Review or disconnect later under **Settings → Connected
agents**. Disconnecting takes effect immediately.

One connector authorizes one organization. To connect a second organization,
add the URL as a second connector. Re-adding a connector always shows the
consent screen, so you can widen or narrow the grant without disconnecting
first.

## After you connect

The assistant can list the pools you granted, start and end session keys on
them, and (on a database pool) run the query tools those keys allow. Session
keys default to one hour and to read-only methods.

On a [managed](/docs/credentials) pool, the origin credential is attached at
our edge. The assistant gets a URL and a timer, never the secret. Prefer
managed custody for anything an assistant touches.

See [MCP server](/docs/mcp) for the tools and how session keys work.

If a script or a committed skill should call a pool without MCP, mint a
[pool key](/docs/pools/access) and see
[Reuse one pool across agent runs](/docs/knowledge-base/agent-pools).

## Next steps

- [MCP server](/docs/mcp)
- [Database pools](/docs/pools/database)
- [Give a data team Claude access to Postgres](/docs/knowledge-base/claude-your-warehouse)
- [Reuse one pool across agent runs](/docs/knowledge-base/agent-pools)
- [Control API](/docs/api/control) (CI and scripts, not assistants)
