# gleanwork
## 基本信息
- Slug: `gleanwork-mcp-server`
- Source: modelscope
- Publisher: @gleanwork/mcp-server
- Categories: search / knowledge-and-memory / rag-systems
- Hosted: Yes
- License: MIT License
- Source URL: https://www.modelscope.cn/mcp/servers/@gleanwork/mcp-server
## 简介
暂无描述。
## MCP Server 详情

# @gleanwork/mcp-server

![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 企业知识的无缝集成。

## 功能

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

## 工具

- ### company_search

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

- ### chat

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

- ### people_profile_search

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

## 配置

### API 令牌

您需要 Glean [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`。

1. （可选）对于支持模拟的 [全局令牌](https://developers.glearn.com/indexing/authentication/permissions#global-tokens)：

   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](https://github.com/modelcontextprotocol/inspector)，它作为一个包脚本提供：

bash
npm run inspector


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

## 贡献

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

## 许可证

MIT许可证 - 详情请见[LICENSE](LICENSE)文件

## 支持

- 文档：[docs.glean.com](https://docs.glean.com)
- 问题：[GitHub Issues](https://github.com/gleanwork/mcp-server/issues)
- 邮件：[support@glean.com](mailto:support@glean.com)

