g

gleanwork

@gleanwork/mcp-server
Hosted
0 Stars 394 次浏览 gleanwork 更新于 2026-08-23

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

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

可用工具 (3 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

company_search

Find relevant company documents and data Example request: { query: What are the company holidays this year?, datasources: [drive, confluence] }

该工具无需必填参数,直接调用即可

chat

Chat with Glean Assistant using Glean s RAG Example request: { message: What are the company holidays this year?, context: [ Hello, I need some information about time off., I m planning my vacation for next year. ] }

该工具无需必填参数,直接调用即可

people_profile_search

Search for people profiles in the company Example request: { query: Find people named John Doe, filters: { department: Engineering, city: San Francisco }, pageSize: 10 }

该工具无需必填参数,直接调用即可

服务介绍

@gleanwork/mcp-server

![MCP Server](https://badge.mcpx.dev?type=server MCP Server )
CI Build
npm version
License

Glean MCP 服务器是一个 模型上下文协议 (MCP) 服务器,它提供了与 Glean 企业知识的无缝集成。

功能

  • 公司搜索:访问 Glean 强大的内容搜索功能
  • 人员资料搜索:访问 Glean 的人员目录
  • 聊天:与 Glean 的 AI 助手交互
  • 符合 MCP 标准:实现模型上下文协议规范

工具

  • 使用 Glean 搜索 API 搜索 Glean 的内容索引。此工具允许您使用各种过滤和配置选项查询 Glean 的内容索引。

  • chat

    使用 Glean 聊天 API 与 Glean 的 AI 助手进行交互。此工具允许您与 Glean 的 AI 进行对话式交互,包括支持消息历史记录、引用和各种配置选项。

  • 搜索 Glean 的人员目录以查找员工信息。

配置

API 令牌

您需要 Glean API 凭证,特别是 用户范围的 API 令牌。API 令牌需要以下权限范围:chatsearch。您应该联系您的 Glean 管理员来提供这些令牌。

配置环境变量

  1. 设置您的 Glean API 凭证:

    bash
    export GLEAN_INSTANCE=instance_name
    export GLEAN_API_TOKEN=your_api_token

    注意:为了向后兼容,GLEAN_SUBDOMAIN 仍然被支持,但推荐使用 GLEAN_INSTANCE

  2. (可选)对于支持模拟的 全局令牌

    bash
    export GLEAN_ACT_AS=user@example.com

客户端配置

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

bash

为 Cursor 配置

npx @gleanwork/mcp-server configure --client cursor --token your_api_token --instance instance_name

为 Claude Desktop 配置

npx @gleanwork/mcp-server configure --client claude --token your_api_token --instance instance_name

为 VS Code 配置

npx @gleanwork/mcp-server configure --client vscode --token your_api_token --instance instance_name

为 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

配置完成后:

  • 对于 Cursor:重启 Cursor 后,代理将可以访问 Glean 工具
  • 对于 Claude Desktop:重启 Claude 并使用锤子图标访问 Glean 工具
  • 对于 Windsurf:打开设置 > 高级设置,滚动到 Cascade 部分,并按刷新

MCP 客户端配置

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

json
{
"mcpServers": {
"glean": {
"command": "npx",
"args": ["-y", "@gleanwork/mcp-server"],
"env": {
"GLEAN_INSTANCE": "<glean 实例名称>",
"GLEAN_API_TOKEN": "<glean api 令牌>"
}
}
}
}

用您的实际 Glean 凭证替换环境变量值。

调试由于MCP服务器通过stdio进行通信,调试可能会比较困难。我们推荐使用MCP Inspector,它作为一个包脚本提供:

bash
npm run inspector

Inspector将提供一个URL,您可以通过浏览器访问调试工具。

贡献

请参阅CONTRIBUTING.md以获取开发设置和指南。

许可证

MIT许可证 - 详情请见LICENSE文件

支持

相关 MCP 服务