Glean plugin
Glean's plugin for Claude Code,
Codex, and Cursor. This repo is a single-plugin marketplace, shipping one
manifest per host.
Today it ships one plugin:
glean-vnext — adds three static tools, find_skills, run_tool, and
setup, that let the agent discover Glean-hosted skills for enterprise apps
(Jira, Slack, Google Workspace, Salesforce, etc.) and invoke their downstream
tools via Glean's MCP gateway. Once the user has authenticated, the plugin
also surfaces an allow-list of Glean's first-class tools — currently
search, read_document, chat, memory, memory_schema,
user_activity, and employee_search — directly, with schemas pulled from
the remote MCP server.
Install
Claude Code (terminal)
/plugin marketplace add gleanwork/glean-plugins-vnext
/plugin install glean-vnext@glean-plugins-vnext
Codex and Cursor
This repo is also a plugin marketplace for Codex and Cursor: point the
host at gleanwork/glean-plugins-vnext and install glean-vnext through that
host's plugin flow. The launcher, skills, and server bundle are shared across
all hosts. For Cursor, see
Team marketplaces.
First run
Setup resolves your Glean instance automatically from your work email, then
triggers OAuth sign-in to Glean via the setup tool. setup opens the Glean
sign-in page in your browser and captures the authorization code in-context
through a local loopback callback. After sign-in, OAuth credentials are cached
to ~/.glean/ and reused across sessions — you won't be prompted again until
the refresh token expires.
Setting the Server URL manually
You normally don't need this — setup derives the Server (QE) URL from your
work email. Set it explicitly only when you're testing a specific deployment
or your email domain isn't recognized. Two options:
- Pass
server_url to the setup tool with your Server instance (QE) URL
(e.g. https://acme-be.glean.com). Admins can find this at
https://app.glean.com/admin/about-glean.
- Or set the
GLEAN_MCP_SERVER_URL environment variable.
Updates
/plugin marketplace update glean-plugins-vnext
Testing a specific branch or PR
You can point the marketplace at a specific git branch, tag, or commit:
# Install from a specific branch (e.g. a PR branch)
/plugin marketplace add gleanwork/glean-plugins-vnext@branch-name
/plugin install glean-vnext@glean-plugins-vnext
# Or update an existing marketplace to a different branch
/plugin marketplace remove glean-plugins-vnext
/plugin marketplace add gleanwork/glean-plugins-vnext@branch-name
You can also pin to a branch in settings.json:
{
"marketplaces": [
{
"name": "glean-plugins-vnext",
"source": "https://github.com/gleanwork/glean-plugins-vnext",
"sourceType": "git",
"branch": "mohit-baseline-marketplace-layout"
}
]
}
For local development, point the marketplace at your local checkout instead:
/plugin marketplace add /path/to/glean-plugins-vnext
Then just git checkout whichever branch you want to test.
Configuration
Configuration is interactive: the setup tool captures your Glean Server URL
and drives OAuth sign-in on first run (see First run), persisting
both under ~/.glean/. No environment variables are required.
A few optional variables let you override behavior. Set them in the host's MCP
server env block — the shipped .mcp.json / .mcp.codex.json already set the
HITL ones — or in your shell:
| Variable | Purpose | Default |
|---|
GLEAN_MCP_SERVER_URL | Overrides the Glean server URL captured by setup. | URL saved by setup |
ENABLE_HITL | Human-in-the-loop confirmation before run_tool runs a downstream tool. Active only when set to exactly true. | true (set in the shipped .mcp.json) |
HITL_TIMEOUT_MS | Timeout in milliseconds for a HITL confirmation prompt. Positive integer. | 300000 (5 min), set in .mcp.json |
GLEAN_REMOTE_TOOL_TIMEOUT_MS | Timeout in milliseconds for a downstream tool call made via run_tool (overrides the MCP SDK's 60s default). Positive integer. | 300000 (5 min), bundle default |
GLEAN_FILE_ARG_MAX_BYTES | Maximum size in bytes of each file read via run_tool's file_args. Positive integer. | 5242880 (5 MiB), bundle default |
USE_CLAUDE_PROJECT_DIR | Set to 1 to route the skills cache under the launch project's .claude/tmp/, so the glean_run skill's Read glob can match cache files. | unset |
Empty values and un-interpolated ${VAR} placeholders are ignored, falling back
to the default.
The launcher (plugins/glean/start.mjs) also derives and exports three more
variables the bundle reads, so these are internal — start.mjs overwrites them on
every launch and setting them yourself has no effect: