The MCP Endpoint: Connect Glean as an MCP Server
Exposing the graph to agent hosts over Model Context Protocol
You'll be able to
- Describe what Glean's MCP server exposes and how a host connects to it
- Write a host MCP config that points at the Glean endpoint with a scoped token
Read first
Day 2 Lab
- Open Glean's MCP documentation and note what the server exposes (search and the tools the host can call).
- Decide which host you'll connect (an IDE, a desktop agent) and where it reads server configs.
- Write the host's MCP server entry pointing at the Glean endpoint, with the token supplied from the environment β never inline.
- Confirm the connection lists Glean's tools, then run one read to verify results respect your permissions.
Working Example: A Host MCP Server Config
Glean provides an MCP server so a host can connect to the enterprise graph over Model Context Protocol. The host registers the server by URL and authenticates with a Glean-issued, scoped token; the token still resolves to a user, so retrieval remains permissions-aware. The token is read from the environment, never hard-coded. Verified against mcp.
{
"mcpServers": {
"glean": {
"type": "http",
"url": "https://<your-instance>-be.glean.com/mcp/default",
"headers": {
"Authorization": "Bearer ${GLEAN_MCP_TOKEN}"
}
}
}
}
Adding the server is a GOVERN decision, not just a wiring step: you are declaring which host may reach the graph and under whose identity. The token is scoped and acts as a user, so the MCP endpoint does not widen access β it only relays it. Verified against mcp.
Check for understanding
What does the MCP server expose to a host, and what does it deliberately NOT change about access?
Check yourself
1. Glean describes three agent run-modes. Which list matches them?
2. When a host connects to Glean's MCP server with a scoped token, what happens to access?
3. In a guarded multi-tool agent loop, what is the job of the pre-action gate?
4. Across CrewAI, Google ADK, LangGraph, and the OpenAI Agents SDK, what does every Glean tool have in common?
5. Which statement about this curriculum is accurate?
In 10 seconds
βGlean ships an MCP server so agent hosts can reach the enterprise graph through one declared endpoint. The host adds it as a server, authenticates with a scoped token, and retrieval stays permissions-aware.β
IDE Plugins: Glean in Claude Code and Cursor via MCP