Glean MCP Integration: Choose Your Approach
Glean offers two ways to integrate with Model Context Protocol (MCP) to enable AI models to securely access and search your organization's knowledge:
Local MCP Server
Available Now
Self-hosted MCP server you install and configure locally. Full control over setup and immediate availability for any MCP-compatible application.
Remote MCP Server
Private Beta
Built directly into Glean's platform. No local setup required, enterprise-grade hosting with enhanced security and performance.
Which Approach Should I Use?
Choose the approach that best fits your needs:
Factor | Local MCP Server | Remote MCP Server |
---|---|---|
Availability | Available now | Private beta - contact Glean team |
Setup | Install & configure locally | No setup required |
Maintenance | You manage updates & hosting | Glean manages everything |
Security | Runs on your infrastructure | Enterprise-grade Glean infrastructure |
Performance | Depends on your local setup | Enterprise SLA with guaranteed uptime |
Available Tools | company_search , chat , people_profile_search , read_documents | Different tool set (details available to beta participants) |
Ideal For | Developers, quick testing, full control | Enterprise deployments, production use |
If you're just getting started or want to test MCP integration, begin with the Local MCP Server. You can always migrate to the Remote MCP Server when it becomes generally available.
Local MCP Server (Available Now)
The Local MCP Server is a self-hosted solution that you install and run on your own infrastructure. This gives you full control over the setup and allows immediate access to Glean's MCP capabilities.
@gleanwork/local-mcp-server
Official STDIO (local) MCP server implementation for Glean's search and chat capabilities
Features
- Enterprise Search: Access Glean's powerful content search capabilities
- Chat Interface: Interact with Glean's AI assistant
- MCP Compliant: Implements the Model Context Protocol specification
- Cross-Platform: Works with Cursor, VS Code, Windsurf, Claude Desktop, and more
- Easy Setup: Simple CLI configuration for popular MCP clients
Available Tools
The Local MCP Server provides the following 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.
Configuration
Authentication
The local MCP server can authenticate you in one of two ways:
- Using an OAuth token via device flow or
- Using a Glean Client API token
We recommend using OAuth whenever possible, for a better user experience and obviating the need to manage token issuance.
See here for instructions your Glean administrator can follow to setup OAuth device flow for Glean's MCP servers.
Currently, our MCP implementation uses the OAuth device flow or API tokens for authentication. While the MCP specification includes optional authorization mechanisms, we're using a simpler approach for now. Once the OAuth specification is widely adopted in the MCP ecosystem, we plan to implement a fully spec-compliant OAuth-based authentication for enhanced security and user management.
Using OAuth
First, make sure your administrator has enabled OAuth device flow for your Glean instance. See here for instructions.
Then follow the instructions for your IDE integration or Application Integration. When you run the configure command you'll be prompted to go through an OAuth device flow to grant access to your IDE or Application to communicate with Glean on your behalf.
Using Client API Tokens
API Tokens
To use API tokens you'll need a user-scoped API token. API Tokens require the following scopes: chat
, search
, documents
. You should speak to your Glean administrator to provision these tokens.
IDE Integrations
Cursor
Configure Cursor
- Configure using the CLI (OAuth)
- Configure using the CLI (Token)
- Configure manually (Token)
Prerequisites
First, make sure your administrator has enabled OAuth device flow for your Glean instance. See the Using OAuth section above for setup instructions.
Configure Cursor
Run the following command to configure Cursor to use Glean's MCP server. This will add a new MCP server to Cursor's settings.
npx -y @gleanwork/configure-mcp-server --client cursor --instance <your-glean-instance-name>
Test the Integration
Since MCP does not mandate a specific tool discovery interface, you may need to explicitly prompt Cursor's AI to use Glean's tools. Try prefixing your questions with phrases like "Using Glean, ..." or "Search in Glean for ..." to help the AI understand which tool to use.
- Open a new chat in Cursor
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that Cursor can access and search your Glean content
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure Cursor
Run the following command to configure Cursor to use Glean's MCP server. This will add a new MCP server to Cursor's settings.
Using explicit instance
and token
flags:
npx -y @gleanwork/configure-mcp-server --client cursor --instance <your-glean-instance-name> --token <your-glean-api-token>
Using a .env
file:
npx -y @gleanwork/configure-mcp-server --client cursor --env <path-to-env-file>
Test the Integration
Since MCP does not mandate a specific tool discovery interface, you may need to explicitly prompt Cursor's AI to use Glean's tools. Try prefixing your questions with phrases like "Using Glean, ..." or "Search in Glean for ..." to help the AI understand which tool to use.
- Open a new chat in Cursor
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that Cursor can access and search your Glean content
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure Cursor
- Click "Cursor" in the menu bar
- Select "Settings"
- Click "Cursor Settings"
- Navigate to the "MCP" section
- Click "Add new global MCP server"
- Add the following configuration to the opened
mcp.json
file:
{
"mcpServers": {
"glean": {
"command": "npx",
"args": ["-y", "@gleanwork/local-mcp-server"],
"env": {
"GLEAN_INSTANCE": "<your-glean-instance-name>",
"GLEAN_API_TOKEN": "<your-glean-api-token>"
}
}
}
}
- Close the file to save the configuration
Your MCP server should now be listed and Enabled, as shown below.

Test the Integration
Since MCP does not mandate a specific tool discovery interface, you may need to explicitly prompt Cursor's AI to use Glean's tools. Try prefixing your questions with phrases like "Using Glean, ..." or "Search in Glean for ..." to help the AI understand which tool to use.
- Open a new chat in Cursor
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that Cursor can access and search your Glean content
Windsurf
Configure Windsurf
- Configure using the CLI
- Configure manually
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure Windsurf
Run the following command to configure Windsurf to use Glean's MCP server. This will add a new MCP server to Windsurf's settings.
Using explicit instance
and token
flags:
npx -y @gleanwork/configure-mcp-server --client windsurf --instance <your-glean-instance-name> --token <your-glean-api-token>
Using a .env
file:
npx -y @gleanwork/configure-mcp-server --client windsurf --env <path-to-env-file>
Test the Integration
Since MCP does not mandate a specific tool discovery interface, you may need to explicitly prompt Cascade to use Glean's tools. Try prefixing your questions with phrases like "Using Glean, ..." or "Search in Glean for ..." to help Cascade understand which tool to use.
- Open a new chat in Windsurf
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that Windsurf can access and search your Glean content
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure Windsurf
- Click "Windsurf" in the menu bar
- Select "Settings"
- Click "Windsurf Settings"
- Under "Cascade / Model Context Protocol (MCP) Servers"
- Click "Add Server"
- Click "Add Custom Server"
- Add the following configuration to the opened
mcp_config.json
file:
{
"mcpServers": {
"glean": {
"command": "npx",
"args": ["-y", "@gleanwork/local-mcp-server"],
"env": {
"GLEAN_INSTANCE": "<your-glean-instance-name>",
"GLEAN_API_TOKEN": "<your-glean-api-token>"
}
}
}
}
- Close the file to save the configuration
Your MCP server should now be listed in the servers section, as shown below.

Test the Integration
Since MCP does not mandate a specific tool discovery interface, you may need to explicitly prompt Cascade to use Glean's tools. Try prefixing your questions with phrases like "Using Glean, ..." or "Search in Glean for ..." to help Cascade understand which tool to use.
- Open a new chat in Windsurf
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that Windsurf can access and search your Glean content
VS Code
Configure VS Code
- Global configuration
- Workspace configuration
VS Code supports global MCP server configuration that applies across all your workspaces. This is ideal for personal use.
- Configure using the CLI
- Configure manually
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure VS Code
Run the following command to configure VS Code to use Glean's MCP server globally.
Using explicit instance
and token
flags:
npx -y @gleanwork/configure-mcp-server --client vscode --instance <your-glean-instance-name> --token <your-glean-api-token>
Using a .env
file:
npx -y @gleanwork/configure-mcp-server --client vscode --env <path-to-env-file>
Test the Integration
VS Code has native MCP support with agent mode. You can access MCP tools through the Chat view in agent mode. Look for the Tools button to manage available MCP servers and tools.
- Open the Chat view in VS Code (⌃⌘I / Ctrl+Alt+I)
- Select Agent mode from the dropdown
- Click the Tools button to view available MCP tools
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that VS Code can access and search your Glean content
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure VS Code
- Open VS Code Command Palette (⌘⇧P / Ctrl+Shift+P)
- Run "MCP: Add Server" command
- Select "User Settings" when prompted
- Or manually edit your
settings.json
and add:
{
"mcp": {
"servers": {
"glean": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@gleanwork/local-mcp-server"],
"env": {
"GLEAN_INSTANCE": "<your-glean-instance-name>",
"GLEAN_API_TOKEN": "<your-glean-api-token>"
}
}
}
}
}
- Use "MCP: List Servers" command to view and manage your configured servers
Test the Integration
VS Code has native MCP support with agent mode. You can access MCP tools through the Chat view in agent mode. Look for the Tools button to manage available MCP servers and tools.
- Open the Chat view in VS Code (⌃⌘I / Ctrl+Alt+I)
- Select Agent mode from the dropdown
- Click the Tools button to view available MCP tools
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that VS Code can access and search your Glean content
VS Code supports workspace-specific MCP server configuration stored in .vscode/mcp.json
. This is ideal for teams to share configurations.
- Configure using the CLI
- Configure manually
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure VS Code
Run the following command from your workspace root to configure Glean's MCP server for this workspace.
Using explicit instance
and token
flags:
npx -y @gleanwork/configure-mcp-server --client vscode --instance <your-glean-instance-name> --token <your-glean-api-token> --workspace
Using a .env
file:
npx -y @gleanwork/configure-mcp-server --client vscode --env <path-to-env-file> --workspace
Test the Integration
VS Code has native MCP support with agent mode. You can access MCP tools through the Chat view in agent mode. Look for the Tools button to manage available MCP servers and tools.
- Open the Chat view in VS Code (⌃⌘I / Ctrl+Alt+I)
- Select Agent mode from the dropdown
- Click the Tools button to view available MCP tools
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that VS Code can access and search your Glean content
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure VS Code
- Create a
.vscode/mcp.json
file in your workspace root - Add the following configuration:
{
"inputs": [
{
"type": "promptString",
"id": "glean-instance",
"description": "Glean Instance"
},
{
"type": "promptString",
"id": "glean-api-token",
"description": "Glean API Token",
"password": true
}
],
"servers": {
"glean": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@gleanwork/local-mcp-server"],
"env": {
"GLEAN_INSTANCE": "${input:glean-instance}",
"GLEAN_API_TOKEN": "${input:glean-api-token}"
}
}
}
}
- Save the file. VS Code will automatically detect the MCP server configuration
- A "Start" button will appear in your
.vscode/mcp.json
file. Click it to start the MCP server - VS Code will prompt you for the instance name and API token when the server first starts
Test the Integration
VS Code has native MCP support with agent mode. You can access MCP tools through the Chat view in agent mode. Look for the Tools button to manage available MCP servers and tools.
- Open the Chat view in VS Code (⌃⌘I / Ctrl+Alt+I)
- Select Agent mode from the dropdown
- Click the Tools button to view available MCP tools
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that VS Code can access and search your Glean content
Application Integrations
Claude Desktop
Configure Claude Desktop
- Configure using the CLI
- Configure manually
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure Claude Desktop
Run the following command to configure Claude Desktop to use Glean's MCP server. This will add a new MCP server to Claude Desktop's settings.
Using explicit instance
and token
flags:
npx -y @gleanwork/configure-mcp-server --client claude --instance <your-glean-instance-name> --token <your-glean-api-token>
Using a .env
file:
npx -y @gleanwork/configure-mcp-server --client claude --env <path-to-env-file>
Test the Integration
Since MCP does not mandate a specific tool discovery interface, you may need to explicitly prompt Claude to use Glean's tools. Try prefixing your questions with phrases like "Using Glean, ..." or "Search in Glean for ..." to help Claude understand which tool to use.
- Start a new conversation in Claude Desktop
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that Claude can access and search your Glean content
Get Credentials
Ensure you have your Glean API credentials ready from the Configuration section above. You'll need:
- Your Glean instance name
- A user-scoped API token
Configure Claude Desktop
- Click "Claude" in the menu bar
- Select "Settings..."
- Click on "Developer"
- Click "Edit Config" to open your
claude_desktop_config.json
file - Add the following configuration:
{
"mcpServers": {
"glean": {
"command": "npx",
"args": ["-y", "@gleanwork/local-mcp-server"],
"env": {
"GLEAN_INSTANCE": "<your-glean-instance-name>",
"GLEAN_API_TOKEN": "<your-glean-api-token>"
}
}
}
}
- Save and close the file
- Restart Claude Desktop
The config file is typically located at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
Your MCP server should now be listed, as shown below.

Test the Integration
Since MCP does not mandate a specific tool discovery interface, you may need to explicitly prompt Claude to use Glean's tools. Try prefixing your questions with phrases like "Using Glean, ..." or "Search in Glean for ..." to help Claude understand which tool to use.
- Start a new conversation in Claude Desktop
- Try a query like "Using Glean, what's our company's policy on remote work?"
- Verify that Claude can access and search your Glean content
Remote MCP Server (Private Beta)
The Remote MCP Server is built directly into Glean's platform, providing enterprise-grade hosting, security, and performance without requiring any local setup or maintenance.
The Remote MCP Server is currently in private beta. It's available to select enterprise customers and requires special access from the Glean team.
Key Benefits
- Zero Setup: No installation, configuration, or maintenance required
- Enterprise Security: Built on Glean's secure, SOC 2 compliant infrastructure
- High Performance: Enterprise SLA with guaranteed uptime and response times
- Automatic Updates: Always running the latest features and security patches
- Centralized Management: IT teams can manage access and permissions centrally
- Scalable: Handles enterprise-scale workloads without performance degradation
How It Works
The Remote MCP Server operates as a cloud service within Glean's infrastructure:
- Direct Integration: MCP clients connect directly to Glean's hosted endpoints
- Authentication: Uses your existing Glean authentication and permissions
- Real-time Access: Provides live access to your organization's knowledge base
- Audit & Compliance: Full audit logging and compliance reporting available
Enhanced Capabilities
The Remote MCP Server provides a different set of tools optimized for enterprise use. Specific tool details and capabilities are shared with beta participants upon access approval.
Beta Access
To join the Remote MCP Server private beta:
Request Beta Access
Contact your Glean account representative to request access.
What to Include in Your Request:
- Your organization name and Glean instance
- Intended use cases for MCP integration
- Expected number of users
Next Steps
- Choose Your Approach: Review the comparison table above
- Local Setup: Follow the configuration guide for immediate access
- Beta Access: Contact Glean for Remote MCP Server access
- Integration: Connect your favorite MCP-compatible tools (Cursor, VS Code, Claude, etc.)