RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/code-yeongyu/oh-my-openagent

AGENTS.md

packages/mcp-client-core/AGENTS.md
AGENTS.md

Quality

43/100

Scores the file, not the repository.

Length

325 words

4 headings · 0 code blocks

Repository

67k

— · pushed 0 days ago

Last changed

2 days ago

First indexed 2 days ago.
code-yeongyu/oh-my-openagent/packages/mcp-client-core/AGENTS.mdRawGitHub
1# mcp-client-core — MCP Client + Skill-Embedded MCP (Core)
2 
3**Generated:** 2026-06-16
4 
5## OVERVIEW
6 
7Harness-neutral MCP client lifecycle and OAuth primitives. Consumed by `omo-opencode` via `features/skill-mcp-manager` and `features/mcp-oauth` / `cli/mcp-oauth`. Private package `@oh-my-opencode/mcp-client-core`; 30 source files under `src/`.
8 
9## KEY FILES
10 
11| File | Role |
12|------|------|
13| `skill-mcp-manager/manager.ts` | `SkillMcpManager` — per-session client registry, listTools/callTool/readResource/getPrompt, retry loop with OAuth step-up |
14| `skill-mcp-manager/connection.ts` | `getOrCreateClient()` / `getOrCreateClientWithRetryImpl()` — race-safe connection, dispatch to stdio or HTTP |
15| `skill-mcp-manager/stdio-client.ts` | `createStdioClient()` — `StdioClientTransport`, env cleaning, process cleanup registration |
16| `skill-mcp-manager/http-client.ts` | `createHttpClient()` — `StreamableHTTPClientTransport`, request init with OAuth headers, URL redaction |
17| `skill-mcp-manager/oauth-handler.ts` | `buildHttpRequestInit()`, `handleStepUpIfNeeded()`, `handlePostRequestAuthError()` — token refresh, scope merge, 401/403 retry |
18| `skill-mcp-manager/cleanup.ts` | `disconnectSession()`, `disconnectAll()`, `forceReconnect()`, idle timeout (5 min), SIGTERM/SIGINT handlers |
19| `skill-mcp-manager/types.ts` | `SkillMcpClientInfo`, `ManagedClient`, `ConnectionType`, `SkillMcpManagerState` |
20| `mcp-oauth/provider.ts` | `McpOAuthProvider` — login (DCR + PKCE redirect), refresh, token storage |
21| `mcp-oauth/oauth-authorization-flow.ts` | PKCE verifier/challenge, browser open, 5-min timeout |
22| `mcp-oauth/discovery.ts` | `discoverOAuthServerMetadata()` — `.well-known/oauth-protected-resource` + `oauth-authorization-server` with cache |
23| `mcp-oauth/dcr.ts` | `getOrRegisterClient()` — Dynamic Client Registration, fallback to static clientId |
24| `mcp-oauth/step-up.ts` | `isStepUpRequired()`, `mergeScopes()`, `parseWwwAuthenticate()` — 403 scope escalation |
25| `mcp-oauth/callback-server.ts` | `findAvailablePort()`, `startCallbackServer()` for local OAuth callback |
26| `mcp-oauth/storage.ts` | `loadToken()` / `saveToken()` — keyed by server URL |
27| `index.ts` | Barrel: re-exports `mcp-oauth/*` and `skill-mcp-manager/*` |
28 
29## NOTES
30 
31- **Per-session isolation:** client key is `${sessionID}:${skillName}:${serverName}`. The same skill in two sessions does not share state.
32- **Transports:** stdio (local process via `StdioClientTransport`) and HTTP (remote via `StreamableHTTPClientTransport`). Connection type inferred from `url` vs `command`, or explicit `type` field.
33- **OAuth flow:** PKCE + optional DCR. Step-up authentication on 403 merges new scopes and re-authenticates. Refresh mutex prevents concurrent refresh storms.
34- **Cleanup:** idle clients evicted after 5 minutes. Process signal handlers close all transports on SIGINT/SIGTERM. `disconnectAll()` is safe across plugin reloads.
35- **Consumers:** `packages/omo-opencode/src/features/skill-mcp-manager/`, `packages/omo-opencode/src/features/mcp-oauth/`, and `packages/omo-opencode/src/cli/mcp-oauth/` import this Core package.
36 
37Parent: [`packages/AGENTS.md`](../AGENTS.md)
38 

Sections

  • mcp-client-core — MCP Client + Skill-Embedded MCP (Core)
  • OVERVIEW
  • KEY FILES
  • NOTES

What it covers

architecture

Stack — with the evidence

typescript

(1.00)

bun

(1.00)

node

(0.70)

vitest

(0.70)

biome

(0.70)

javascript

(0.60)

github-actions

(0.60)

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
code-yeongyu
Language
—
License
—
Archived
no

All configs in this repo

