MCP for Engineering
Overview
Engineering teams use Glean's MCP server in their IDEs to access enterprise context without leaving their development environment. These examples come from validated, production use cases.
Prerequisites
Recommended connectors:
- GitHub (or GitLab, Bitbucket)
- Jira (or Linear, Asana)
- Slack
- Confluence (or Notion)
- Google Drive (for design docs and RFCs)
Supported MCP hosts:
- Cursor
- VS Code with extensions
- Claude Desktop
- Windsurf
- Claude Code
Use Cases
1. Stack Trace Debugging
When you encounter an error, Glean can find similar past issues, known fixes, and relevant experts.
What it does:
- Parses the stack trace to identify key error messages
- Searches Slack, Jira, and GitHub for similar errors
- Finds documentation about error handling
- Suggests the right expert or Slack channel if confidence is low
Real user flow: Highlight a terminal error → Ask your IDE assistant to check Glean → Get context without leaving your editor.
2. Understanding Code History
Find out why code was written a certain way by tracing through PRs, design docs, and Slack discussions.
What it does:
- Searches GitHub for the original PR and review comments
- Finds related design docs or RFCs
- Locates Slack discussions that influenced the decision
- Synthesizes the "why" behind implementation choices
3. CI/CD Pipeline Failures
Explain pipeline failures by correlating logs with recent code changes, known flakes, and similar incidents.
What it does:
- Correlates failure logs with recent commits
- Searches for similar failures and their resolutions
- Identifies known flaky tests
- Recommends retry vs fix strategy
4. PR Review and Documentation
Generate PR descriptions that link to relevant context, and perform code reviews based on your team's standards.
What it does:
- Generates comprehensive PR descriptions with context
- Links to related tickets, RFCs, and discussions
- Checks code against documented standards
- Suggests appropriate reviewers
5. Codebase Onboarding
Speed up understanding of unfamiliar code by pulling together docs, architectural context, and ownership info.
What it does:
- Finds onboarding documentation and developer guides
- Locates architecture diagrams and RFCs
- Identifies code owners and subject matter experts
- Surfaces recent changes and active work
6. Jira Bug Triage
Quickly understand bugs by pulling together ticket details, Slack escalations, and similar past issues.
What it does:
- Retrieves full ticket context including comments
- Links related Slack discussions and escalations
- Finds duplicate or similar issues
- Suggests owners and next steps
7. Write Code Aligned with Style
Ensure new code follows team conventions by checking style guides before generating suggestions.
What it does:
- Searches for documented style guides
- Reviews past code review feedback
- Ensures consistency with team conventions
8. RFC to Implementation Drift
Compare design documents to actual implementation to find what changed and what needs updating.
What it does:
- Retrieves original design documents
- Compares with current code implementation
- Identifies undocumented changes
- Suggests documentation updates
9. Generate Launch Notes
Automatically create release notes from Jira tickets and merged PRs.
What it does:
- Aggregates tickets and PRs for a release
- Groups changes by category
- Generates user-facing descriptions
- Links to detailed documentation
10. Documentation Generation
Create or update documentation from RFCs, code, and team knowledge.
What it does:
- Synthesizes information from multiple sources
- Generates structured documentation
- Includes code examples and validation steps
- Formats for your documentation platform
Best Practices
Use .cursorrules or Similar
Many MCP hosts support configuration files. Add Glean-specific instructions:
When debugging errors, always search Glean for similar issues before proposing fixes.
When writing new code, check Glean for our style guides and existing patterns.
For PRs, use Glean to find related tickets and design docs to include in descriptions.
Be Specific About Timeframes
✅ "Search Glean for similar errors in the last 30 days"
✅ "Find PRs merged since the last release"
❌ "Find similar errors" (may return stale results)
Request Confidence Levels
If confidence is low, suggest the Slack channel or expert to ask instead of guessing.
Combine Tools
Use Glean to find the design doc, then analyze the code in this repository to
compare the implementation.
Troubleshooting
Assistant not using Glean?
- Be explicit: "Use Glean to search for..."
- Check that the MCP server is configured correctly
- Verify you have the necessary connector permissions
Results not relevant?
- Add more specific keywords or identifiers
- Specify the data source (e.g., "in GitHub" or "in Slack")
- Narrow the timeframe
Missing context?
- Check that required connectors are enabled
- Verify indexing is up to date
- Ensure you have permissions to the data sources
See also
- MCP Setup Guide - Initial configuration
- Glean for Engineering - Overview of engineering use cases
- Chat Best Practices - General prompting tips