Skip to content
Back to skills

Mcp Arch

ASecurity

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"

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentsgo

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add m4stanuj/MAST --skill mcp-arch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mcp Arch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mcp Arch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/m4stanuj-mcp-arch/badge)](https://www.skillsdirectory.com/skills/m4stanuj-mcp-arch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mcp-arch
description: |
  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"
---

## 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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.