@gleanwork/local-mcp-server

中文文档
0.10.1发布于 2026/03/07MITTypeScriptES Module近 30 天下载 5330

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).

原始使用文档
文档目录18 节
  1. Features
  2. Tools
  3. company_search
  4. chat
  5. people_profile_search
  6. read_documents
  7. MCP Client Configuration
  8. Manual MCP Configuration
  9. Docker Deployment
  10. Pull the Image
  11. MCP Client Configuration
  12. Environment Variables
  13. Troubleshooting
  14. Docker Compose
  15. Debugging
  16. Contributing
  17. License
  18. Support

@gleanwork/local-mcp-server

MCP Server CI Build npm version License

Note: We recommend using the remote MCP server integrated directly in Glean instead of this local MCP server. The remote server provides a more seamless experience with automatic updates, better performance, and simplified configuration. This local MCP server is primarily intended for experimental and testing purposes.

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
  • Read Documents: Retrieve documents from Glean by ID or URL
  • 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.

  • read_documents

    Read documents from Glean by providing document IDs or URLs. This tool allows you to retrieve the full content of specific documents for detailed analysis or reference.

MCP Client Configuration

To configure this MCP server in your MCP client (such as Claude Desktop, Windsurf, Cursor, etc.), run @gleanwork/configure-mcp-server passing in your client, token and instance.

# Configure for Cursor
npx @gleanwork/configure-mcp-server --client cursor --token your_api_token --server-url https://your-company-be.glean.com

# Configure for Claude Desktop
npx @gleanwork/configure-mcp-server --client claude --token your_api_token --server-url https://your-company-be.glean.com

# Using deprecated --instance flag (use --server-url instead)
# npx @gleanwork/configure-mcp-server --client cursor --token your_api_token --instance instance_name

For more details see: @gleanwork/configure-mcp-server.

Manual MCP Configuration

To manually configure an 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/local-mcp-server"],
      "env": {
        "GLEAN_SERVER_URL": "<glean server URL>",
        "GLEAN_API_TOKEN": "<glean api token>"
      }
    }
  }
}

Replace the environment variable values with your actual Glean credentials.

Docker Deployment

As an alternative to npx, you can run the Glean MCP server in a Docker container. This provides isolation and consistent runtime environments.

Multi-architecture Docker images are published to GitHub Container Registry and work on both Intel/AMD (amd64) and Apple Silicon (arm64) systems.

Pull the Image

docker pull ghcr.io/gleanwork/local-mcp-server:latest

MCP Client Configuration

Configure your MCP client to use the Docker image. Most MCP clients support passing environment variables via the env block:

{
  "mcpServers": {
    "glean": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/gleanwork/local-mcp-server:latest"
      ],
      "env": {
        "GLEAN_SERVER_URL": "https://your-instance-be.glean.com",
        "GLEAN_API_TOKEN": "your-token"
      }
    }
  }
}

If your MCP client doesn't pass the env block to Docker, use -e flags in the args instead:

{
  "mcpServers": {
    "glean": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GLEAN_SERVER_URL=https://your-instance-be.glean.com",
        "-e",
        "GLEAN_API_TOKEN=your-token",
        "ghcr.io/gleanwork/local-mcp-server:latest"
      ]
    }
  }
}

Important: The -i flag is required for stdio transport communication.

Environment Variables

  • GLEAN_SERVER_URL (recommended): Your Glean server URL (e.g. https://your-instance-be.glean.com)
  • GLEAN_INSTANCE: Your Glean instance name (deprecated alternative to GLEAN_SERVER_URL)
  • GLEAN_API_TOKEN (required): Your Glean API token

Troubleshooting

Container exits immediately:

  • Verify environment variables are set correctly
  • Check Docker logs: docker logs <container-id>
  • Ensure the -i flag is present in the args

Permission or authentication errors:

  • Verify your GLEAN_API_TOKEN is valid
  • Check your GLEAN_SERVER_URL or GLEAN_INSTANCE matches your Glean deployment

MCP client can't connect:

  • Verify Docker is installed and running
  • Check that docker command is in your PATH
  • Review MCP client logs for error messages

Environment variables not being passed:

  • Try using -e flags in args instead of the env block (see alternative configuration above)

Docker Compose

For standalone deployment scenarios, a docker-compose example is available in examples/docker-compose.yaml. This demonstrates how to run the MCP server with Docker Compose, including resource limits and security options.

Note: Most MCP clients manage container lifecycle directly, so docker-compose is primarily useful for testing or custom deployment scenarios.

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/local-mcp-server 共发布 22 个版本,首次发布于 2025/06/17;过去 12 个月发布了 4 个版本。

版本发布日期距今
0.10.1latest2026/03/078 个月前
0.10.02026/03/068 个月前
0.9.12025/12/0211 个月前
0.9.02025/11/2211 个月前
0.8.02025/08/271.2 年前
0.7.182025/08/091.3 年前

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

@gleanwork/local-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/local-mcp-server?

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

@gleanwork/local-mcp-server 支持 TypeScript 吗?

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

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

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

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

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

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

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

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

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

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

最新版本 0.10.1 发布于 2026/03/07(8 个月前);至今共发布 22 个版本,其中过去 12 个月发布了 4 个;首次发布于 2025/06/17。作者已将其标记为弃用,新项目建议寻找替代方案。