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

# 通过 MCP 直接调用

> 使用自己的 API Key，在 AI 助手中调用全部 APIstable 公开 API。

## 连接 Codex

在控制台创建 Key，将 `APISTABLE_API_KEY` 配置到 AI 客户端的进程环境（终端 `export` 不会作用于已启动的桌面应用），再运行下方命令注册远程 MCP 服务。不要将密钥写入提示词或代码仓库。

```bash theme={null}
codex mcp add apistable --url https://apistable.ai/mcp --bearer-token-env-var APISTABLE_API_KEY
```

[创建 API Key](https://apistable.ai/console/keys)

## 其他 MCP 客户端

支持 Streamable HTTP 与自定义 Bearer 请求头的客户端，可直接添加 `https://apistable.ai/mcp` 并配置 `Authorization: Bearer YOUR_APISTABLE_KEY`。暂不支持 OAuth 登录或旧版独立 SSE 传输。

## 三个工具覆盖公开 API

| 工具 | 用途 |
| - | - |
| `list_apis` | 简明接口/模型目录与 `revision`。 |
| `get_api` | 读取单个接口完整定义；传 `model_id` 获取指定模型参数与结果 Schema。 |
| `call_api` | 携带你的 Key 调用接口（`operation_id`、`path`、`query`、`body`）。 |

```json theme={null}
{
  "operation_id": "getBalance"
}
```

> 以上为 `call_api` 参数示例。安装和目录查询不会产生费用。

[通用 API](https://docs.apistable.ai/zh/api-directory.md)
[开发接入 Skill](https://docs.apistable.ai/zh/skill.md)


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