> ## 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

# Use AIsa in Pi

> Add AIsa as a remote MCP server in the Pi coding agent with one command and a browser sign-in.

Pi has a built-in MCP client. Add AIsa as a remote MCP server, sign in once, and Pi can discover and call AIsa capabilities across web research, finance, social, SEO, sales, and more.

AIsa MCP endpoint:

```txt theme={null}
https://mcp.aisa.one/mcp
```

## Prerequisites

Before you start, make sure you have:

* An AIsa account ([console.aisa.one](https://console.aisa.one)) to sign in through the browser
* [Pi](https://pi.dev) installed with built-in MCP support (verify with `pi mcp --help`)

## 1. Add the AIsa MCP server

```bash theme={null}
pi mcp add aisa \
  --url https://mcp.aisa.one/mcp \
  --description "AIsa capability layer: discover and call APIs across web, finance, social, SEO, sales, and more."
```

This registers the server globally in `~/.pi/agent/mcp.json`. Pass `-l` to register it in the current project's `.pi/mcp.json` instead.

## 2. Sign in

```bash theme={null}
pi mcp login aisa
```

Pi opens your browser. Approve access to complete authentication — no key needs to be copied.

> [accordion] Use your API key instead of OAuth
>
> For headless environments, export the key and add the server with a Bearer token read from the environment so the key never lands in a config file:
>
> ```bash theme={null}
> export AISA_API_KEY="sk-aisa-..."
>
> pi mcp add aisa \
>   --url https://mcp.aisa.one/mcp \
>   --bearer-token-env-var AISA_API_KEY
> ```
>
> Add the `export` command to `~/.zshrc` or `~/.bashrc` so every new terminal session has it.

## 3. Verify and reload

Check the connection:

```bash theme={null}
pi mcp list
```

You should see:

```txt theme={null}
aisa: connected, 7 tools (codemode, global)
  https://mcp.aisa.one/mcp
  tools: list_categories, search, get_details, batch_get_schema, batch_quote, use, batch_use
```

If you added the server from inside an active Pi session, run `/reload` so the session picks up the new tools.

## 4. Use AIsa capabilities

Ask Pi for anything AIsa can fetch, for example:

```txt theme={null}
Use AIsa to check the recent posts of Sam Altman. Ask me before any paid call.
```

Pi searches the AIsa catalog, inspects the matching operation's schema, quotes the call, runs it, and reports the cost. The tools work as follows:

| Tool | What it does | Billing |
| - | - | - |
| `list_categories` | Lists capability categories | Free |
| `search` | Finds operations by natural-language task | Free |
| `get_details` | Returns the full contract (schemas, side effects, pitfalls) for up to 20 tools; also served as `batch_get_schema` | Free |
| `batch_quote` | Prices up to 20 exact calls without running them | Free |
| `batch_use` | Runs up to 20 quoted calls | Billed |
| `use` | Deprecated single-call form | Billed |

## Quick reference

| Item | Value |
| - | - |
| MCP URL | `https://mcp.aisa.one/mcp` |
| Add command | `pi mcp add aisa --url https://mcp.aisa.one/mcp` |
| Sign in | `pi mcp login aisa` |
| API key alternative | `--bearer-token-env-var AISA_API_KEY` on `pi mcp add` |
| Global config | `~/.pi/agent/mcp.json` |
| Verify | `pi mcp list` |
| Load into a running session | `/reload` |

## Troubleshooting

| Problem | Fix |
| - | - |
| `pi mcp list` shows an auth error (401) | Run `pi mcp login aisa`. If using an API key, confirm `echo $AISA_API_KEY` prints your key in the shell launching Pi. |
| AIsa tools missing in the current session | Run `/reload`, or start a new Pi session. |
| `pi mcp` is not a command | Update Pi to a version with built-in MCP support. |
| Want AIsa in one project only | Add the server with `-l`; Pi reads `.pi/mcp.json` only after you trust the project. |

## Related

> [card] [Use AIsa in Claude](https://aisa.one/docs/guides/tutorials/use-aisa-in-claude.md)
>
> Add AIsa as a custom connector in Claude.

> [card] [Authentication](https://aisa.one/docs/guides/authentication.md)
>
> OAuth, API keys, rotation, and storage best practices.

> [card] [Agent Skills](https://aisa.one/docs/agent-skills.md)
>
> Browse the capabilities AIsa exposes to agents.


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