MCP 工具

AirBuild MCP 服务器的地址、传输方式和协议版本,客户端的 OAuth 登录,以及所有工具都可能返回的错误。

AirBuild MCP 服务器让 MCP 客户端以登录者的身份在 AirBuild 中操作:读取和发送聊天消息、管理团队、操控团队的模拟器,以及处理团队在 App Store 上的 App。本页介绍每个客户端在首次调用工具前需要了解的内容。要在 Claude、ChatGPT、Cursor 或 Codex 中设置,请参阅 MCP 服务器。

服务器网址 https://mcp.air.build/mcp
传输方式 Streamable HTTP:仅 POST
登录 使用 PKCE(S256)的 OAuth 2.1 授权码,签发者为 https://air.build
范围 airbuild(唯一的范围)
协议版本 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26
服务器名称 airbuild(“AirBuild”)

传输方式

  • 每个请求都是一次发往 https://mcp.air.build/mcp 的 POST,携带一条 JSON-RPC 2.0 消息,并带有 Authorization: Bearer <access token>。
  • 服务器是无状态的。它从不签发 Mcp-Session-Id,也没有可以用 GET 打开的流:对服务器网址发起 GET 会返回 405,并带有 Allow: POST, OPTIONS。
  • 批量请求(消息的 JSON 数组)会被拒绝。
  • 通知和响应(没有 id 的消息)会以 202 接受,且没有正文。
  • 如果客户端请求的协议版本是上面四个之一,initialize 就以该版本回答,否则以最新版本(2026-07-28)回答。回答中还带有给模型的简短说明。
  • ping、tools/list 和 tools/call 按 MCP 规范工作。prompts/list、resources/list 和 resources/templates/list 返回空列表。
  • 基于浏览器的客户端可以从任何来源调用服务器(CORS 是开放的,并且暴露了 WWW-Authenticate)。
  • 对 https://mcp.air.build/ 发起 GET 会以 JSON 返回服务器的名称和它的 MCP 网址。

大多数工具以一个 JSON 响应回答。可能耗时数分钟的工具(目前是 wait_message),在请求的 Accept 标头包含 text/event-stream 时,以 Server-Sent Events 流回答:流中每 15 秒有一条保活注释;当有进展且客户端在调用的 _meta 中发送了 progressToken 时,会有一条 notifications/progress 消息;最后是结果。如果 Accept 中没有 text/event-stream,同一个工具会在完成时以普通 JSON 回答。

使用 OAuth 登录

服务器自己不保存任何密钥:客户端让用户在 air.build 上登录,并发送获得的访问令牌。除服务器网址外无需任何配置。支持 MCP 授权流程的客户端会自行完成以下全部步骤:

  1. 客户端在没有令牌或令牌已失效的情况下调用服务器。服务器返回 401,带有 WWW-Authenticate: Bearer resource_metadata="https://mcp.air.build/.well-known/oauth-protected-resource/mcp",正文为 {"error":"invalid_token","error_description":"Sign in to AirBuild to use this connector."}。
  2. 客户端读取该受保护资源元数据(RFC 9728)。其中指明资源 https://mcp.air.build/mcp、授权服务器 https://air.build、范围 airbuild 以及 header bearer 方式。同一份文档也位于 https://mcp.air.build/.well-known/oauth-protected-resource。
  3. 客户端读取 https://air.build/.well-known/oauth-authorization-server(RFC 8414),获取下面的端点。
  4. 没有客户端 ID 的客户端在注册端点自行注册(动态客户端注册,RFC 7591)。
  5. 客户端在浏览器中打开授权端点,带上 response_type=code、它的 client_id 和 redirect_uri、一个 state、一个 PKCE code_challenge 及 code_challenge_method=S256,还可以带上 resource=https://mcp.air.build/mcp 和 scope=airbuild。
  6. 如果用户尚未登录 AirBuild,会先登录,然后看到授权同意页面(见下文)。Allow 会把浏览器带回 redirect_uri,附带 code、state 和 iss=https://air.build;Deny 会带着 error=access_denied 返回。
  7. 客户端在令牌端点用授权码交换令牌(grant_type=authorization_code,附带 PKCE code_verifier),获得访问令牌和刷新令牌。它在每次调用时都以 Authorization: Bearer … 发送访问令牌。
  8. 访问令牌过期后,服务器会再次返回 401,客户端用 grant_type=refresh_token 在令牌端点获取一对新令牌。
