get-code-context-exa
Original:🇺🇸 English
Translated
Code context using Exa. Finds real snippets and docs from GitHub, StackOverflow, and technical docs. Use when searching for code examples, API syntax, library documentation, or debugging help.
1installs
Sourceexa-labs/exa-mcp-server
Added on
NPX Install
npx skill4agent add exa-labs/exa-mcp-server get-code-context-exaTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Code Context (Exa)
Tool Restriction (Critical)
ONLY use . Do NOT use other Exa tools.
get_code_context_exaToken Isolation (Critical)
Never run Exa in main context. Always spawn Task agents:
- Agent calls
get_code_context_exa - Agent extracts the minimum viable snippet(s) + constraints
- Agent deduplicates near-identical results (mirrors, forks, repeated StackOverflow answers) before presenting
- Agent returns copyable snippets + brief explanation
- Main context stays clean regardless of search volume
When to Use
Use this tool for ANY programming-related request:
- API usage and syntax
- SDK/library examples
- config and setup patterns
- framework "how to" questions
- debugging when you need authoritative snippets
Inputs (Supported)
get_code_context_exa- (string, required)
query - (number, optional; default ~5000; typical range 1000–50000)
tokensNum
Query Writing Patterns (High Signal)
To reduce irrelevant results and cross-language noise:
- Always include the programming language in the query.
- Example: use "Go generics" instead of just "generics".
- When applicable, also include framework + version (e.g., "Next.js 14", "React 19", "Python 3.12").
- Include exact identifiers (function/class names, config keys, error messages) when you have them.
Dynamic Tuning
Token strategy:
- Focused snippet needed → tokensNum 1000–3000
- Most tasks → tokensNum 5000
- Complex integration → tokensNum 10000–20000
- Only go larger when necessary (avoid dumping large context)
Output Format (Recommended)
Return:
- Best minimal working snippet(s) (keep it copy/paste friendly)
- Notes on version / constraints / gotchas
- Sources (URLs if present in returned context)
Before presenting:
- Deduplicate similar results and keep only the best representative snippet per approach.
MCP Configuration
json
{
"servers": {
"exa": {
"type": "http",
"url": "https://mcp.exa.ai/mcp?tools=get_code_context_exa"
}
}
}