npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gleanwork/mcp-config-glean

v4.1.1

Published

Glean-specific MCP configuration defaults and helpers

Downloads

40,618

Readme

@gleanwork/mcp-config-glean

Glean-specific MCP configuration defaults and helpers. Wraps @gleanwork/mcp-config-schema with Glean-specific constants and convenience functions.

Installation

npm install @gleanwork/mcp-config-glean

Usage

Quick Start

import {
  createGleanRegistry,
  createGleanEnv,
  createGleanHeaders,
  buildGleanServerUrl,
} from '@gleanwork/mcp-config-glean';

// Create a pre-configured registry
const registry = createGleanRegistry();
const builder = registry.createBuilder('cursor');

// Generate stdio configuration
const stdioConfig = builder.buildConfiguration({
  transport: 'stdio',
  env: createGleanEnv('my-company', 'my-api-token'),
});

// Generate HTTP configuration
const httpConfig = builder.buildConfiguration({
  transport: 'http',
  serverUrl: buildGleanServerUrl('my-company'),
  headers: createGleanHeaders('my-api-token'),
});

Available Exports

Constants

import { GLEAN_REGISTRY_OPTIONS, GLEAN_ENV } from '@gleanwork/mcp-config-glean';

// Registry options for Glean MCP server
GLEAN_REGISTRY_OPTIONS.serverPackage     // '@gleanwork/local-mcp-server'
GLEAN_REGISTRY_OPTIONS.tokenEnvVarName   // 'GLEAN_API_TOKEN'
GLEAN_REGISTRY_OPTIONS.commandBuilder    // Functions to generate CLI commands
GLEAN_REGISTRY_OPTIONS.serverNameBuilder // Callback that prefixes server names with glean_

// Environment variable names
GLEAN_ENV.INSTANCE   // 'GLEAN_INSTANCE'
GLEAN_ENV.URL        // 'GLEAN_URL'
GLEAN_ENV.API_TOKEN  // 'GLEAN_API_TOKEN'

Helper Functions

| Function | Description | |----------|-------------| | createGleanRegistry() | Create MCPConfigRegistry with Glean defaults | | createGleanEnv(instance, apiToken?) | Create env vars using instance name | | createGleanUrlEnv(url, apiToken?) | Create env vars using full URL | | createGleanHeaders(apiToken) | Create Authorization header | | buildGleanServerUrl(instance, endpoint?) | Build Glean MCP server URL | | normalizeGleanProductName(productName?) | Normalize product name for white-labeling (defaults to 'glean') | | buildGleanServerName(options) | Build server name with glean_ prefix | | normalizeGleanServerName(name, productName?) | Normalize server name to safe config key with prefix |

Server Name Functions

These functions handle server name generation with proper prefixing:

import {
  normalizeGleanProductName,
  buildGleanServerName,
  normalizeGleanServerName,
} from '@gleanwork/mcp-config-glean';

// Normalize product names for white-labeling
normalizeGleanProductName();              // 'glean'
normalizeGleanProductName('Acme Corp');   // 'acme_corp'

// Build server names with glean_ prefix
buildGleanServerName({ transport: 'stdio' });                              // 'glean_local'
buildGleanServerName({ transport: 'http' });                               // 'glean_default'
buildGleanServerName({ transport: 'http', serverUrl: '.../mcp/analytics' }); // 'glean_analytics'
buildGleanServerName({ serverName: 'custom' });                            // 'glean_custom'
buildGleanServerName({ agents: true });                                    // 'glean_agents'

// Normalize existing server names
normalizeGleanServerName('custom');        // 'glean_custom'
normalizeGleanServerName('glean_custom');  // 'glean_custom' (no double prefix)

Types

import type { GleanConnectionOptions, GleanEnvVars } from '@gleanwork/mcp-config-glean';

// GleanConnectionOptions extends MCPConnectionOptions with:
// - productName?: string  (for white-label support)
// - agents?: boolean      (use agents endpoint)

Re-exports

This package re-exports everything from @gleanwork/mcp-config-schema, so you can import both Glean-specific and generic types from a single package:

import {
  // Glean-specific
  createGleanRegistry,
  createGleanEnv,
  GLEAN_ENV,

  // From mcp-config-schema
  MCPConfigRegistry,
  type MCPConnectionOptions,
  type ClientId,
} from '@gleanwork/mcp-config-glean';

Migration from @gleanwork/mcp-config

If you're migrating from the older @gleanwork/mcp-config package:

  1. Update your package.json:

    - "@gleanwork/mcp-config": "^3.x"
    + "@gleanwork/mcp-config-glean": "^4.x"
  2. Update your imports:

    - import { ... } from '@gleanwork/mcp-config';
    + import { ... } from '@gleanwork/mcp-config-glean';

The API is fully compatible - no code changes required beyond the import path.

Related Packages

License

MIT