端点 地址
授权 https://air.build/oauth/authorize
令牌 https://air.build/oauth/token
注册 https://air.build/oauth/register
撤销 https://air.build/oauth/revoke
元数据字段 值
response_types_supported code
grant_types_supported authorization_code, refresh_token
code_challenge_methods_supported S256(必须提供 challenge)
token_endpoint_auth_methods_supported none, client_secret_post, client_secret_basic
revocation_endpoint_auth_methods_supported none, client_secret_post, client_secret_basic
scopes_supported airbuild
authorization_response_iss_parameter_supported true
  • 令牌、注册和撤销端点只接受 POST,并接受来自任何来源的调用。令牌端点接受表单编码或 JSON 格式的正文。
  • 刷新令牌会轮换:每次刷新都会返回一个新的刷新令牌,客户端必须保存最新的那个。在撤销端点撤销刷新令牌会结束连接。
  • 一个人对每个 App 只有一个连接:再次授权同一个 App 会替换它的令牌。

页面标题为 Allow app name to use AirBuild as you?。页面会写明 App 的名称;对于 AirBuild 尚未验证的 App,会加上“AirBuild has not verified this app.”(已验证的 App 名称旁显示 Verified);页面还会显示浏览器将返回的主机,并说明该 App 将以已登录账户的身份,在此人所在的每个团队中操作,权限与此人在那里的权限相同。airbuild 范围要么全部授予,要么全不授予;它允许 App:

  • 以此人的身份读取和搜索聊天、回应,以及发送消息和文件;
  • 创建、重命名、归档和删除项目及群组聊天,下载项目构建的 App,以及在聊天中添加或移除人和智能体;
  • 雇用、编辑和移除智能体,并管理它们的定时任务;
  • 重命名团队、更改图片、邀请他人、让申请加入的人加入、移除成员,以及查看团队的 AI 用量;
  • 启动和控制团队的模拟器、在上面安装 App 以及录制屏幕;
  • 使用团队拥有者的 Apple 账户访问 App Store Connect。

Use another account 会退出登录并返回登录页面,同时保留请求。Allow 和 Deny 会完成请求。

登录错误

用户或客户端看到的内容 何时出现 怎么办
页面:This sign-in link is incomplete 授权请求缺少必需的参数 从客户端重新开始连接
页面:This sign-in link is too long 授权请求太长,无法在登录过程中保留 用更短的请求重新开始(更少或更短的参数)
页面:This app is not registered with AirBuild 未知的 client_id 先注册客户端(第 4 步),然后重新开始
页面:This app asked to return somewhere unexpected redirect_uri 不是客户端注册过的地址 使用已注册的重定向 URI。这种情况下 AirBuild 从不重定向
页面:This sign-in has expired 从开始到完成超过了 10 分钟,或浏览器丢失了请求 从客户端重新开始
页面:This app is no longer available 客户端已被停用,或它的重定向 URI 已不再注册 重新注册,或联系客户端的开发者
“Another connection was started in this browser, so this page is out of date.” 在另一个标签页中开始了更新的授权 完成最新的那个,或重新开始
带 error=unsupported_response_type 重定向 response_type 不是 code 使用 code
带 error=invalid_request 重定向(“A PKCE S256 code challenge is required.”) 没有 code_challenge,或方法不是 S256 发送 S256 challenge
带 error=invalid_scope 重定向(“The only scope is airbuild.”) 使用了 airbuild 以外的范围 发送 airbuild,或不发送范围
带 error=access_denied 重定向 用户选择了 Deny 无需处理;如果对方本想允许,请再问一次
413 invalid_request(“The request is too large.”) 发送到令牌、注册或撤销端点的正文太大 发送更小的正文
503 temporarily_unavailable 无法连接 AirBuild,或 AirBuild 无法完成请求 稍后再试

断开连接

在“已连接的 App”中断开某个 App(见 MCP 服务器)会立即终止它的访问:它的下一次调用会得到上面的 401。客户端也可以撤销自己的刷新令牌来结束自己的连接。

令牌可以访问的范围

每次调用都以已登录者的身份,在其所属的团队中,以其在那里的权限执行。只有团队拥有者才能执行的操作(例如重命名团队、邀请或移除成员)仍然只限拥有者。此人发送的内容就是他自己的消息,会像他亲自输入一样唤醒团队的智能体。读取不会把任何内容标记为已读。

关于 App Store 工具所使用的 Apple Developer 账户,请参阅 MCP 服务器。

工具

tools/list 返回每个工具的 name、title、description、inputSchema 以及全部四个注解:readOnlyHint、destructiveHint、idempotentHint 和 openWorldHint。在更改前征求确认的客户端会使用这些注解。删除或移除内容的工具带有 destructiveHint: true。

