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

> Add AIsa as a remote MCP server in xAI's Grok Build CLI with one command and a browser sign-in.

Grok Build (the `grok` CLI) connects to remote MCP servers natively. Add the AIsa MCP server and sign in once to let Grok 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
* A terminal on macOS, Linux, or Windows

## 1. Install Grok Build

```bash theme={null}
# macOS / Linux / Git Bash
curl -fsSL https://x.ai/cli/install.sh | bash

# Windows (PowerShell)
irm https://x.ai/cli/install.ps1 | iex
```

Verify the installation:

```bash theme={null}
grok --version
```

## 2. Add the AIsa MCP server

```bash theme={null}
grok mcp add aisa https://mcp.aisa.one/mcp
```

This writes an `[mcp_servers.aisa]` entry to `~/.grok/config.toml`. Pass `-s project` to write to `./.grok/config.toml` instead.

## 3. Sign in

Start `grok`, run `/mcps`, select **aisa**, and press `i` to authenticate. Approve access in the browser; no key needs to be copied.

> [accordion] Use your API key instead of OAuth
>
> For headless environments, export the key and point the server to it. Grok reads the variable at runtime, keeping the key out of the configuration file:
>
> ```bash theme={null}
> export AISA_API_KEY="sk-aisa-..."
> ```
>
> ```toml ~/.grok/config.toml theme={null}
> [mcp_servers.aisa]
> url = "https://mcp.aisa.one/mcp"
> enabled = true
> bearer_token_env_var = "AISA_API_KEY"
> ```
>
> Open a new terminal or `source` your shell profile before starting Grok.

## 4. Verify the connection

```bash theme={null}
grok mcp doctor aisa
```

You should see:

```txt theme={null}
aisa (http: https://mcp.aisa.one/mcp)
  ✓ server started
  ✓ handshake OK
  ✓ 7 tools discovered
```

If you edited the config while Grok was running, run `/mcps` and press `r` to refresh the server list.

## 5. Use AIsa capabilities

Ask Grok 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.
```

Grok searches the AIsa catalog, inspects the matching operation's schema, quotes the exact call with `batch_quote`, then runs it with `batch_use`. Discovery and quotes (`list_categories`, `search`, `get_details`, `batch_quote`) are free; `batch_use` is billed per call.

## Quick reference

| Item | Value |
| - | - |
| Add command | `grok mcp add aisa https://mcp.aisa.one/mcp` |
| Sign in | `/mcps` → **aisa** → `i` |
| Config file | `~/.grok/config.toml` (or `.grok/config.toml` in a project) |
| API key alternative | `bearer_token_env_var = "AISA_API_KEY"` under `[mcp_servers.aisa]` |
| Verify | `grok mcp doctor aisa` |
| Refresh in a running session | `/mcps` → `r` |

## Troubleshooting

| Problem | Fix |
| - | - |
| `grok mcp doctor aisa` reports 401 | Authenticate from `/mcps` with `i`. If using an API key, confirm `echo $AISA_API_KEY` prints your key in the shell launching Grok. |
| Server shows `folder untrusted` | Project-scoped servers require a trusted folder. Add the server without `-s project`, or trust the folder when Grok prompts you. |
| A different `aisa` server appears | Grok also loads MCP servers from `.mcp.json` and Claude or Cursor configurations; the `[mcp_servers.aisa]` entry in Grok's own config takes precedence. |
| AIsa tools missing in the current session | Run `/mcps` and press `r`, or restart your Grok session. |

## Related

> [card] [Use AIsa in Pi](https://aisa.one/docs/guides/tutorials/use-aisa-in-pi.md)
>
> The same MCP setup in the Pi coding agent.

> [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.