feat: fold glean-vnext runtime MCP server into the glean plugin#3
Draft
eshwar-sundar-glean wants to merge 2 commits into
Draft
feat: fold glean-vnext runtime MCP server into the glean plugin#3eshwar-sundar-glean wants to merge 2 commits into
eshwar-sundar-glean wants to merge 2 commits into
Conversation
added 2 commits
July 25, 2026 10:13
Add sources/glean-vnext/ as a source plugin and merge it into the existing
`glean` emitted plugin (from: array) for claude/cursor/codex. The shipped
`glean` plugin now coexists with the portable skills: it bundles a local
stdio MCP server (glean-local) exposing find_skills/run_tool/setup, the
glean_run skill, and an auto-approve PreToolUse hook. A user may still
connect a remote Glean MCP server separately; the local server is named
glean-local to avoid clashing with a remote glean.
Source plugin layout (sources/glean-vnext/):
- plugin.pluginpack.json: files map (dist/index.js, start.mjs, package.json)
- .mcp.json: base config (glean-local, \${CLAUDE_PLUGIN_ROOT}/start.mjs)
- targets/codex/.mcp.json: codex override (./start.mjs + cwd ".")
- src/ (15 TS files) + build.mjs: server source + esbuild bundler
- tests/ (14 vitest files): server unit tests
- skills/glean_run, hooks/, start.mjs, package.json (runtime)
Build wiring:
- build:bundle runs esbuild (src -> sources/glean-vnext/dist/index.js)
- prebuild now chains sync-changelog && build:bundle before pluginpack build
- test:bundle / typecheck:bundle run the server suite scoped to the source dir
- deps: @modelcontextprotocol/sdk, yaml (runtime); esbuild, tsx, typescript,
vitest, @types/node (dev); overrides pin hono/esbuild/vite for CVEs
config (pluginpack.config.ts):
- claude glean: from += glean-vnext, components += hooks
- cursor glean: from += glean-vnext, components += hooks
- codex glean: from += glean-vnext (no hooks; matches existing codex shape)
Hook: server env lookup now checks mcpServers["glean-local"] first, falls back
to the legacy "glean" key.
Tests: npm test (build+validate) green (69/65/56 managed files);
npm run test:bundle 189/189; typecheck clean.
Requires @gleanwork/pluginpack@^0.8.0 (per-target MCP override + plugin-root
files features). Until published, use npm link @gleanwork/pluginpack against
the pluginpack branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the glean-vnext runtime MCP server out of
glean-experimental-pluginsinto this repo as a source plugin (sources/glean-vnext/) and folds it into the existinggleanemitted plugin via thefrom:array for claude/cursor/codex. The shippedgleanplugin now coexists with the portable skills: it bundles a local stdio MCP server (glean-local) exposingfind_skills/run_tool/setup, theglean_runskill, and an auto-approve PreToolUse hook. Users may still connect a remote Glean MCP server; the local server is namedglean-localto avoid a name clash.Draft PRs
What changed
sources/glean-vnext/— new source plugin:plugin.pluginpack.json(files map),.mcp.json(base),targets/codex/.mcp.json(codex override),start.mjs, runtimepackage.json,src/(15 TS),build.mjs(esbuild),tests/(14 vitest),skills/glean_run,hooks/.pluginpack.config.ts—glean-vnextadded to eachgleanfrom:;hooksadded to claude/cursorcomponents.package.json—build:bundlechained intoprebuild;test:bundle/typecheck:bundle; server deps + esbuild/vitest/tsx/typescript; CVE overrides.mcpServers["glean-local"]first (fixes prod bug from rename).Tests
npm testgreen (69/65/56 managed files).npm run test:bundle189/189.typecheck:bundleclean.Requires pluginpack ^0.8.0
Depends on gleanwork/pluginpack#11 (
files+ per-target.mcp.jsonoverride). Until published,npm link @gleanwork/pluginpackagainst that branch. NOTE:npm installclobbers the link — re-link after any install until 0.8.0 is used.Testing doc
See
docs/glean-vnext-developer-testing.mdfor the manual test workflow in Claude/Cursor/Codex.