Skip to content

feat: fold glean-vnext runtime MCP server into the glean plugin#3

Draft
eshwar-sundar-glean wants to merge 2 commits into
mainfrom
eshwar/glean-vnext-fold-into-glean
Draft

feat: fold glean-vnext runtime MCP server into the glean plugin#3
eshwar-sundar-glean wants to merge 2 commits into
mainfrom
eshwar/glean-vnext-fold-into-glean

Conversation

@eshwar-sundar-glean

@eshwar-sundar-glean eshwar-sundar-glean commented Jul 25, 2026

Copy link
Copy Markdown

Summary

Moves the glean-vnext runtime MCP server out of glean-experimental-plugins into this repo as a source plugin (sources/glean-vnext/) and folds it into the existing glean emitted plugin via the 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. Users may still connect a remote Glean MCP server; the local server is named glean-local to 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, runtime package.json, src/ (15 TS), build.mjs (esbuild), tests/ (14 vitest), skills/glean_run, hooks/.
  • pluginpack.config.tsglean-vnext added to each glean from:; hooks added to claude/cursor components.
  • package.jsonbuild:bundle chained into prebuild; test:bundle/typecheck:bundle; server deps + esbuild/vitest/tsx/typescript; CVE overrides.
  • Hook — server env lookup checks mcpServers["glean-local"] first (fixes prod bug from rename).

Tests

  • npm test green (69/65/56 managed files).
  • npm run test:bundle 189/189.
  • typecheck:bundle clean.

Requires pluginpack ^0.8.0

Depends on gleanwork/pluginpack#11 (files + per-target .mcp.json override). Until published, npm link @gleanwork/pluginpack against that branch. NOTE: npm install clobbers the link — re-link after any install until 0.8.0 is used.

Testing doc

See docs/glean-vnext-developer-testing.md for the manual test workflow in Claude/Cursor/Codex.

Cherrypick Bot 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant