glean-local-mcp
v1.5.2
Published
Generic Glean MCP Server with OAuth support for any IDE supporting Model Context Protocol
Downloads
319
Maintainers
Readme
glean-local-mcp
[!IMPORTANT] This package is deprecated / no longer maintained.
Do not use
@theplenkov-npm/glean-local-mcpfor new MCP setups. It wraps@gleanwork/local-mcp-serverwhich predates Glean's managed remote MCP server and is no longer the supported path for connecting MCP-compatible hosts to Glean.
What to use instead
Use the managed Glean MCP server built into your Glean instance:
- Using the Glean MCP Server — end-user setup for supported MCP hosts.
- Set up Glean MCP server — admin setup and enablement.
- About Glean MCP server — overview of Glean's managed MCP server.
For local command-line workflows, use Glean CLI instead.
Package status
@theplenkov-npm/glean-local-mcp is no longer maintained. No new feature work or bug fixes are planned for this package.
Do not treat this package as an actively maintained MCP surface. Existing users should migrate to the managed Glean MCP server where possible.
OAuth wrapper for @gleanwork/local-mcp-server - enabled Cursor and other MCP clients to use Glean with OAuth 2.0 authentication.
Repository: https://github.com/theplenkov-npm/glean-local-mcp
Installation (Historical)
bun install -g glean-local-mcpOr use with bunx (no installation):
bunx glean-local-mcpConfiguration (Historical)
The wrapper loaded configuration in this order (later sources override earlier):
~/.glean/mcp-config.json(persistent, user-specific)- Environment variables (temporary, session-specific)
Option 1: User Config File (Recommended)
Create ~/.glean/mcp-config.json:
{
"clientId": "your_client_id",
"clientSecret": "your_client_secret",
"issuerUrl": "https://your-company.okta.com",
"apiBaseUrl": "https://your-company-be.glean.com"
}Then just run:
bunx glean-local-mcpOption 2: Environment Variables
Set via shell, .env file (with node --env-file), or IDE configuration.
Usage (Historical)
With Cursor
If using ~/.glean/mcp-config.json (recommended):
{
"mcpServers": {
"glean": {
"command": "bunx",
"args": ["glean-local-mcp"]
}
}
}Or with environment variables:
{
"mcpServers": {
"glean": {
"command": "bunx",
"args": ["glean-local-mcp"],
"env": {
"GLEAN_CLIENT_ID": "your_client_id",
"GLEAN_CLIENT_SECRET": "your_client_secret",
"OAUTH_ISSUER_URL": "https://your-company.okta.com",
"GLEAN_SERVER_URL": "https://your-company-be.glean.com"
}
}
}
}Restart Cursor. On first use, your browser opens for OAuth login.
With Other MCP Clients
Use the same configuration pattern with your MCP client's config file.
Configuration Reference (Historical)
Configuration could be set in ~/.glean/mcp-config.json or via environment variables.
| Field / Variable | Required | Description |
|------------------|----------|-------------|
| clientId / GLEAN_CLIENT_ID | Yes | OAuth Client ID |
| clientSecret / GLEAN_CLIENT_SECRET | Yes | OAuth Client Secret |
| issuerUrl / OAUTH_ISSUER_URL | Yes | OAuth provider URL (supports OIDC discovery) |
| apiBaseUrl / GLEAN_SERVER_URL | Yes | Glean API base URL (e.g., https://company-be.glean.com) |
| redirectUri / REDIRECT_URI | No | OAuth callback (default: http://localhost:8080/...) |
| oauthPort / OAUTH_PORT | No | Callback port (default: 8080) |
| scopes / OAUTH_SCOPES | No | Comma-separated scopes (default: openid,email,profile,offline_access) |
How It Worked (Historical)
Your IDE → OAuth Wrapper → @gleanwork/local-mcp-server → Glean API
↓
• Authenticated via OAuth
• Stored tokens locally
• Refreshed automatically
• Passed to local-mcp-serverFeatures (Historical)
- ✅ OAuth 2.0 authentication via browser
- ✅ Automatic token refresh (every 5 minutes)
- ✅ Token persistence between sessions
- ✅ Zero HTTP dependencies (native fetch/http)
- ✅ Worked with official Glean MCP tools
Token Storage (Historical)
Tokens were securely stored in ~/.glean/tokens.json by default. Could be overridden with TOKEN_STORAGE_PATH.
Troubleshooting (Historical)
"Missing OAuth configuration"
- Verify all required environment variables are set
"Port already in use"
- Change
OAUTH_PORTto a different port - Update
REDIRECT_URIto match
Authentication fails
- Clear tokens:
rm ~/.glean/tokens.json - Try again
Requirements
- Node.js 24.0.0+
- OAuth credentials for your Glean instance
Contributing
Contributions are welcome! Please visit the repository to:
License
MIT - See LICENSE for details.
