# Assistant Protocol Setup

> Connect any compatible assistant client to Aisenhour over Streamable HTTP with OAuth 2.1 or API keys.

Aisenhour provides a remote assistant server over Streamable HTTP at `https://aisenhour.com/api/mcp`.

*Not yet verified*

## Connection Endpoint

- **Streamable HTTP URL:** `https://aisenhour.com/api/mcp`
- **Transport:** HTTP (SSE / Streamable HTTP)
- **Primary Authentication:** OAuth 2.1 with PKCE discovery at `/.well-known/oauth-authorization-server` and `/.well-known/oauth-protected-resource`
- **Fallback Authentication:** Bearer token via `Authorization: Bearer <API_KEY>`

## Discovery and dynamic registration

Compatible assistant clients can automatically discover authentication endpoints and register:
- **Protected Resource Metadata (RFC 9728):** `GET https://aisenhour.com/.well-known/oauth-protected-resource`
- **Authorization Server Metadata (RFC 8414):** `GET https://aisenhour.com/.well-known/oauth-authorization-server`
- **Dynamic Client Registration (RFC 7591):** `POST https://aisenhour.com/api/oauth/register`
- **Authorization Endpoint:** `https://aisenhour.com/api/oauth/authorize` (requires PKCE `S256` code challenge)
- **Token Endpoint:** `https://aisenhour.com/api/oauth/token` (exchanges code or refresh token)
- **Revocation Endpoint:** `https://aisenhour.com/api/oauth/revoke` (revokes tokens)

## Quick Start Configuration

### URL Sign-In (Recommended)

For clients supporting remote URL connection with OAuth 2.1 (such as Cursor or Claude Code):

```json
{
  "mcpServers": {
    "aisenhour": {
      "url": "https://aisenhour.com/api/mcp"
    }
  }
}
```

### Manual API Key Header (Fallback)

For headless runners or clients requiring static header configuration:

```json
{
  "mcpServers": {
    "aisenhour": {
      "url": "https://aisenhour.com/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_AH_LIVE_KEY"
      }
    }
  }
}
```

For clients requiring a local bridge (such as older Claude Desktop installations):

```json
{
  "mcpServers": {
    "aisenhour": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://aisenhour.com/api/mcp",
        "--header",
        "Authorization:${AISENHOUR_AUTH}"
      ],
      "env": {
        "AISENHOUR_AUTH": "Bearer YOUR_AH_LIVE_KEY"
      }
    }
  }
}
```

For terminal testing via official inspector:

```bash
npx @modelcontextprotocol/inspector --transport http --url https://aisenhour.com/api/mcp --header "Authorization: Bearer YOUR_AH_LIVE_KEY"
```

## Available Tools

Aisenhour exposes 14 assistant tools. See the full [API and Tool Reference](/docs/api.md) for argument schemas, limits, and descriptions.

## Plan Access and Pricing
Connecting an external assistant is free on both Free and Pro plans (Free includes up to 25 active tasks, Pro includes unlimited active tasks). Assistants run on your own provider tokens.

## Disconnecting or Rotating Access
You can revoke or rotate your assistant key at any time in Aisenhour Settings > My agents. Revoking an agent immediately invalidates all OAuth tokens and denies subsequent requests.
