Cursor
连接
从终端连接Cursor。传入--help查看Cursor接受的标志。
polylane integration connect --type cursor来自你的Cursor账户的API密钥。
连接Cursor,把自动修复的实现委托给Cursor云端智能体。Polylane调查并提出修复;Cursor在你的GitHub上打开拉取请求。使用你自己的Cursor API访问权限。
设置
- 在Cursor中,进入Settings并创建一个API密钥(以
key_开头)。 - 确保你的目标仓库已连接到你的Cursor账户。
- 把密钥粘贴到Polylane中。
连接后,Cursor成为工作区创建的每个自动修复的执行器。要把自动修复重新路由回Polylane执行器,在Settings中Cursor集成页面上关闭Use Cursor for all autofixes。
你的密钥在存储前加密,智能体永远看不到它。你的Cursor套餐必须包含Cloud Agent访问权限。
Polylane的MCP工具
无需设置:连接Cursor会为工作区配置一个Polylane API密钥,Polylane会把它的MCP服务器添加到它启动的每个Cursor云端智能体。智能体在实现修复时可以查询Polylane(故障、基础设施图、可观测性)。要关闭它,通过集成PATCH API在Cursor集成上设置mcpInjectionEnabled: false。
对于你自己启动的云端智能体,在Cursor仪表盘的Integrations & MCP下添加该服务器:传输方式Streamable HTTP,URL为https://mcp.polylane.com/mcp,请求头Authorization: Bearer <key>,其中密钥来自Polylane的Settings → Coding agents。
断开连接
在Polylane中断开Cursor,然后在Cursor中撤销该API密钥。为MCP访问配置的Polylane API密钥会被自动撤销。
断开连接
断开连接会停止所有同步和检查,并删除Polylane持有的凭据。 Polylane在Cursor中设置的一切也会被移除;不会留下任何东西。
polylane integration disconnect <id>