领域 工具
团队和频道 list_teams、list_channels、list_members
消息 read_messages、send_message、react_message、search_messages、wait_message
附件 create_attachment_upload、complete_attachment_upload、get_attachment
项目 list_projects、create_project、rename_project、delete_project
群组聊天 create_group、update_group、delete_group、add_channel_members、remove_channel_member
智能体 list_team_members、list_agent_templates、list_models、hire_agent、update_agent、remove_agent
团队和邀请 rename_team、create_invite、list_invites、revoke_invite、remove_person
图片 start_picture_upload、finish_picture_upload、remove_picture
模拟器 list_simulators、start_simulator、shutdown_simulator、simulator_displays、simulator_heal、simulator_services、simulator_logs
模拟器 App simulator_apps、simulator_install_app、simulator_launch_app、simulator_terminate_app、simulator_uninstall_app、simulator_open_url
模拟器屏幕 simulator_screenshot、simulator_screenshot_3d、simulator_screen、simulator_describe_ui、simulator_find、simulator_wait、simulator_start_recording、simulator_recording_status、simulator_stop_recording
模拟器输入 simulator_tap、simulator_scroll_to、simulator_swipe、simulator_drag、simulator_slider、simulator_adjust、simulator_batch、simulator_type_text、simulator_key、simulator_button、simulator_input
模拟器设置 simulator_appearance、simulator_content_size、simulator_increase_contrast、simulator_read_clipboard、simulator_write_clipboard、simulator_rotate、simulator_fold
App Store App appstore_list_apple_teams、appstore_list_apps、appstore_create_app、appstore_app_status
TestFlight appstore_list_builds、appstore_distribute_build、appstore_list_beta_groups、appstore_create_beta_group、appstore_list_testers、appstore_invite_testers、appstore_remove_testers、appstore_beta_feedback
审核与发布 appstore_prepare_version、appstore_update_app_info、appstore_check_submission、appstore_submit_for_review、appstore_cancel_submission、appstore_release_version、appstore_review、appstore_reply_review、appstore_request_expedited_review
商店信息 appstore_store_listing、appstore_update_store_listing、appstore_screenshots、appstore_upload_screenshots、appstore_delete_screenshots
App 隐私 appstore_privacy、appstore_update_privacy
用户评论与销售 appstore_customer_reviews、appstore_reply_customer_review、appstore_sales

文档本身有一个独立的只读 MCP 服务器,无需登录:见 地址与连接。

结果

工具的结果是一个 JSON 对象,在 tools/call 结果中发送两次:一次作为 content 中的文本,一次作为 structuredContent。显示模拟器屏幕的工具还会返回 image 内容块(PNG 或 JPEG,base64)。拒绝是一个带有 isError: true 的结果,content 中有一句话说明出了什么问题;模型可以读取它并重试。

错误

协议错误

HTTP JSON-RPC 代码 消息 何时出现
400 -32700 The body is not valid JSON. 正文无法解析
400 -32600 Send one JSON-RPC message per request; batches are not supported. 正文是一个数组
400 -32600 Not a JSON-RPC 2.0 message. jsonrpc 不是 "2.0",或缺少 method
200 -32601 Unknown method method. 服务器没有的方法
200 -32602 Unknown tool name. tools/call 指定的工具不存在
200 -32602 arguments must be an object. arguments 是数组或不是对象
401 — invalid_token 没有令牌,或令牌已过期或已断开连接:重新登录(见上文)
404 — Not found 服务器网址和元数据文档以外的任何地址
405 — — 对服务器网址使用 POST 以外的方法

工具错误

每个工具在运行前都会检查参数。以下句子会以工具错误(isError: true)返回,其中 key 会替换为输入的名称:

消息 怎么办
key is required. 发送该输入;字符串不能为空
key must be a string. 发送字符串
key must be a whole number of at least 0. 发送一个非负整数
key must be a list of ids. 发送一个字符串数组
key must be a UUID, from the list tools. 使用列表工具返回的 ID
key is not a valid id. Use one from the list tools. 频道和智能体的 ID 由字母、数字、.、_ 和 - 组成;使用列表工具返回的 ID
key is not a valid id. ID 为空或包含路径分隔符
That id is not valid. Use one from the list tools. 某个 ID 在调用前被拒绝;使用列表工具返回的 ID

AirBuild 拒绝调用时,它自己的句子会作为工具错误返回:每个工具的页面列出了调用方可以处理的错误。任何工具都可能返回的其他错误:

消息 怎么办
AirBuild answered status. Try again in a moment. AirBuild 拒绝了调用但没有给出说明;请重试
AirBuild could not complete this right now. Try again in a moment. AirBuild 端出现故障;请重试
AirBuild refused this call for your connection, though the connection itself is fine. Other tools still work; try again later. 登录有效,但这一次调用被拒绝;重新登录也无济于事
Your AirBuild connection has expired or was disconnected. Connect again. 在耗时较长的调用(wait_message)期间令牌失效;请重新登录