@gleanwork/mcp-server

中文文档
0.7.1发布于 2025/05/29MITTypeScriptES Module近 30 天下载 1.3万

MCP server for Glean API integration

此软件包已被标记为弃用

Deprecated. Use Glean's remote MCP server (https://docs.glean.com/administration/platform/mcp/about) or the Glean CLI (https://github.com/gleanwork/glean-cli).

原始使用文档
文档目录14 节
  1. Features
  2. Tools
  3. company_search
  4. chat
  5. people_profile_search
  6. Configuration
  7. API Tokens
  8. Configure Environment Variables
  9. Client Configuration
  10. MCP Client Configuration
  11. Debugging
  12. Contributing
  13. License
  14. Support

@gleanwork/mcp-server

MCP Server CI Build npm version License

The Glean MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with Glean's enterprise knowledge.

Features

  • Company Search: Access Glean's powerful content search capabilities
  • People Profile Search: Access Glean's people directory
  • Chat: Interact with Glean's AI assistant
  • MCP Compliant: Implements the Model Context Protocol specification

Tools

  • company_search

    Search Glean's content index using the Glean Search API. This tool allows you to query Glean's content index with various filtering and configuration options.

  • chat

    Interact with Glean's AI assistant using the Glean Chat API. This tool allows you to have conversational interactions with Glean's AI, including support for message history, citations, and various configuration options.

  • people_profile_search

    Search Glean's People directory to find employee information.

Configuration

API Tokens

You'll need Glean API credentials, and specifically a user-scoped API token. API Tokens require the following scopes: chat, search. You should speak to your Glean administrator to provision these tokens.

Configure Environment Variables

  1. Set up your Glean API credentials:

    export GLEAN_INSTANCE=instance_name
    export GLEAN_API_TOKEN=your_api_token
    

    Note: For backward compatibility, GLEAN_SUBDOMAIN is still supported, but GLEAN_INSTANCE is preferred.

  2. (Optional) For global tokens that support impersonation:

    export [email protected]
    

Client Configuration

You can use the built-in configuration tool to automatically set up Glean for your MCP client:

# Configure for Cursor
npx @gleanwork/mcp-server configure --client cursor --token your_api_token --instance instance_name

# Configure for Claude Desktop
npx @gleanwork/mcp-server configure --client claude --token your_api_token --instance instance_name

# Configure for VS Code
npx @gleanwork/mcp-server configure --client vscode --token your_api_token --instance instance_name

# Configure for Windsurf
npx @gleanwork/mcp-server configure --client windsurf --token your_api_token --instance instance_name

Alternatively, you can use an environment file:

npx @gleanwork/mcp-server configure --client cursor --env path/to/.env.glean

The environment file should contain:

GLEAN_INSTANCE=instance_name
GLEAN_API_TOKEN=your_api_token

After configuration:

  • For Cursor: Restart Cursor and the agent will have access to Glean tools
  • For Claude Desktop: Restart Claude and use the hammer icon to access Glean tools
  • For Windsurf: Open Settings > Advanced Settings, scroll to Cascade section, and press refresh

MCP Client Configuration

To configure this MCP server in your MCP client (such as Claude Desktop, Windsurf, Cursor, etc.), add the following configuration to your MCP client settings:

{
  "mcpServers": {
    "glean": {
      "command": "npx",
      "args": ["-y", "@gleanwork/mcp-server"],
      "env": {
        "GLEAN_INSTANCE": "<glean instance name>",
        "GLEAN_API_TOKEN": "<glean api token>"
      }
    }
  }
}

Replace the environment variable values with your actual Glean credentials.

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Contributing

Please see CONTRIBUTING.md for development setup and guidelines.

License

MIT License - see the LICENSE file for details

Support

版本与发布记录

@gleanwork/mcp-server 共发布 15 个版本,首次发布于 2025/03/14;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.7.1latest2025/05/291.5 年前
0.7.02025/05/241.5 年前
0.6.12025/05/151.5 年前
0.6.02025/05/151.5 年前
0.5.02025/05/131.5 年前
0.4.02025/05/121.5 年前

其他发布通道:alpha → 0.1.0-alpha.6。

关于 @gleanwork/mcp-server 的常见问题

@gleanwork/mcp-server 是什么?

MCP server for Glean API integration注意:该包已被作者标记为弃用——Deprecated. Use Glean's remote MCP server (https://docs.glean.com/administration/platform/mcp/about) or the Glean CLI (https://github.com/gleanwork/glean-cli).

如何安装 @gleanwork/mcp-server?

在项目目录运行 npm install @gleanwork/mcp-server,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 glean-mcp-server,可以用 npx glean-mcp-server 直接运行。

@gleanwork/mcp-server 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@gleanwork/mcp-server 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@gleanwork/mcp-server 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@gleanwork/mcp-server 可以商用吗?

@gleanwork/mcp-server 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@gleanwork/mcp-server 的下载量有多少?

根据 npm 官方下载统计,@gleanwork/mcp-server 在 2026/10/17 – 2026/11/15 这 30 天内被下载 12,951 次,日均约 432 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@gleanwork/mcp-server 还在维护吗?

最新版本 0.7.1 发布于 2025/05/29(1.5 年前);至今共发布 15 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/03/14。作者已将其标记为弃用,新项目建议寻找替代方案。