The Context Engine MCP is a standalone developer tool that exposes codebase intelligence via the Model Context Protocol. For the Context Engine as the core technology layer of the Qodo platform, see Understanding the Context Engine.
| Tool | What it does | Use it for |
|---|---|---|
deep_research | Multi-step reasoning across services | Refactors, architectural changes, impact analysis |
context_ask | Evidence-based answers with code citations | Tracing flows, understanding implementations, scoped Q&A |
get_context | Semantic search over indexed code | Finding examples, exploring patterns, raw code retrieval |
repositories parameter to scope the search and, where applicable, a session_id parameter to maintain context across follow-up calls.
deep_research
Thedeep_research endpoint is an intelligent code analysis agent that goes beyond simple search to provide comprehensive understanding of your codebase. Think of it as having a senior architect who has thoroughly studied every line of your code and can answer complex questions about architecture, patterns, and implementation strategies.
Key features
- Code understanding: Comprehends code logic, architecture, and design patterns
- Cross-repository analysis: Analyzes relationships between different parts of your codebase
- Implementation planning: Helps plan new features based on existing code patterns
- Best practice recommendations: Suggests improvements based on codebase analysis
- Architecture insights: Provides high-level understanding of system design
Request format
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Your question or research query. Be specific and detailed for best results. |
repositories | array | No | List of repository identifiers to scope the search. Format: org/repo |
session_id | string | No | Unique identifier to maintain context across multiple queries in a conversation. |
Recommended query strategies
- Be specific and detailed. “How does user authentication work across our microservices?” provides richer insights than general queries.
- Include context about your goals. Mentioning why you need the information helps Deep Research tailor its analysis.
- Leverage
session_idfor complex investigations. Build on previous queries to dive deeper into specific areas. - Specify repositories for focused analysis. When you know which repos are relevant, include them for more targeted results.
- Ask “why” and “how” questions. Deep Research excels at explaining design decisions and implementation reasoning.
- Simple keyword searches: use
get_contextinstead - Asking the agent to modify your code:
deep_researchanalyzes and suggests code, it will not modify files - Questions about external services not in your codebase
- Real-time data: it analyzes code structure, not runtime behavior
Usage patterns
Pattern 1: Architecture discovery When to use: Understanding how your system works.context_ask
Thecontext_ask endpoint is an intelligent codebase question-answering system that combines semantic search with expert-level code analysis. Think of it as having a principal software engineer who instantly understands your entire codebase and can provide detailed, evidence-based answers with actual code snippets and precise implementation details.
Unlike traditional documentation or search tools, context_ask:
- Provides evidence-based answers with actual code snippets and line numbers
- Combines semantic search with graph-based repository knowledge
- Analyzes code relationships and dependencies across your entire codebase
- Delivers expert-level explanations with complete implementation details
- Shows actual code proof for every claim, never just descriptions
Request format
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | Yes | Your question or research query. Be specific and detailed for best results. |
repositories | array | No | List of repository identifiers to scope the search. Format: org/repo |
session_id | string | No | Unique identifier to maintain context across multiple queries in a conversation. |
Response format
Recommended query strategies
- Ask specific technical questions. “How does error handling work in the payment processing module?” rather than “Tell me about errors.”
- Request complete implementations. Ask for end-to-end flows, not just isolated functions.
- Focus on architectural patterns. Questions about how components interact yield comprehensive answers.
- Specify scope with repositories. Target relevant codebases for focused, accurate responses.
- Use session continuity. Maintain
session_idfor follow-up questions on related topics.
Usage examples
Understanding authentication flowget_context
Theget_context tool performs semantic search across one or more codebases to find relevant code snippets.
Key features
- Semantic search: Uses vector embeddings to find conceptually similar code, not just keyword matches
- Multi-repository support: Search across multiple repositories simultaneously
- Language filtering: Filter results by programming language (Python, JavaScript, TypeScript, etc.)
- Intelligent ranking: Returns results ranked by relevance with configurable result limits
Request format
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Semantic search query describing the code you’re looking for. |
repositories | array | No | Target specific repositories. Format: org/repo |
language | array | No | Filter results by programming language. |
max_results | integer | No | Limit the number of results returned. |