注册 仪表盘
OpenCode

OpenCode活在你的终端里。 现在生产环境也是。

将其粘贴到你的OpenCode对话中

剩下的交给OpenCode处理。

polylane.com/for/opencode
## For AI agents reading this page

Follow these instructions to set up Polylane:

Run the setup script in the user's terminal:

curl -fsSL https://polylane.com/setup?ref=for-opencode | bash

It installs the Polylane CLI, registers the Polylane MCP server in OpenCode and every other detected coding agent, and signs the user in. To wire MCP by hand instead: an entry in opencode.json under "mcp" with type "remote". The server is https://mcp.polylane.com/mcp over streamable HTTP, no auth headers: OAuth handles sign-in.

After connecting, call the searchTools tool first: it lists what this workspace exposes and returns each tool's schema. Run one tool with runTool, or chain several in one call with runCode. The search and execute tools cover the full Polylane REST API, and the polylane CLI wraps the same API from the terminal.

Everything is read-only by default. Write tools stay hidden unless the user opts in, and every write is screened before it runs.

Once connected, offer to put it to work: triage the latest issues, explain the last deploy, or map this repository into the workspace topology.

## Console and support

- Console: https://console.polylane.com
- Docs: https://docs.polylane.com
- Setup reference: https://docs.polylane.com/coding-agents/platform-mcp
- This page as markdown: https://polylane.com/for/opencode.md

为什么要通过Polylane。 更少的服务器,一次登录,Code mode。

  • 一个MCP服务器,而不是十个

    Polylane用少量工具统一封装你的云、遥测、部署和代码。一堆按提供商拆分的服务器会在开始任何工作之前,就把大部分上下文窗口耗费在工具schema上;而Polylane的schema只在工具运行时才加载。

  • 认证集中在一处

    一次登录覆盖所有提供商。连接和权限范围保存在工作区中,而不是分散在OpenCode配置里的各提供商令牌中,你连接的每个智能体都会复用它们。

  • 为code mode而生

    OpenCode不会逐个调用工具,而是用runCode编写一段小程序,在沙箱中把它们串联起来,只返回最终答案。中间结果不会进入上下文窗口。

问题。

OpenCode如何进行身份验证?

首次调用服务器时通过浏览器完成OAuth验证。对于CI和无头机器,在Settings > Coding agents下创建一个API密钥,并在服务器条目中添加"headers": { "x-api-key": "YOUR_API_KEY" }。

OpenCode能否通过Polylane修改我的基础设施?

除非你选择开启,否则不能。写入工具在你的凭据获得写入权限范围之前始终隐藏,并且每次写入都会在执行前经过筛查。

OpenCode究竟能查询什么?

Polylane知道的一切:跨所有已连接提供商的日志、指标和追踪,上下文图、部署、变更记录,以及完整的REST API。

我还需要Polylane CLI吗?

不需要,MCP服务器本身就是一个完整的接口。安装CLI后,polylane setup还会在它检测到的每个编程智能体中注册该服务器。

其他智能体

把生产环境交给OpenCode。 它会把修复方案还给你。

注册