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

# 在 Cursor 中使用 AIsa

> 只需一条配置项并在浏览器中登录，即可在 Cursor 中将 AIsa 添加为远程 MCP 服务器。还可选择将聊天路由至 AIsa 模型。

Cursor 内置了 MCP 客户端。只需将 AIsa 添加为远程 MCP 服务器并完成一次登录，Cursor 的智能体就能发现并调用 AIsa 在网络研究、金融、社交媒体、SEO、销售等领域的各项能力。

AIsa MCP 服务器：

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

## 前提条件

开始之前，请确保你已具备：

* 一个 AIsa 账号（[console.aisa.one](https://console.aisa.one)），通过浏览器登录。
* 已安装 [Cursor](https://cursor.com)

## 1. 添加 AIsa MCP 服务器

**1. 打开 MCPs**

在 Cursor 侧边栏中选择 **Customize**，然后选择 **MCPs**。

**2. 添加服务器**

点击 **New MCP Server**，Cursor 会打开 `~/.cursor/mcp.json`。添加 AIsa 配置并保存文件：

```json theme={null}
{
  "mcpServers": {
    "aisa": { "url": "https://mcp.aisa.one/mcp" }
  }
}
```

如果只想在单个项目中使用 AIsa，把同样的配置写入该项目的 `.cursor/mcp.json`。

## 2. 登录

在 **Customize** → **MCPs** 中，**aisa** 会显示 **Needs authentication**。点击 **Authenticate**，在浏览器中登录 AIsa 并批准访问，无需复制 key。连接就绪后，**aisa** 会出现在 **Connected** 下，并显示已启用的工具数量。

> [accordion] 使用 API key 代替 OAuth
>
> 将 key 作为 Bearer 请求头传入。Cursor 会从启动它的环境中解析 `${env:AISA_API_KEY}`，从而避免将 key 写入配置文件。在 `~/.zshrc` 或 `~/.bashrc` 中添加 `export AISA_API_KEY="sk-aisa-..."`，然后退出 Cursor 并通过新终端运行 `cursor .` 重新打开（从 Dock 启动的应用程序可能无法继承 Shell 环境变量）。未设置该变量时将发送空 token：
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "aisa": {
>       "url": "https://mcp.aisa.one/mcp",
>       "headers": { "Authorization": "Bearer ${env:AISA_API_KEY}" }
>     }
>   }
> }
> ```

> [accordion] Cursor CLI (cursor-agent)
>
> `cursor-agent` 会读取相同的 `mcp.json`。批准该服务器，然后登录：
>
> ```bash theme={null}
> cursor-agent mcp enable aisa
> cursor-agent mcp login aisa
> ```
>
> 运行 `cursor-agent mcp list-tools aisa` 确认工具可用。

## 3. 使用 AIsa 能力

Cursor 的智能体现已获得 AIsa 工具。`search`、`list_categories`、`get_details`、`batch_get_schema` 以及 `batch_quote`（对具体调用报价而不实际运行）均免费；`use` 和 `batch_use` 会执行调用并按次计费。

尝试输入：

```txt theme={null}
使用 AIsa 能力搜索网络，并总结关于 Cursor 的最新信息。
```

## 可选：使用 AIsa 模型

Cursor 还支持兼容 OpenAI 的 API key，因此聊天和智能体请求可以直接使用 AIsa 目录中的模型。这需要 AIsa API key（[console.aisa.one/api-keys](https://console.aisa.one/api-keys)）。

**1. 配置端点**

在 Cursor Settings（齿轮图标）→ **Models** → **API Keys** 中，将你的 AIsa key（`sk-aisa-...`）粘贴到 **OpenAI API Key** 中并开启 **Use OpenAI API Key**。然后开启 **Override OpenAI Base URL** 并输入 `https://api.aisa.one/v1`。

**2. 添加模型**

在同一页面中，点击 **Add Custom Model** 并输入准确的 AIsa 模型 ID，例如 `gpt-5.5`、`kimi-k2.5`、`claude-opus-4-8` 或 `deepseek-v4.1-flash`。启用它们，然后在模型选择器中选取一个。完整列表见[模型目录](https://aisa.one/docs/zh/guides/models.md)。

> [!NOTE]
>
> 自定义 API key 适用于 Cursor 的聊天和智能体请求。Cursor 原生功能（例如 Tab 自动补全）将继续使用 Cursor 自己的模型和订阅。

## 快速参考

| 项目 | 值 |
| - | - |
| MCP 配置 | 在 `~/.cursor/mcp.json` 或 `.cursor/mcp.json` 中配置 `"aisa": { "url": "https://mcp.aisa.one/mcp" }` |
| 添加并登录 | **Customize** → **MCPs** → **New MCP Server**，然后在 **aisa** 上点击 **Authenticate** |
| API key | MCP 无需；无头环境可选用 Bearer 请求头 |
| 可选模型 | **Override OpenAI Base URL** 设为 `https://api.aisa.one/v1`，填入来自[模型目录](https://aisa.one/docs/zh/guides/models.md)的确切 ID |

## 故障排查

| 问题 | 解决方法 |
| - | - |
| **Customize** → **MCPs** 中未列出 **aisa** | 检查 `mcp.json` 是否已保存、是否为有效的 JSON、路径是否正确 |
| 仍显示 **Needs authentication** | 再次点击 **Authenticate**，并在浏览器中完成登录 |
| 聊天中缺少 AIsa 工具 | 在 **Customize** → **MCPs** 中确认 **aisa** 显示的是工具数量，而不是 **Needs authentication** 或 **Error** |
| `cursor-agent` 提示服务器未获批准 | 运行 `cursor-agent mcp enable aisa`，然后运行 `cursor-agent mcp login aisa` |
| 模型请求失败并返回 401 或 404 | 确认 base URL 准确为 `https://api.aisa.one/v1`，且 key 在[控制台](https://console.aisa.one)中有效 |
| “Invalid model” 错误 | 模型名称必须与目录中的 ID 完全一致，且不带 `aisa/` 前缀 |

## 相关

> [card] [在 Claude 中使用 AIsa](https://aisa.one/docs/zh/guides/tutorials/use-aisa-in-claude.md)
>
> 在 Claude 中将 AIsa 添加为自定义连接器。

> [card] [通过 MCP 连接](https://aisa.one/docs/zh/agent-quickstart.md)
>
> 面向其他客户端的 MCP 配置指南。

> [card] [模型目录](https://aisa.one/docs/zh/guides/models.md)
>
> 在添加到 Cursor 之前浏览模型 ID。


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