# @gleanwork/mcp-server 中文文档

规范地址：https://npmcn.com/package/%40gleanwork/mcp-server/

版本：0\.7\.1
npm 元数据更新时间：2026-06-30T15:09:26.771Z
中文译文更新时间：2026-11-16T15:41:18.174Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40gleanwork/mcp-server
原文对照：https://npmcn.com/package/%40gleanwork/mcp-server/?lang=original
项目主页：https://github.com/gleanwork/mcp-server#readme
源码仓库：https://github.com/gleanwork/mcp-server

弃用说明：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\)\.

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：293 kB，115 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=20
- 运行依赖：8 个
- 首次发布：2025-03-14T15:50:26.240Z
- 最新版本发布：2025-05-29T14:43:43.819Z
- 近 30 天下载量：12951（2026-10-17 至 2026-11-15，npm 官方下载统计）
- 已发布版本数：15（近 12 个月 0 个）

## 中文简介

Glean API 集成的 MCP 服务器

## 安装

```sh
npm install @gleanwork/mcp-server
```

也可以使用：`pnpm add @gleanwork/mcp-server`、`yarn add @gleanwork/mcp-server`、`bun add @gleanwork/mcp-server`

## README

# @ gleanwork/ mcp- 服务器

![MCP Server](https://badge.mcpx.dev/?type=server "MCP Server") ![CI Build](https://github.com/gleanwork/mcp-server/actions/workflows/ci.yml/badge.svg) [![npm version](https://badge.fury.io/js/@gleanwork%2Fmcp-server.svg)](https://badge.fury.io/js/@gleanwork%2Fmcp-server) [![License](https://img.shields.io/npm/l/@gleanwork%2Fmcp-server.svg)](https://github.com/gleanwork/mcp-server/blob/main/LICENSE)

Glean MCP 服务器是一个 [示范背景协议(MCP)](https://modelcontextprotocol.io/introduction) 服务器,提供与 Glean 的企业知识的无缝集成.

## 特征

-   **公司搜索**: Access Glean 强大的内容搜索能力
-   **人物简介搜索**: 访问 Glean 的人事目录
-   **聊天**: 与 Glean 的 AI 助手互动
-   **MCP 共通词**: 执行示范背景协议规格

## 工具

-   ### 公司搜索( s)
    
    使用 Glean 搜索 API 搜索 Glean 的内容索引 。 此工具允许您使用各种过滤和配置选项查询 Glean 的内容索引 .
    
-   ### 聊天
    
    与Glean的AI助手使用Glean Chat API进行互动. 此工具允许您与 Glean 的 AI 进行对话交互, 包括支持信件历史、 引用和各种配置选项 .
    
-   ### 人物 profile 搜索
    
    搜索 Glean's People directory 查找员工信息.
    

## 配置

### API 托肯斯

你需要清扫 [API 证书](https://developers.glean.com/client/authentication#glean-issued-tokens),特别是 [用户范围 API 令牌](https://developers.glean.com/client/authentication#user)API 软件 托肯斯需要下列范围: `chat`, (中文(简体) ), `search`。您应该与您的 Glean 管理员交谈,以提供这些标志.

### 配置环境变量

1.  设置您的 Glean API 证书 :
    
    ```bash
    export GLEAN_INSTANCE=instance_name
    export GLEAN_API_TOKEN=your_api_token
    ```
    
    注:对于后向相容性, `GLEAN_SUBDOMAIN` 仍然支持,但 `GLEAN_INSTANCE` 优先选择.
    
2.  (备选)用于 [全球符号](https://developers.glean.com/indexing/authentication/permissions#global-tokens) 支持冒用:
    
    ```bash
    export GLEAN_ACT_AS=user@example.com
    ```
    

## 客户端配置

您可以使用内置配置工具为您的 MCP 客户端自动设置 Glean :

```bash
# 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
```

也可以使用环境文件:

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

环境文件应包含:

```bash
GLEAN_INSTANCE=instance_name
GLEAN_API_TOKEN=your_api_token
```

配置后 :

-   对于光标:重新启动光标和代理将访问 Glean 工具
-   对于 Claude 桌面: 重新启动 Claude 并使用锤子图标访问 Glean 工具
-   用于 Windsurf: 打开设置 > 高级设置, 滚动到 Cascade 区域, 按刷新

## MCP 客户端配置

要在您的 MCP 客户端中配置此 MCP 服务器( 如 Claude Desktop, Windsurf, Cursor等), 在您的 MCP 客户端设置中添加以下配置 :

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

将环境变量值替换为您实际的 Glean 证书 .

### 调试

由于MCP服务器通过stdio通信,调试可能具有挑战性. 我们建议使用 [MCP 检查员](https://github.com/modelcontextprotocol/inspector),以软件包脚本形式提供:

```bash
npm run inspector
```

检查员将提供一个 URL 访问您的浏览器中的调试工具 .

## 捐款

请看 [捐款额](https://npmcn.com/package/%40gleanwork/mcp-server/CONTRIBUTING.md) (c) 发展结构和准则.

## 许可证

麻省理工学院的执照 - 看 [自由主义](https://npmcn.com/package/%40gleanwork/mcp-server/LICENSE) 详细文件

## 支助

-   联合国 [docs.glean.com 页面存档备份,存于互联网档案馆](https://docs.glean.com/)
-   问题: [GitHub 问题](https://github.com/gleanwork/mcp-server/issues)
-   电子邮件 : [支持@glean.com](mailto:support@glean.com)

## 常见问题

### @gleanwork/mcp-server 是什么？

Glean API 集成的 MCP 服务器注意：该包已被作者标记为弃用——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。作者已将其标记为弃用，新项目建议寻找替代方案。

