搜索

PythonReactSEOPDF
GitHub Skill

mcp-arch

Explain how MCP is wired between OpenWork, OpenCode, and the OpenWork server, and guide config or auth troubleshooting. Triggers when user mentions: - "mcp wiring" - "mcp architecture" - "mcp config"

different-ai☆ 23 仓库 Stars5 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Quick Usage (Already Configured)

Provide wiring overview

  • OpenWork UI uses the OpenCode SDK for runtime MCP calls and events.
  • MCP config lives in opencode.json under mcp; OpenWork server only reads/writes config for remote clients.
  • MCP auth tokens are managed by OpenCode and stored outside the repo.
  • Remote UI traffic hits the OpenWork server at /opencode/*, which proxies to OpenCode.
  • The OpenWork server must include the workspace directory (via x-opencode-directory or directory query) so OpenCode loads the correct config.

Troubleshoot auth errors

  • Confirm the MCP entry type and required fields (local needs command[], remote needs url).
  • If refresh tokens are invalid, re-auth via OpenCode and reload the engine after config edits.
  • Avoid editing token files directly; use OpenCode commands or endpoints.
  • If the UI says "does not support OAuth", verify the directory matches the on-disk opencode.json path.
  • In remote mode, OpenWork approval gates apply for mcp.add and engine.reload unless auto-approve is explicitly enabled.

Common Gotchas

  • Engine reload only re-reads config; it does not refresh OAuth tokens.
  • Remote clients need OpenWork server for config writes, but MCP runtime still routes through OpenCode.
  • macOS can resolve temp paths as /private/tmp/... while config is under /tmp/...; normalize before calling MCP endpoints.

First-Time Setup (If Not Configured)

  1. Add the MCP entry to opencode.json.
  2. Restart or reload the OpenCode engine.
  3. Authenticate the MCP provider via OpenCode.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-03-11
索引更新时间
2026-03-11
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!