

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# src/features/claude-code-mcp-loader/ — Tier 2 MCP Loader (.mcp.json)23**Generated:** 2026-05-1545## OVERVIEW67This module loads `.mcp.json` files from project/user scopes and expands `${VAR}` env vars. It feeds Tier 2 of the 3-tier MCP system into `mcp-config-handler.ts` during Phase 5 of config loading. Shared parsing, env expansion, and transform primitives are extracted to [`packages/claude-code-compat-core/`](../../../../../packages/claude-code-compat-core); this directory keeps the OpenCode adapter path stable.89## WHY IT EXISTS1011Claude Code ecosystem ships MCPs via `.mcp.json` files with `${VAR}` env var placeholders. OmO consumes these unchanged so existing Claude Code MCP configs work.1213## LOAD PIPELINE1415```16loadMcpConfigs(ctx)17 → scope-filter.ts: discover .mcp.json at project + user scopes18 → loader.ts: parse JSON19 → env-expander.ts: replace ${VAR} with process.env[VAR]20 → transformer.ts: map Claude Code format → OpenCode McpLocal / McpRemote shape21 → return LoadedMcpServer[]22```2324## MCP FORMAT2526```jsonc27// .mcp.json28{29 "mcpServers": {30 "my-stdio": {31 "type": "stdio",32 "command": "node",33 "args": ["server.js"],34 "env": {35 "API_KEY": "${MY_API_KEY}"36 }37 },38 "my-http": {39 "type": "http", // "sse" legacy → mapped to http40 "url": "https://example.com/mcp",41 "headers": {42 "Authorization": "Bearer ${MY_TOKEN}"43 }44 }45 }46}47```4849## KEY FILES5051| File | Purpose |52|------|---------|53| `index.ts` | Barrel: `loadMcpConfigs`, types |54| `loader.ts` | `loadMcpConfigs()` main entry |55| `types.ts` | `ClaudeCodeMcpServer`, `LoadedMcpServer`, `McpScope` |56| `env-expander.ts` | `expandEnvVarsInObject()` — recursive `${VAR}` substitution |57| `transformer.ts` | Claude Code format → OpenCode `Mcp` shape |58| `scope-filter.ts` | Project vs user scope precedence |5960## THREE-TIER MCP CONTEXT6162| Tier | Loader | Scope |63|------|--------|-------|64| 1. Built-in | `src/mcp/` `createBuiltinMcps()` | Global, 3 remote HTTP MCPs + 2 local stdio MCPs (`lsp`, `codegraph`) |65| 2. **Claude Code** | **This module** | **From `.mcp.json`, project + user** |66| 3. Skill-embedded | `src/features/skill-mcp-manager/` | Per-session, from SKILL.md YAML |6768## SECURITY6970- **Env var allowlist**: `mcp_env_allowlist` config restricts which env vars can be expanded71- **No shell execution**: `${VAR}` is string replacement only, not shell `$()`72- **Secrets redaction**: `env-cleaner.ts` (in skill-mcp-manager) filters known secret patterns from logs7374## RELATED7576- Phase 5 integration: `src/plugin-handlers/mcp-config-handler.ts`77- Skill-embedded MCPs (Tier 3): `src/features/skill-mcp-manager/`78- Built-in MCPs (Tier 1): `src/mcp/`79
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/look-at/AGENTS.md · 68k | AGENTS.md | arch | 68/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentassets/AGENTS.md · 68k | AGENTS.md | buildteststylearch | 88/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatstyle+3 | 83/100 | today | |
| code-yeongyu/oh-my-openagentpackages/omo-codex/plugin/components/ultrawork/AGENTS.md · 68k | AGENTS.md | buildteststylearch+1 | 77/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/background-task/AGENTS.md · 68k | AGENTS.md | arch | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/agents/sisyphus/AGENTS.md · 68k | AGENTS.md | arch | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/ralph-loop/AGENTS.md · 68k | AGENTS.md | arch | 62/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/rules-injector/AGENTS.md · 68k | AGENTS.md | archdo-not | 69/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/runtime-fallback/AGENTS.md · 68k | AGENTS.md | stylearchtypes | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.agents/AGENTS.md · 68k | AGENTS.md | stylearchtesting-strategydatabase | 64/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.opencode/AGENTS.md · 68k | AGENTS.md | stylearchdo-not | 71/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentAGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+11 | 84/100 | today | |
| code-yeongyu/oh-my-openagentpackages/agents-md-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/ast-grep-mcp/AGENTS.md · 68k | AGENTS.md | buildstylearchdependencies+1 | 78/100 | 7 days ago | |
| code-yeongyu/oh-my-openagentpackages/boulder-state/AGENTS.md · 68k | AGENTS.md | archapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/claude-code-compat-core/AGENTS.md · 68k | AGENTS.md | archagent-behaviour | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/comment-checker-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/delegate-core/AGENTS.md · 68k | AGENTS.md | stylearchdependenciesapi | 60/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/git-bash-mcp/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatarch+1 | 82/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/hashline-core/AGENTS.md · 68k | AGENTS.md | archtypesdependenciesapi | 48/100 | 13 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/code-yeongyu-oh-my-openagent-packages-omo-opencode-src-features-claude-code-mcp-loader-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.