> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Connect your agent to AIsa

> Add the AIsa MCP server to Claude Code, Cursor, Codex, or other agents, sign in with browser OAuth, and start using tools. Use the CLI only when MCP cannot run.

**AI agent reading this?** Go to [Agent instructions](#agent-instructions) and run the setup yourself.

AIsa provides a remote MCP server at `https://mcp.aisa.one/mcp`. Authentication uses browser OAuth, so there is no API key to copy.

**1. Add the server**

```bash Claude Code theme={null}
claude mcp add --transport http -s user aisa https://mcp.aisa.one/mcp
```

```bash Codex theme={null}
codex mcp add aisa --url https://mcp.aisa.one/mcp
```

```json Cursor (~/.cursor/mcp.json) theme={null}
{
  "mcpServers": {
    "aisa": { "url": "https://mcp.aisa.one/mcp" }
  }
}
```

```json VS Code (.vscode/mcp.json) theme={null}
{
  "servers": {
    "aisa": { "type": "http", "url": "https://mcp.aisa.one/mcp" }
  }
}
```

For Claude: add a custom connector with `https://mcp.aisa.one/mcp` ([guide](https://aisa.one/docs/guides/tutorials/use-aisa-in-claude.md)). For ChatGPT: install the AIsa GTM plugin ([guide](https://aisa.one/docs/guides/tutorials/use-aisa-in-chatgpt.md)).

**2. Sign in**

Your MCP client opens a browser window; click **Allow** to complete OAuth. In Claude Code, run `/mcp`, select **aisa**, and authenticate. In Cursor, open **Customize** → **MCPs** and click **Authenticate** on **aisa**.

**3. Ask your agent**

Paste this into your agent chat:

```txt wrap theme={null}
Use AIsa to check my account, then find three recent public updates about a company of your choice with source links. Ask me before any paid call.
```

Prefer to let the agent do the setup too? Paste `Set up AIsa using https://aisa.one/docs/agent-quickstart.md.` and it follows the instructions below.

## Agent instructions

Set up AIsa. Run the matching commands yourself. Do not ask the user to run them — except when a sandbox or a denied write blocks you: then relay the exact steps and wait.

Reuse a working connection: an authorized AIsa MCP server at `https://mcp.aisa.one/mcp` whose tool list includes `search` and `batch_quote`, or an official `aisa` skill plus valid CLI auth. Explicit choice or a still-authorized connection wins; do not migrate or reinstall automatically. Do not change unrelated model settings. Describe installs and credentials as in this agent environment.

Default to native remote MCP at `https://mcp.aisa.one/mcp` (Streamable HTTP, OAuth) whenever this client can add that connector — user-local or cloud, with or without a terminal. A working shell is not a reason to choose the CLI.

Use the CLI only when this client has no MCP mechanism at all, or by explicit user choice. A client without a browser (CI, SSH, container) still uses MCP, with an API key instead of OAuth. These gates and the Node rule in [Use the CLI](https://aisa.one/docs/get-started/cli.md) take precedence over any installed `aisa` skill; the skill covers follow-up operations only.

### MCP (default)

Connect `https://mcp.aisa.one/mcp` (Streamable HTTP, OAuth). No CLI, npm, npx, or Skill install is required; already-installed guidance may be used. The client owns browser sign-in and tokens. Use this client's own MCP mechanism, not a hand-edited config file of another tool:

* Claude Code: `claude mcp add --transport http -s user aisa https://mcp.aisa.one/mcp`
* Codex: `codex mcp add aisa --url https://mcp.aisa.one/mcp` (Codex starts OAuth on its own)
* Cursor / VS Code: a `url` entry for `https://mcp.aisa.one/mcp` in the MCP config

If this client cannot open a browser (CI, SSH, container), send `Authorization: Bearer $AISA_API_KEY` instead of OAuth (Claude Code: `--header "Authorization: Bearer $AISA_API_KEY"`; Codex: `--bearer-token-env-var AISA_API_KEY`). If `AISA_API_KEY` is not set, ask the user to create a key at [console.aisa.one/api-keys](https://console.aisa.one/api-keys) and set it in the environment; never ask them to paste it into chat. Never print, log, or commit the key.

Add the connector, then let the user finish OAuth in the browser (skip this when the client sends `AISA_API_KEY`). If this client supports MCP but you cannot add the connector from here — unknown capability, sandbox, or permission denied — do not switch to the CLI: ask the user to enable or add the connector, then wait. If the client must reload or start a new session to load the connector, tell the user; verify the tools afterwards, and do not switch to the CLI meanwhile.

Grok Bot + Plugins: Settings → Plugins → Add → auth if asked → `@` attach. If a native custom MCP setup exists, enter that URL and complete OAuth. If neither is available, ask the user to enable or add the connector. grok.com (`grok.com/connectors`) is a different product.

Then work with those tools: `search` (describe the task; reuse its `session_id`) → `get_details` (also served as `batch_get_schema`) when a result lacks the full schema → `batch_quote` with the exact calls → `batch_use` with the same calls, up to 20 per batch. `search`, `list_categories`, `get_details`, and `batch_quote` are free; `batch_use` is billed per call. `use` is the older single-call form, kept for existing clients; here it is only needed for the free `account` check below. Take tool names and arguments from `search` or `get_details`; do not invent names or prices. Spending approval and error handling (`401`, `402`, `429`) follow sections 4 and 5 of [the agent setup guide](https://aisa.one/llms.txt).

### CLI (only when MCP cannot run here)

Follow [Use the CLI](https://aisa.one/docs/get-started/cli.md): its gate, Node.js rule, skill install, and sign-in. Do not work around a missing prerequisite or a denied write.

### Finish

**AIsa is connected.** only after valid authentication (OAuth, or the existing `AISA_API_KEY` sent as a Bearer token) plus a successful free protected call — MCP `use` with `operation_id` `account`, which returns the key, balance, and usage — or `aisa balance` (CLI). Tool metadata or a `401` is not a protected call. A missing connector is not connected. Then continue a named task, or ask **What would you like to do first?** CLI follows the `aisa` skill; MCP uses those tools. Setup is not spend approval.

Do not jump to HTTP to bypass missing credentials, exhausted credit, or the same API outage. Do not make paid calls to test availability. Do not extract client-owned MCP OAuth tokens.

Only if CLI and MCP are both unavailable, HTTP works, and a valid AIsa key already exists: read the direct HTTP section of [Use the CLI](https://aisa.one/docs/get-started/cli.md#direct-http-fallback) (endpoint docs, pricing, approval XML) before a paid proposal, cost approval, or paid request. Extra models, REST, keys, or skills: [AIsa docs](https://aisa.one/docs).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.