- Context Optimizer
Context Optimizer
Quick Start
1. Install globally:
npm install -g context-optimizer-mcp-server
2. Set environment variables (see docs/guides/usage.md for OS-specific instructions):
export CONTEXT_OPT_LLM_PROVIDER="gemini"
export CONTEXT_OPT_GEMINI_KEY="your-gemini-api-key"
export CONTEXT_OPT_EXA_KEY="your-exa-api-key"
export CONTEXT_OPT_ALLOWED_PATHS="/path/to/your/projects"
3. Add to your MCP client configuration:
For Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"context-optimizer": {
"command": "context-optimizer-mcp"
}
}
}
For VS Code (mcp.json):
{
"servers": {
"context-optimizer": {
"command": "context-optimizer-mcp"
}
}
}
For complete setup instructions including OS-specific environment variable configuration and AI assistant setup, see docs/guides/usage.md.
Available Tools
-
askAboutFile- Extract specific information from files without loading entire contents into chat context. Perfect for checking if files contain specific functions, extracting import/export statements, or understanding file purpose without reading the full content. -
runAndExtract- Execute terminal commands and intelligently extract relevant information using LLM analysis. Supports non-interactive commands with security validation, timeouts, and session management for follow-up questions. -
askFollowUp- Continue conversations about previous terminal executions without re-running commands. Access complete context from previousrunAndExtractcalls including full command output and execution details. -
researchTopic- Conduct quick, focused web research on software development topics using Exa.ai's research capabilities. Get current best practices, implementation guidance, and up-to-date information on evolving technologies. -
deepResearch- Comprehensive research and analysis using Exa.ai's exhaustive capabilities for critical decision-making and complex architectural planning. Ideal for strategic technology decisions, architecture planning, and long-term roadmap development.
For detailed tool documentation and examples, see docs/tools.md and docs/guides/usage.md.
Server Config
{
"mcpServers": {
"context-optimizer": {
"command": "context-optimizer-mcp"
}
}
}