AI 服务/Agent
调用 MCP
Changed onAgent 工具的 MCP Streamable HTTP 端点,无状态,响应为 JSON。
可用 X-Api-Key,也可以使用 Authorization: Bearer <API Key>。Key 缺失或无效时不会返回 401,而是降级为匿名会话,只暴露 aitoearn_connection_help。旧地址 POST /api/unified/mcp 会转发到本接口。
post/api/ai/agent/mcp
Request
- Base URLhttps://aitoearn.cn
- AuthAPI key in header X-Api-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
object required
MCP JSON-RPC 请求体。
Response
第三方协议原生响应或 SSE 数据。不使用 AiToEarn 通用响应包裹。
object required
第三方协议原生响应,不使用 AiToEarn 通用响应包裹。
Changes
- info
endpoint added
- info