Skip to content

docs(claude-code): install-first plugin page behind default-on flag - #646

Draft
eshwar-sundar-glean wants to merge 1 commit into
mainfrom
eshwar/claude-code-plugin-page-v2
Draft

docs(claude-code): install-first plugin page behind default-on flag#646
eshwar-sundar-glean wants to merge 1 commit into
mainfrom
eshwar/claude-code-plugin-page-v2

Conversation

@eshwar-sundar-glean

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

Copy link
Copy Markdown

What & why

Reworks the Claude Code plugin guide (/guides/mcp/claude-code) into an install-first page, and ships it behind a feature flag that is enabled by default. The previous page is preserved and renders as the fallback whenever the flag is turned off.

image

The new page:

  • What's included — a short, product-facing blurb: Glean's expert skills, the custom skills your team authors in Glean, and every tool configured centrally in Glean (with security/permission guardrails enforced), all via a local Glean MCP server. Links to the claude-plugins README for the full list.
  • Installation (now first; the old MCP-configurator CTA is dropped) — (1) add the Glean marketplace + install the plugin, (2) /glean_run setup my Glean with concise setup steps.
  • Optional: fewer permission prompts — how to set USE_CLAUDE_PROJECT_DIR=1 under the env key of a Claude Code settings.json, the project/local/managed scopes, and the matching .gitignore entry (the cache is written to .claude/tmp/ in the repo).

Feature flag (default-on)

The repo's convention is that flags are missing → off (flipped on via Vercel Edge Config). To make the new page default-on purely in-repo, this PR adds a small DEFAULT_FLAGS base that is merged beneath env flags and the runtime Edge Config response, so the flag stays on unless a later source turns it off (Edge Config can still act as a kill switch).

  • src/lib/defaultFlags.ts — new: claude-code-plugin-v2: { enabled: true }.
  • src/utils/buildTimeFlags.ts — seed DEFAULT_FLAGS into the build snapshot.
  • src/theme/Root.tsx — merge DEFAULT_FLAGS as the base at build and runtime (survives the runtime replace).
  • src/components/PluginPage/* — non-breaking optional whatsIncluded + afterSteps slots (other plugin pages unaffected).
  • docs/guides/mcp/claude-code.mdx — new page as <FeatureFlag> children, old page as the fallback.

👀 Reviewer callouts

  1. This bundles authored-doc content with feature-flag infrastructure. Happy to split into two PRs (doc-content vs. flag/component infra) if preferred.
  2. DEFAULT_FLAGS changes site-wide flag resolution (adds a base layer). It's additive and scoped to entries in that file, but please confirm you're comfortable with default-on-in-code vs. enabling via Edge Config (which would keep this PR pure doc content).

Test plan

  • pnpm build ✅ (328 docs) · pnpm test ✅ (169 passed) · pnpm prettier --check on changed files ✅ (.mdx is prettier-ignored per repo config).
  • Default build (flag on): SSR HTML renders the new page (/glean_run setup my Glean, "What's included", USE_CLAUDE_PROJECT_DIR, settings.json + .gitignore snippets); old markers absent.
  • Kill-switch (FF_CLAUDE_CODE_PLUGIN_V2=false pnpm build): old page renders ("Open MCP Configurator", "Set up the Glean MCP Server"); new markers absent — confirming both pages coexist.

Preview

Run pnpm docusaurus start and open /guides/mcp/claude-code. To preview the old page: append ?ff_claude-code-plugin-v2=false.

Draft: pending decision on the two reviewer callouts above.

Rework the Claude Code plugin guide: a "What's included" blurb, an
install-first flow (marketplace add + install, then `/glean_run setup my
Glean`), and an optional USE_CLAUDE_PROJECT_DIR note for fewer skill-file
permission prompts. The new page renders by default behind the
`claude-code-plugin-v2` feature flag; the previous page is preserved as
the fallback and shows whenever the flag is turned off.

- docs/guides/mcp/claude-code.mdx: new page (FeatureFlag children) + old
  page (fallback)
- src/lib/defaultFlags.ts: DEFAULT_FLAGS base so a flag can ship enabled
  by default (merged beneath env + Edge Config; either can override)
- src/utils/buildTimeFlags.ts, src/theme/Root.tsx: merge DEFAULT_FLAGS as
  the base at build and runtime
- src/components/PluginPage: optional whatsIncluded + afterSteps slots
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
glean-developer-site Ready Ready Preview Jul 31, 2026 9:03am

Request Review

@eshwar-sundar-glean

Copy link
Copy Markdown
Author

Hold merge until Plugin launch

},
]}
/>
{/* New page is gated behind `claude-code-plugin-v2` (enabled by default via

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3/5 (strong opinion: non-blocking)

The feature flag is defaulted to off. This PR can merge with it off, and we can turn it on when we want to release. We should update this comment to match.

Comment on lines +9 to +10
// Seed the default-on flags first so env overrides (FF_* / FEATURE_FLAGS_JSON)
// can still turn them off, but they default on when nothing is set.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3/5 (strong opinion: non-blocking)

We probably don't need these comments.

Comment thread src/theme/Root.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4/5 (serious issue: blocking)

Can we revert the changes to this file. I don't want there to be separate ways that feature flags are served to the site.

Comment thread src/lib/defaultFlags.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4/5 (serious issue: blocking)

Can we remove this. I don't want there to be multiple places where feature flags are defined.

description:
'Connect the plugin to your Glean instance. You only need to do this once per machine.',
items: [
'In Claude Code, run: /glean_run setup my Glean',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3/5 (strong opinion: non-blocking)

Suggested change
'In Claude Code, run: /glean_run setup my Glean',
'In Claude Code, run: `/glean_run setup my Glean`',

},
{
type: 'list',
label: '/glean_run setup my Glean',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3/5 (strong opinion: non-blocking)

Suggested change
label: '/glean_run setup my Glean',
label: 'Setup the Glean MCP connection',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if you folks considered a simpler /glean command instead of /glean_run, @eshwar-sundar-glean.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/glean_run is cool, no? :D

items: [
'In Claude Code, run: /glean_run setup my Glean',
'Enter your work email when prompted.',
'Finish sign-in in the browser window that opens (Glean OAuth) and approve access.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4/5 (serious issue: blocking)

This assumes OAuth, and doesn't call out that you can use a token instead. Can we match this prose with what we had on the page already?

Authentication uses Glean's OAuth server where enabled, or a Glean API token as a fallback.

Does setup account for non-OAuth setup?

Comment on lines +61 to +63
and permission guardrails fully enforced, all running through a local
Glean MCP server so it works as native skills and tools right in your
terminal.{' '}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3/5 (strong opinion: non-blocking)

I don't think it's necessary to call out that it uses a local MCP server. In fact, we should avoid it.

Suggested change
and permission guardrails fully enforced, all running through a local
Glean MCP server so it works as native skills and tools right in your
terminal.{' '}
and permission guardrails fully enforced, all running through a
Glean MCP server so it works right in your
terminal.{' '}

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.

2 participants