Docs  /  Introduction

The manual.

recon is a Rust MCP server that gives AI coding agents symbol-aware tools in place of Read, Grep, and Glob. This document explains what it is, how to run it, and the ideas that shape its API.

01Introduction

Coding agents spend a surprising fraction of their context window just looking at code — reading whole files to find a single function, grepping a repo for a name that a language server already knows. recon treats that as a workflow bug, not a fact of life.

recon is a hosted MCP server. Your agent connects over MCP; indexing, watching, ranking, and search all run server-side. There is no local binary to install, no build step, no watcher process on your machine.

Under the hood it is tree-sitter for structure, SQLite + FTS5 for exact and fuzzy symbol lookup, Tantivy with a camelCase/snake_case tokenizer for structured BM25, and fff-grep for SIMD-accelerated raw text. On top of that sits an MCP server exposing twelve tools, each returning one of five canonical output shapes.

Design note

If a response can't be mapped to one of the five shapes, that's a signal the tool is doing too much. Split it, don't widen the schema.

02Connecting

recon is a hosted MCP server. You don't install anything — you connect your agent to it.

# 1. create a workspace key at recon.dev
RECON_KEY=rk_live_9f2c…

# 2. register the repo you want indexed
POST https://api.recon.dev/v1/workspaces/acme/repos
  { "remote": "git@…:acme/web.git", "ref": "main" }

Quickstart

Point your agent at recon over MCP. Any MCP-compatible client works — Claude Code, Cursor, custom agents. Drop this into your agent's MCP config:

{
  "mcpServers": {
    "recon": {
      "url": "https://mcp.recon.dev/v1",
      "headers": {
        "Authorization": "Bearer $RECON_KEY"
      }
    }
  }
}

Then nudge the agent to prefer symbol-aware tools. Add this to its system prompt or agent rules:

# agent rules
Use code_* tools (code_outline, code_skeleton, code_find_symbol,
code_search, code_repo_map) before Read/Grep/Glob when
exploring code. They return structured, token-efficient results.

03Workspace configuration

Per-workspace settings live at recon.dev/settings, or via the management API. These apply server-side; your agent never sees them.

# Additional ignore patterns (on top of .gitignore)
ignore_patterns = ["*.generated.*", "dist/"]

# Max file size to index (default 2 MB)
max_file_size = 2097152

# Max search results per tool call (default 30)
max_search_results = 30

# Token budget for code_repo_map (default 2000)
default_map_budget = 2000

# Secret redaction — keep on unless you really mean it
redact_secrets = true
allow_sensitive = false

04Output shapes

Every tool response is exactly one of five shapes. This keeps the agent's parser simple and the token budget honest.

ShapeReturned byShape of the thing
Outlinecode_outline, code_listFlat rows — kind, name, line.
Skeletoncode_skeletonSignatures and doc comments; bodies collapse to .
Symbolcode_read_symbolOne symbol's full source plus its callers.
Matchescode_search, code_find_*Ranked hits with path, line, and a trimmed snippet.
Mapcode_repo_mapPageRank-ordered symbol overview under a token budget.

05Search tiers

code_find_symbol and code_search fan out across five backends, picking the cheapest tier that can answer the question.

T0 · Symbol exact

SQLite btree

Direct index hit on the symbol name. Used for known identifiers.

< 1 ms
T1 · Symbol fuzzy

FTS5 + nucleo

Trigram prefilter, nucleo rescore. Survives typos and partial names.

2 – 8 ms
T2 · Structured BM25

Tantivy · CodeTokenizer

Splits camelCase and snake_case so renderMap matches render_map.

5 – 15 ms
T3 · Raw text / regex

fff-grep

SIMD + memmap2 fallback when the query escapes the symbol table.

3 – 20 ms
T4 · Semantic

fastembed + LanceDB

Local ONNX embeddings. Feature-gated behind --features embed.

50 – 150 ms
Hybrid

Reciprocal rank fusion

Tantivy and text backends interleaved via RRF for mixed-intent queries.

varies

06Incremental indexing

recon is aggressive about never reparsing a file it doesn't need to. Four layers:

07Filter DSL

All search tools accept an optional filter argument. The grammar is the same one used across the fff- family:

ExampleEffect
*.rsExtension filter.
type:rustLanguage match (independent of extension).
status:modifiedOnly git-modified files.
!testExclude paths containing test.
/src/Path-segment match.
*.rs status:modified !testComposes with implicit AND.

08The 12 tools

Every tool description is under 2 KB (Claude Code truncates above this) and maps to exactly one output shape.

ToolReplacesShapeWhat it does
code_outlineReadOutlineOne line per symbol in a file.
code_skeletonReadSkeletonSignatures + docs; bodies as .
code_read_symbolReadSymbolSingle symbol + its callers.
code_find_symbolGrepMatchesThree-tier exact → BM25 → fuzzy.
code_find_refsGrepMatchesRef count + top-k call sites.
code_searchGrepMatchesExact, regex, hybrid, semantic.
code_listGlobOutlineFiles with their top symbols.
code_repo_mapMapPageRank overview under a budget.
code_find_stringsMatchesLiterals and comments only.
code_multi_findMatchesFan-out multi-pattern search.
code_reindexAgent-triggered reindex.
code_statsIndex health report.

Example: code_read_symbol

// request
{
  "tool": "code_read_symbol",
  "path": "crates/recon-search/src/map.rs",
  "symbol": "render_map"
}

// response · Symbol shape
{
  "kind": "fn",
  "name": "render_map",
  "signature": "pub fn render_map(budget: usize) -> Map",
  "doc": "Render a tiktoken-budgeted repo overview.",
  "body": "…",
  "callers": [
    { "path": "crates/recon-server/src/tools/repo_map.rs", "line": 84 },
    { "path": "crates/recon-cli/src/commands/map.rs",      "line": 37 }
  ]
}

09Security

10Performance

Benchmarked on real codebases. Release build, warm cache, mimalloc, fat LTO.

Query latency

ToolZed (80K sym)Rust compiler (320K sym)
stats10 ms29 ms
find8 ms8 ms
search11 ms33 ms
outline14 ms13 ms
skeleton11 ms11 ms
refs8 ms12 ms
map (cached)8 ms19 ms

Indexing

RepoFilesSymbolsCold indexIndex size
Zed (1.3M LOC)1,78080,42719 s96 MB
Rust compiler (3.8M LOC)36,030320,16153 s291 MB

Token reduction

ScenarioRead/Grep/GlobreconReduction
Read one function~23,838 tok~111 tok215×
Find a symbol~17,500 tok~226 tok77×
Repo orientation~52,500 tok~2,170 tok24×
Find references~15,000 tok~638 tok24×
Typical bug-fix task~109,000 tok~3,100 tok35×

System

MetricValue
Binary size (release, stripped)24 MB
Languages9 (Rust, Python, TS, TSX, JS, Go, Java, C, C++)
Tests107 across 19 suites
Allocatormimalloc
Mutexparking_lot (not tokio::sync)
Hash mapsahash::AHashMap in hot paths

11ADRs

12Changelog

v0.1.0 — Initial release.

13License

recon is proprietary software. © 2026. All rights reserved. Use is governed by the recon Terms of Service.