Open Source · v2.0 · Works with any AI agent

Your AI agent reads
entire files.
It doesn't have to.

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 Express.js, FastAPI & Gin
Without
1,865,210
tokens consumed
With Neuroptimizer
92,515
tokens consumed
20.2x reduction· measured with tiktoken
27
MCP tools
30+
languages
0
config needed

95% Token Reduction — Verified

Benchmark across 3 major open-source repos (Express.js, FastAPI, Gin). Measured with tiktoken cl100k_base.

Traditional agent workflow

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
Total: ~7,500 tokens

With Neuroptimizer

search_symbols("auth handler")
  3 results (150 tokens)
get_symbol(top_hit)
  Exact implementation (200 tokens)
Total: ~350 tokens
MetricAll Files (Baseline)NeuroptimizerReduction
Total tokens1,865,21092,51595.0%
Ratio20.2x fewer tokens

Real-world A/B Test (50 iterations)

Vue 3 + Firebase production codebase, Claude Sonnet 4.6, fresh session per iteration.

MetricNative ToolsNeuroptimizerDelta
Success rate72%80%+8 pp
Timeout rate40%32%−8 pp
Mean cost/iteration$0.783$0.738−5.7%
Token usage104,13593,178−10.5%

27 Tools for Structured Code Retrieval

Index, search, retrieve, and analyze code at the symbol level. Supports 30+ languages.

index_repoIndexing

Parse and index an entire repository using tree-sitter

index_folderIndexing

Index a specific folder within a repository

index_fileIndexing

Index a single file for symbol extraction

search_symbolsSearch

Find symbols by name, kind, or qualified path

search_textSearch

Full-text search across indexed codebases

search_columnsSearch

Search with column-level precision

search_security_patternsSecurity

Scan for SQL injection, XSS, hardcoded secrets, and 4 more vulnerability categories

get_symbolRetrieval

Fetch exact symbol implementation by qualified name

get_file_contentRetrieval

Retrieve file content with optional line ranges

get_file_outlineRetrieval

Get structural outline of symbols in a file

get_files_batchRetrieval

Fetch up to 20 files in a single call

get_file_treeStructure

Navigate repository directory structure

get_repo_outlineStructure

Get high-level outline of entire repository

get_context_bundleStructure

Retrieve symbol with surrounding imports and dependencies

get_blast_radiusAnalysis

Map what breaks if a symbol changes

get_dependency_graphAnalysis

Trace dependency chains between modules

get_class_hierarchyAnalysis

Traverse class inheritance chains

find_importersDiscovery

Identify what imports a given file

find_referencesDiscovery

Find all usages of a symbol across the codebase

get_related_symbolsDiscovery

Discover symbols related by usage or proximity

suggest_queriesUtilities

Get AI-powered query suggestions for exploration

get_session_statsUtilities

View token savings stats for the current session

get_healthUtilities

Server diagnostics, version info, and update checking

v2.0 — Workload-Aware Intelligence

Neuroptimizer v2.0 knows when to help and when to step aside.

Smart Tool Descriptions

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.

Security Audit in One Call

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.

Batch File Retrieval

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.

Usage Pattern Detection

Monitors file access ratio in real-time and warns the agent when native tools would be more efficient. Self-optimizing — no user configuration needed.

Works With Any AI Agent

MCP (stdio) for native support, HTTP/SSE for everything else.

Agent / IDETransportSetup
Claude Codestdioclaude mcp add neuroptimizer -- uvx neuroptimizer
Claude DesktopstdioAdd to claude_desktop_config.json
CursorstdioAdd to MCP settings
WindsurfstdioAdd to MCP settings
ClinestdioAdd to MCP settings
ContinuestdioAdd to MCP settings
ZedstdioAdd to MCP settings
OpenAI CodexHTTP/SSEneuroptimizer --transport sse --port 8080
Gemini CLIHTTP/SSEneuroptimizer --transport sse --port 8080
Custom agentsHTTP/SSEREST API at /sse or /mcp endpoint

Get Started in Seconds

One command for most agents. Pick your setup below.

bash
claude mcp add neuroptimizer -- uvx neuroptimizer

How It Works

Tree-sitter AST parsing to byte-level symbol retrieval. Local-first, zero external calls.

Your Code(any lang)
Tree-sitterAST Parser
Symbol Index+ Byte Offsets
MCP Server(stdio/SSE)
AI Agent(any tool)
01

Index

Tree-sitter parses source code into ASTs, extracts every symbol (function, class, method, constant) with signature, qualified name, and byte offsets.

02

Store

Symbol metadata + raw source stored in a local index (~/.code-index/). No external API calls — everything stays on your machine.

03

Retrieve

When an agent requests a symbol, Neuroptimizer reads exact bytes from the original file — no scanning, no full-file loads.

Community Token Savings

Every Neuroptimizer instance automatically contributes anonymous token savings to this live counter. No code, file contents, or identifying information is ever shared.

0

tokens saved by the Neuroptimizer community

Want to opt out? Set this environment variable:

bash
NEUROPTIMIZER_COMMUNITY_STATS=0

Only anonymous savings deltas and a random session ID are sent. Enabled by default. The counter is available via get_health and the public API.