Also in code-yeongyu/oh-my-openagent

Diff this repo’s formats

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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
code-yeongyu/oh-my-openagent.agents/AGENTS.md · 67kAGENTS.mdtypescriptbun+5stylearchtesting-strategydatabase64/1002 days ago
code-yeongyu/oh-my-openagent.opencode/AGENTS.md · 67kAGENTS.mdtypescriptbun+5stylearchdo-not71/1002 days ago
code-yeongyu/oh-my-openagentAGENTS.md · 67kAGENTS.mdtypescriptbun+5setupbuildtestlint-format+1184/1002 days ago
code-yeongyu/oh-my-openagentassets/AGENTS.md · 67kAGENTS.mdtypescriptbun+5buildteststylearch88/1002 days ago
code-yeongyu/oh-my-openagentbin/AGENTS.md · 67kAGENTS.mdtypescriptbun+5teststylearch64/1002 days ago
code-yeongyu/oh-my-openagentpackages/AGENTS.md · 67kAGENTS.mdtypescriptnode+5buildtestlint-formatstyle+383/1002 days ago
code-yeongyu/oh-my-openagentpackages/agents-md-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archdependenciesapi48/1002 days ago
code-yeongyu/oh-my-openagentpackages/boulder-state/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archapi48/1002 days ago
code-yeongyu/oh-my-openagentpackages/claude-code-compat-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archagent-behaviour56/1002 days ago
code-yeongyu/oh-my-openagentpackages/comment-checker-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archdependenciesapi48/1002 days ago
code-yeongyu/oh-my-openagentpackages/delegate-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5stylearchdependenciesapi60/1002 days ago
code-yeongyu/oh-my-openagentpackages/git-bash-mcp/AGENTS.md · 67kAGENTS.mdtypescriptbun+5buildtestlint-formatarch+182/1002 days ago
code-yeongyu/oh-my-openagentpackages/hashline-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archtypesdependenciesapi48/1002 days ago
code-yeongyu/oh-my-openagentpackages/lsp-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archmonorepo43/1002 days ago
code-yeongyu/oh-my-openagentpackages/lsp-daemon/AGENTS.md · 67kAGENTS.mdtypescriptnode+5buildtestlint-formatarch+184/1002 days ago
code-yeongyu/oh-my-openagentpackages/lsp-tools-mcp/AGENTS.md · 67kAGENTS.mdtypescriptnode+5buildtestlint-formatarch74/1002 days ago
code-yeongyu/oh-my-openagentpackages/mcp-stdio-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archapi56/1002 days ago
code-yeongyu/oh-my-openagentpackages/model-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5arch54/1002 days ago
code-yeongyu/oh-my-openagentpackages/omo-codex/AGENTS.md · 67kAGENTS.mdtypescriptbun+5setupbuildtestarch+693/1002 days ago
code-yeongyu/oh-my-openagentpackages/omo-codex/plugin/components/bootstrap/AGENTS.md · 67kAGENTS.mdtypescriptnode+5buildtestarchagent-behaviour88/1002 days ago
Diff against .agents/AGENTS.md Diff against .opencode/AGENTS.md Diff against AGENTS.md Diff against assets/AGENTS.md Diff against bin/AGENTS.md Diff against packages/AGENTS.md Diff against packages/agents-md-core/AGENTS.md Diff against packages/boulder-state/AGENTS.md Diff against packages/claude-code-compat-core/AGENTS.md Diff against packages/comment-checker-core/AGENTS.md Diff against packages/delegate-core/AGENTS.md Diff against packages/git-bash-mcp/AGENTS.md Diff against packages/hashline-core/AGENTS.md Diff against packages/lsp-core/AGENTS.md Diff against packages/lsp-daemon/AGENTS.md Diff against packages/lsp-tools-mcp/AGENTS.md Diff against packages/mcp-stdio-core/AGENTS.md Diff against packages/model-core/AGENTS.md Diff against packages/omo-codex/AGENTS.md Diff against packages/omo-codex/plugin/components/bootstrap/AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
mui/material-uiAGENTS.md · 99kAGENTS.mdtypescriptjavascript+13setupbuildtestlint-format+9100/1003 days ago
TryGhost/Ghoste2e/AGENTS.md · 55kAGENTS.mdtypescriptjavascript+12setupteststylearch+2100/1003 days ago
code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67kAGENTS.mdtypescriptbun+10setupbuildtestlint-format+6100/1002 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
SkeneTechnologies/skene-cookbookAGENTS.md · 51AGENTS.mdpythoneslint+4setupbuildtestlint-format+7100/1002 days ago
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
aaif-goose/gooseAGENTS.md · 52kAGENTS.mdrusttypescript+2setupbuildtestlint-format+6100/1003 days ago
elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78kAGENTS.mdjavanode+4buildtestlint-formatstyle+2100/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack