Skip to content

Glean MCP Server implementation#1

Merged
steve-calvert-glean merged 14 commits intomainfrom
initial-implementation
Mar 13, 2025
Merged

Glean MCP Server implementation#1
steve-calvert-glean merged 14 commits intomainfrom
initial-implementation

Conversation

@steve-calvert-glean
Copy link
Collaborator

@steve-calvert-glean steve-calvert-glean commented Mar 11, 2025

Summary

⚠️ This is an uncharacteristically large PR, and is much larger than what I would normally push as a single change. Going forward additions will be small and focused. Don't hate me.

Initial implementation of a Glean MCP server for search and chat. This PR implements the following:

  1. MCP server configured with list and call request handlers
  2. search and chat tool implementations
  3. Full schema validation support
  4. Initial unit tests.

See the README.md Rendered

How to test drive

  1. Clone the repo: git clone git@github.com:gleanwork/server-glean.git && cd server-glean
  2. Install deps and build: pnpm install && pnpm build
  3. Check the tests pass: pnpm test
  4. Run the MCP inspector: pnpm inspect. Open the localhost URL provided. You'll need to set two environment variables: GLEAN_SUBDOMAIN (I was using scio-prod to test), and GLEAN_API_TOKEN.
  5. Click "List tools", click search. Enter a query and pagesize, then click "Run Tool" (you need to scroll the pane down to see the button).
  6. Ensure output returns results.

Example:

mcp-server.mov

@steve-calvert-glean steve-calvert-glean requested review from a user and ayushi-mrigen-glean and removed request for a user and ayushi-mrigen-glean March 12, 2025 19:23
@steve-calvert-glean
Copy link
Collaborator Author

The repo/server name is a little general (server-glean - or more precisely @gleanwork/server-glean). I was following a convention that I saw from Anthropic for naming servers, but upon further reflection, it doesn't really do a good job conveying semantic meaning. @john-agan-glean also brought this up as a first reaction - not off base at all.

So, we have a few options:

  1. @gleanwork/mcp-server-glean - puts MCP front and center
  2. @gleanwork/glean-mcp-server - reads more like English

I'm open to either of those, or other suggestions!

@ghost
Copy link

ghost commented Mar 12, 2025

reviewed the code and looks good -- only had minor/non-blocking feedback. I haven't tested it yet...

@ghost
Copy link

ghost commented Mar 12, 2025

I'm team @gleanwork/glean-mcp-server or @gleanwork/mcp-server on naming

@steve-calvert-glean
Copy link
Collaborator Author

I'm a big +1 on @gleanwork/mcp-server. Renamed to that!

@steve-calvert-glean steve-calvert-glean requested a review from a user March 12, 2025 22:18
@ghost ghost self-assigned this Mar 13, 2025
@ghost ghost self-requested a review March 13, 2025 16:10
@steve-calvert-glean steve-calvert-glean merged commit 3865100 into main Mar 13, 2025
3 checks passed
@steve-calvert-glean steve-calvert-glean added the enhancement New feature or request label Mar 14, 2025
@david-hamilton-glean david-hamilton-glean deleted the initial-implementation branch May 9, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant