gleanwork

@gleanwork/mcp-server

Community gleanwork
Updated

MCP server for Glean API integration

@gleanwork/mcp-server

MCP ServerCI Buildnpm versionLicense

A Model Context Protocol (MCP) server implementation for Glean's search and chat capabilities. This server provides a standardized interface for AI models to interact with Glean's content search and conversational AI features.

Features

  • Search Integration: Access Glean's powerful content search capabilities
  • Chat Interface: Interact with Glean's AI assistant
  • MCP Compliant: Implements the Model Context Protocol specification

Tools

  • glean_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.

    For complete parameter details, see Search API Documentation

  • glean_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.

    For complete parameter details, see Chat API Documentation

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_SUBDOMAIN=your_subdomain
    export GLEAN_API_TOKEN=your_api_token
    
  2. (Optional) For global tokens that support impersonation:

    export [email protected]
    

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_SUBDOMAIN": "<glean instance subdomain>",
        "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

MCP Server ยท Populars

MCP Server ยท New