A Model Context Protocol (MCP) server that integrates with Glean's Chat API.
Clone this repository:
git clone https://github.com/rahul-roy-glean/glean-mcp-server.git
cd glean-mcp-server
Install dependencies using UV:
uv sync
uv lock
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/
To run the server in standalone mode:
uv --directory <PATH_TO_CHECKOUT> run glean_server.py
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
}
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"
]
}
}
}
{
"mcpServers": {
"glean": {
"env": {},
"args": [
"--directory",
"<PATH_TO_CHECKOUT>",
"run",
"glean_server.py"
],
"command": "uv"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.