Neuroptimizer is an MCP server that parses your codebase with tree-sitter and gives agents exactly the symbols they ask for — functions, classes, methods — at byte-level precision. No scanning. No waste.
Benchmark across 3 major open-source repos (Express.js, FastAPI, Gin). Measured with tiktoken cl100k_base.
Open file (2,000 tokens) Scan for function (irrelevant) Open another file (3,500 tokens) Find partial match Re-read first file (2,000 tokens) Finally locate symbol
search_symbols("auth handler")
3 results (150 tokens)
get_symbol(top_hit)
Exact implementation (200 tokens)| Metric | All Files (Baseline) | Neuroptimizer | Reduction |
|---|---|---|---|
| Total tokens | 1,865,210 | 92,515 | 95.0% |
| Ratio | — | — | 20.2x fewer tokens |
Vue 3 + Firebase production codebase, Claude Sonnet 4.6, fresh session per iteration.
| Metric | Native Tools | Neuroptimizer | Delta |
|---|---|---|---|
| Success rate | 72% | 80% | +8 pp |
| Timeout rate | 40% | 32% | −8 pp |
| Mean cost/iteration | $0.783 | $0.738 | −5.7% |
| Token usage | 104,135 | 93,178 | −10.5% |
Index, search, retrieve, and analyze code at the symbol level. Supports 30+ languages.
index_repoIndexingParse and index an entire repository using tree-sitter
index_folderIndexingIndex a specific folder within a repository
index_fileIndexingIndex a single file for symbol extraction
search_symbolsSearchFind symbols by name, kind, or qualified path
search_textSearchFull-text search across indexed codebases
search_columnsSearchSearch with column-level precision
search_security_patternsSecurityScan for SQL injection, XSS, hardcoded secrets, and 4 more vulnerability categories
get_symbolRetrievalFetch exact symbol implementation by qualified name
get_file_contentRetrievalRetrieve file content with optional line ranges
get_file_outlineRetrievalGet structural outline of symbols in a file
get_files_batchRetrievalFetch up to 20 files in a single call
get_file_treeStructureNavigate repository directory structure
get_repo_outlineStructureGet high-level outline of entire repository
get_context_bundleStructureRetrieve symbol with surrounding imports and dependencies
get_blast_radiusAnalysisMap what breaks if a symbol changes
get_dependency_graphAnalysisTrace dependency chains between modules
get_class_hierarchyAnalysisTraverse class inheritance chains
find_importersDiscoveryIdentify what imports a given file
find_referencesDiscoveryFind all usages of a symbol across the codebase
get_related_symbolsDiscoveryDiscover symbols related by usage or proximity
suggest_queriesUtilitiesGet AI-powered query suggestions for exploration
get_session_statsUtilitiesView token savings stats for the current session
get_healthUtilitiesServer diagnostics, version info, and update checking
Neuroptimizer v2.0 knows when to help and when to step aside.
Every tool teaches the AI agent when to use it vs native tools. Agents automatically optimize for targeted retrieval where Neuroptimizer saves 95%, and step aside for comprehensive scans where native tools avoid overhead.
search_security_patterns scans all indexed files for 7 vulnerability categories — SQL injection, XSS, hardcoded secrets, and more. Returns only flagged lines with context. ~90% fewer tokens than reading every file.
get_files_batch fetches up to 20 files in a single MCP call, eliminating per-call overhead for multi-file tasks like migrations, refactors, and audits.
Monitors file access ratio in real-time and warns the agent when native tools would be more efficient. Self-optimizing — no user configuration needed.
MCP (stdio) for native support, HTTP/SSE for everything else.
| Agent / IDE | Transport | Setup |
|---|---|---|
| Claude Code | stdio | claude mcp add neuroptimizer -- uvx neuroptimizer |
| Claude Desktop | stdio | Add to claude_desktop_config.json |
| Cursor | stdio | Add to MCP settings |
| Windsurf | stdio | Add to MCP settings |
| Cline | stdio | Add to MCP settings |
| Continue | stdio | Add to MCP settings |
| Zed | stdio | Add to MCP settings |
| OpenAI Codex | HTTP/SSE | neuroptimizer --transport sse --port 8080 |
| Gemini CLI | HTTP/SSE | neuroptimizer --transport sse --port 8080 |
| Custom agents | HTTP/SSE | REST API at /sse or /mcp endpoint |
One command for most agents. Pick your setup below.
claude mcp add neuroptimizer -- uvx neuroptimizerTree-sitter AST parsing to byte-level symbol retrieval. Local-first, zero external calls.
Tree-sitter parses source code into ASTs, extracts every symbol (function, class, method, constant) with signature, qualified name, and byte offsets.
Symbol metadata + raw source stored in a local index (~/.code-index/). No external API calls — everything stays on your machine.
When an agent requests a symbol, Neuroptimizer reads exact bytes from the original file — no scanning, no full-file loads.
Every Neuroptimizer instance automatically contributes anonymous token savings to this live counter. No code, file contents, or identifying information is ever shared.
tokens saved by the Neuroptimizer community
Want to opt out? Set this environment variable:
NEUROPTIMIZER_COMMUNITY_STATS=0Only anonymous savings deltas and a random session ID are sent. Enabled by default. The counter is available via get_health and the public API.