[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74G8WKTTRCMXAZKH0VREPVR":3,"skill-same:01M74G8WKTTRCMXAZKH0VREPVR":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M74G8WKTTRCMXAZKH0VREPVR","mcp-bridge",null,"Find MCP servers already registered in the CURRENT host agent and map Polymath connector providers onto them instead of installing duplicates.","MohammadBafkar\u002Fpolymath","MohammadBafkar","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34940462?v=4","01M74G540TQFZWK6KVAPKFVGNR","Mohammad Bafkar","01M74G541HG19QP9V5DQCJVKYE",0,"MIT","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-core\u002Fskills\u002Fmcp-bridge\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: mcp-bridge\ndescription: Find MCP servers already registered in the CURRENT host agent and map Polymath connector providers onto them instead of installing duplicates.\n---\n\n# mcp-bridge\n\n> Resolve each Polymath connector provider against MCP servers the user's\n> CURRENT host agent ALREADY has registered. Reuse wins by default: the\n> host's server carries its own auth and tool list, so a polymath duplicate\n> is wasted context at best and a name collision at worst. HOST-ONLY: a\n> server registered in a DIFFERENT agent is not reusable — its tools are not\n> in this session's tool list — so only the current host's configs are\n> scanned, detected from in-session env markers.\n\n**Mode:** deterministic — same inputs, same output. Follow the steps and the output shape exactly; compute with the named script or tool, never by estimate; add nothing the shape does not ask for.\n\n## When to use\n\n- Setting up Polymath in a repo where the agent already has e.g. Datadog or Atlassian MCPs registered.\n- A connector skill failed with a tool error and the user asks which server backs it.\n- The SessionStart hook said \"reusing … MCP server(s)\" and the user wants the full picture.\n- Before registering a polymath connector server into a host config (to avoid a duplicate).\n- To inspect what OTHER agents have registered (diagnostics only — `scan --all-hosts`).\n\n## Inputs\n\n- The provider(s) the user cares about (optional, default: every provider the scan or bindings mention).\n- This session's own tool list — authoritative; the config scan is advisory.\n- `.polymath\u002Fproject.yaml` `mcp:` policy (optional, default `reuse-host`).\n\n## Resolution policy\n\nSet in `.polymath\u002Fproject.yaml` (see docs\u002FMCP-REUSE.md):\n\n```yaml\nmcp:\n  policy: reuse-host          # default — the current host's server wins\n  # serverOverrides: { datadog: dd-prod }   # optional pin (or `plugin`)\n```\n\n- `reuse-host` (default): a server registered in the CURRENT host matching the provider's identity wins; plugins never auto-register anything — with no match the provider resolves to `none`.\n- `prefer-plugin`: the provider's `mcp\u002Fservers.json` template names the intended server (e.g. for version pinning); the host's copy is only usable once registered under that name.\n- A `serverOverrides` value of `plugin` pins the template's server name; any other value pins a current-host server by exact name. A pin that matches nothing resolves to `none` with a note — never a silent fallback.\n\n## Procedure\n\nThe registry CLI ships bundled with this skill at\n`${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\u002Fskills\u002Fmcp-bridge\u002Fscripts\u002Fmcp-registry`.\n\n`scan` works anywhere. `match`, `render`, and `doctor` read every plugin's\n`bindings\u002F\u003Cprovider>\u002Fbinding.json` and `mcp\u002Fservers.json`, so they only see\nproviders when run from a Polymath marketplace checkout (`python3 tools\u002Fmcp-registry.py …`\nat its root). From an installed plugin they report `0\u002F0 provider(s)` — that\nmeans \"bindings not visible here\", **not** \"nothing to reuse\". Never present\nthat line as a resolution.\n\n1. **Check your own tool list first.** It is the authoritative answer: if a\n   server for the provider is loaded (possibly under another name — a claude.ai\n   connector appears as `mcp__claude_ai_\u003CName>__*`), it is reusable. The config\n   scan below can miss servers the host loads from elsewhere.\n2. **Scan the current host's inventory** (redacted — env\u002Fheader values are never printed):\n   ```bash\n   python3 \"${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\u002Fskills\u002Fmcp-bridge\u002Fscripts\u002Fmcp-registry\" scan            # add --json for machine-readable output\n   ```\n   The host is detected from in-session env markers; when detection fails nothing is scanned and every provider resolves to `none` (nothing is reused, nothing is auto-registered). `--all-hosts` inspects other agents' configs — diagnostics only, those servers are not reusable in this session.\n3. **Reconcile providers against the inventory.** In a marketplace checkout run\n   `python3 tools\u002Fmcp-registry.py match` — each `kind=mcp` binding is matched by\n   server-name alias, npm package, or remote URL against the current host only.\n   Elsewhere, match by hand: compare the scan's server names\u002Fpackages\u002FURLs with\n   the provider names the user cares about. Report per provider: **reuse** (host\n   server + scope) or **none** (nothing registered here — do not install without asking).\n4. **Read the session resolution (advisory).** The SessionStart hook may persist\n   `mcpResolution` into the project-context snapshot (located per\n   `polymath-core:project-context`). It is built from the same config scan, so\n   the tool list from step 1 still wins on disagreement.\n5. **If the host has no matching server and the user asks for one**, render a\n   host-correct fragment (marketplace checkout:\n   `python3 tools\u002Fmcp-registry.py render --plugin polymath-observability --target cursor`;\n   otherwise point the user at that plugin's `mcp\u002Fservers.json` template and the\n   vendor's install docs). Fragments reference env vars only — never write a\n   secret into a config. Show the fragment, name the file it belongs in\n   (`.cursor\u002Fmcp.json`, `~\u002F.gemini\u002Fsettings.json`, `~\u002F.codex\u002Fconfig.toml`, …),\n   and let the user apply it.\n6. **Health-check** when something looks off (marketplace checkout:\n   `python3 tools\u002Fmcp-registry.py doctor`): cross-scope duplicate server names,\n   placeholder packages without a host match, reused servers with unset env vars.\n\n## Host config locations\n\n| Host | Project scope | User scope |\n| --- | --- | --- |\n| Claude Code | `.mcp.json` | `~\u002F.claude.json` (user + per-project local) |\n| Cursor | `.cursor\u002Fmcp.json` | `~\u002F.cursor\u002Fmcp.json` |\n| Gemini CLI | `.gemini\u002Fsettings.json` | `~\u002F.gemini\u002Fsettings.json` |\n| OpenCode | `opencode.json(c)` | `~\u002F.config\u002Fopencode\u002Fopencode.json(c)` |\n| Codex | `.codex\u002Fconfig.toml` (trusted) | `~\u002F.codex\u002Fconfig.toml` |\n| VS Code | `.vscode\u002Fmcp.json` | — |\n\n## Quality bar\n\n- Never print or copy env\u002Fheader values — key names only, always.\n- Never write into a host config without showing the fragment first.\n- Only the CURRENT host's servers are reusable; never map a provider onto a server registered in a different agent.\n- Prefer reuse; never register or launch a polymath copy unprompted — the plugin template exists for the opt-in install path only.\n- A `0\u002F0 provider(s)` line from an installed copy is reported as \"bindings not visible\", never as \"no servers to reuse\".\n\n## Output\n\n```text\nprovider                   capability               reuse  host server\ndatadog                    observability            yes    datadog (opencode\u002Fuser, matched by name)\njira                       issue_tracker            yes    atlassian-rovo (cursor\u002Fuser, matched by name)\nslack                      incident_comms           no     (nothing registered in this host — do not install without asking)\n\n2\u002F16 mcp-bound provider(s) resolved from host-registered servers.\n```\n","# mcp-bridge\n\n> Resolve each Polymath connector provider against MCP servers the user's\n> CURRENT host agent ALREADY has registered. Reuse wins by default: the\n> host's server carries its own auth and tool list, so a polymath duplicate\n> is wasted context at best and a name collision at worst. HOST-ONLY: a\n> server registered in a DIFFERENT agent is not reusable — its tools are not\n> in this session's tool list — so only the current host's configs are\n> scanned, detected from in-session env markers.\n\n**Mode:** deterministic — same inputs, same output. Follow the steps and the output shape exactly; compute with the named script or tool, never by estimate; add nothing the shape does not ask for.\n\n## When to use\n\n- Setting up Polymath in a repo where the agent already has e.g. Datadog or Atlassian MCPs registered.\n- A connector skill failed with a tool error and the user asks which server backs it.\n- The SessionStart hook said \"reusing … MCP server(s)\" and the user wants the full picture.\n- Before registering a polymath connector server into a host config (to avoid a duplicate).\n- To inspect what OTHER agents have registered (diagnostics only — `scan --all-hosts`).\n\n## Inputs\n\n- The provider(s) the user cares about (optional, default: every provider the scan or bindings mention).\n- This session's own tool list — authoritative; the config scan is advisory.\n- `.polymath\u002Fproject.yaml` `mcp:` policy (optional, default `reuse-host`).\n\n## Resolution policy\n\nSet in `.polymath\u002Fproject.yaml` (see docs\u002FMCP-REUSE.md):\n\n```yaml\nmcp:\n  policy: reuse-host          # default — the current host's server wins\n  # serverOverrides: { datadog: dd-prod }   # optional pin (or `plugin`)\n```\n\n- `reuse-host` (default): a server registered in the CURRENT host matching the provider's identity wins; plugins never auto-register anything — with no match the provider resolves to `none`.\n- `prefer-plugin`: the provider's `mcp\u002Fservers.json` template names the intended server (e.g. for version pinning); the host's copy is only usable once registered under that name.\n- A `serverOverrides` value of `plugin` pins the template's server name; any other value pins a current-host server by exact name. A pin that matches nothing resolves to `none` with a note — never a silent fallback.\n\n## Procedure\n\nThe registry CLI ships bundled with this skill at\n`${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\u002Fskills\u002Fmcp-bridge\u002Fscripts\u002Fmcp-registry`.\n\n`scan` works anywhere. `match`, `render`, and `doctor` read every plugin's\n`bindings\u002F\u003Cprovider>\u002Fbinding.json` and `mcp\u002Fservers.json`, so they only see\nproviders when run from a Polymath marketplace checkout (`python3 tools\u002Fmcp-registry.py …`\nat its root). From an installed plugin they report `0\u002F0 provider(s)` — that\nmeans \"bindings not visible here\", **not** \"nothing to reuse\". Never present\nthat line as a resolution.\n\n1. **Check your own tool list first.** It is the authoritative answer: if a\n   server for the provider is loaded (possibly under another name — a claude.ai\n   connector appears as `mcp__claude_ai_\u003CName>__*`), it is reusable. The config\n   scan below can miss servers the host loads from elsewhere.\n2. **Scan the current host's inventory** (redacted — env\u002Fheader values are never printed):\n   ```bash\n   python3 \"${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\u002Fskills\u002Fmcp-bridge\u002Fscripts\u002Fmcp-registry\" scan            # add --json for machine-readable output\n   ```\n   The host is detected from in-session env markers; when detection fails nothing is scanned and every provider resolves to `none` (nothing is reused, nothing is auto-registered). `--all-hosts` inspects other agents' configs — diagnostics only, those servers are not reusable in this session.\n3. **Reconcile providers against the inventory.** In a marketplace checkout run\n   `python3 tools\u002Fmcp-registry.py match` — each `kind=mcp` binding is matched by\n   server-name alias, npm package, or remote URL against the current host only.\n   Elsewhere, match by hand: compare the scan's server names\u002Fpackages\u002FURLs with\n   the provider names the user cares about. Report per provider: **reuse** (host\n   server + scope) or **none** (nothing registered here — do not install without asking).\n4. **Read the session resolution (advisory).** The SessionStart hook may persist\n   `mcpResolution` into the project-context snapshot (located per\n   `polymath-core:project-context`). It is built from the same config scan, so\n   the tool list from step 1 still wins on disagreement.\n5. **If the host has no matching server and the user asks for one**, render a\n   host-correct fragment (marketplace checkout:\n   `python3 tools\u002Fmcp-registry.py render --plugin polymath-observability --target cursor`;\n   otherwise point the user at that plugin's `mcp\u002Fservers.json` template and the\n   vendor's install docs). Fragments reference env vars only — never write a\n   secret into a config. Show the fragment, name the file it belongs in\n   (`.cursor\u002Fmcp.json`, `~\u002F.gemini\u002Fsettings.json`, `~\u002F.codex\u002Fconfig.toml`, …),\n   and let the user apply it.\n6. **Health-check** when something looks off (marketplace checkout:\n   `python3 tools\u002Fmcp-registry.py doctor`): cross-scope duplicate server names,\n   placeholder packages without a host match, reused servers with unset env vars.\n\n## Host config locations\n\n| Host | Project scope | User scope |\n| --- | --- | --- |\n| Claude Code | `.mcp.json` | `~\u002F.claude.json` (user + per-project local) |\n| Cursor | `.cursor\u002Fmcp.json` | `~\u002F.cursor\u002Fmcp.json` |\n| Gemini CLI | `.gemini\u002Fsettings.json` | `~\u002F.gemini\u002Fsettings.json` |\n| OpenCode | `opencode.json(c)` | `~\u002F.config\u002Fopencode\u002Fopencode.json(c)` |\n| Codex | `.codex\u002Fconfig.toml` (trusted) | `~\u002F.codex\u002Fconfig.toml` |\n| VS Code | `.vscode\u002Fmcp.json` | — |\n\n## Quality bar\n\n- Never print or copy env\u002Fheader values — key names only, always.\n- Never write into a host config without showing the fragment first.\n- Only the CURRENT host's servers are reusable; never map a provider onto a server registered in a different agent.\n- Prefer reuse; never register or launch a polymath copy unprompted — the plugin template exists for the opt-in install path only.\n- A `0\u002F0 provider(s)` line from an installed copy is reported as \"bindings not visible\", never as \"no servers to reuse\".\n\n## Output\n\n```text\nprovider                   capability               reuse  host server\ndatadog                    observability            yes    datadog (opencode\u002Fuser, matched by name)\njira                       issue_tracker            yes    atlassian-rovo (cursor\u002Fuser, matched by name)\nslack                      incident_comms           no     (nothing registered in this host — do not install without asking)\n\n2\u002F16 mcp-bound provider(s) resolved from host-registered servers.\n```\n",{"name":5,"description":7},"main","23f6e21841a39580c9da2b5ec941f39dda17cd86","plugins\u002Fpolymath-core\u002Fskills\u002Fmcp-bridge","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath","https:\u002F\u002Fgithub.com\u002FMohammadBafkar","2026-10-29 18:34:59",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add MohammadBafkar\u002Fpolymath --skill mcp-bridge",{"tool":36,"command":37},"bunx","bunx skills add MohammadBafkar\u002Fpolymath --skill mcp-bridge",{"tool":39,"command":40},"pnpm","pnpm dlx skills add MohammadBafkar\u002Fpolymath --skill mcp-bridge","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-core\u002Fskills\u002Fmcp-bridge\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"scripts\u002Fmcp-registry","SCRIPT","脚本",32421,"https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-core\u002Fskills\u002Fmcp-bridge\u002Fscripts\u002Fmcp-registry",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M74GN87EBRHM9N87M7AP1HDD","runbook","Write or refresh an operational runbook for an alert\u002Fsymptom; structured as TL;DR + Pre-checks + Steps + Verification + Rollback + Escalation.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Frunbook\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M74GN5GPKEC1JEKP2DFQNEQJ","rfc","Draft a lightweight design RFC to docs\u002Frfcs\u002F\u003Cslug>.md; Summary, Motivation, Detailed design, Drawbacks, Alternatives, Unresolved questions. A proposal to debate, not a recorded decision (adr).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Frfc\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M74GN2F4CWPMV4X09TG4E304","editorial-pass","Review and tighten prose in a Markdown artifact for a target tone (terse, formal, friendly) without dropping information; preserve quotations and load-bearing constraints.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Feditorial-pass\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M74GMZWGYMZ37C4DYGT6P23G","architecture-review-facilitation","Run an architecture review as a process — entry criteria, reviewer checklist, decision log, and follow-up actions — pairing the design artifact with a red-team pass.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Farchitecture-review-facilitation\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M74GMXVX0YX3ETDXS527XDGM","architecture-doc","Write a C4-style architecture document; System Context + Containers (+ Components when interesting) with mermaid diagrams. Describes structure, not a decision (adr) or proposal (rfc).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Farchitecture-doc\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M74GMVG1WSMCK066S3KE6V5K","adr","Write an Architecture Decision Record (Michael Nygard format) to docs\u002Fadrs\u002FNNNN-\u003Cslug>.md; frontmatter validated by the ADR artifact schema. Records a made decision, not a proposal to debate (rfc).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Fadr\u002FSKILL.md",[],[]]