Glean MCP Server

by rahul-roy-glean

261 downloads
Not rated
GitHub

About

A Model Context Protocol (MCP) server that integrates with Glean's Chat API. It allows AI‑assisted tools to query Glean data using a standard MCP interface.

Details

Author
rahul-roy-glean
Downloads
261
Categories
Other

- Integrates with Glean’s Chat API via MCP.
- Uses the UV package manager for dependency management.
- Supports standalone and MCP inspector debug modes.
- Can be configured with environment variables for credentials.
- Compatible with Cursor for AI‑powered coding assistance.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Glean MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, create a .env file with GLEAN_API_KEY and GLEAN_BASE_URL, then run uv --directory <PATH_TO_CHECKOUT> run glean_server.py. For integration with Cursor, add the command configuration to ~/.cursor/mcp.json.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "glean mcp server": {
            "glean": {
                "command": "uv",
                "args": [
                    "--directory",
                    "<PATH_TO_CHECKOUT>",
                    "run",
                    "glean_server.py"
                ]
            }
        }
    }
}

McpServers

{
    "glean": {
        "command": "uv",
        "args": [
            "--directory",
            "<PATH_TO_CHECKOUT>",
            "run",
            "glean_server.py"
        ]
    }
}

Glean MCP Server

A Model Context Protocol (MCP) server that integrates with Glean's Chat API.

Prerequisites

Python 3.10+
UV package manager (recommended)
Glean API key with appropriate permissions(/rest/api/v1/)

Installation

1. Clone this repository:

   git clone https://github.com/rahul-roy-glean/glean-mcp-server.git
cd glean-mcp-server

2. Install dependencies using UV:

   uv sync
uv lock

Configuration

Before running the server, you need to set up your Glean API credentials. Create a .env file in the project root with the following variables:

GLEAN_API_KEY=your_api_key_here
GLEAN_BASE_URL=https://your-domain-be.glean.com/rest/api/v1/

Running the Server

Standalone Mode

To run the server in standalone mode:

uv --directory <PATH_TO_CHECKOUT> run glean_server.py

Debug Mode

To debug the server with the MCP inspector:

npx @modelcontextprotocol/inspector uv --directory <PATH_TO_CHECKOUT> run glean_server.py

You can then test with JSON payloads like:

{
  "messages": [
    {
      "author": "USER",
      "fragments": [
        {
          "text": "What are the company holidays in 2025 ?"
        }
      ],
      "messageType": "CONTENT"
    }
  ],
  "saveChat": true,
  "stream": false
}

Integration with Cursor

To use this server with Cursor, add the following to ~/.cursor/mcp.json:

{
    "mcpServers": {       
        "glean": {
            "command": "uv",
            "args": [
                "--directory",
                "<PATH_TO_CHECKOUT>",
                "run", "glean_server.py"
            ]
        }
    }
}

Documentation Links

Model Context Protocol Documentation
Glean API Documentation

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.