FastAST — Application Map & Architectural Tour

High-performance AST repository indexer & SQLite graph database for AI coding agents

✓ Verified Proof of Concept Ready

1. Plain-Language Overview

FastAST is an ultra-fast, AST-based repository indexer designed for AI coding agents and developers. Instead of reading whole repositories blindly or relying on fuzzy regex grep, FastAST parses code into syntax trees across 9 languages using native Tree-Sitter and indexes all files, symbols, imports, and function calls into a persistent SQLite database.

AI coding agents connect via the standard Model Context Protocol (MCP) to query symbol definitions, find references, and explore call graphs instantly without exhausting token context budgets.

2. Core Execution Journey

Repository Walk Recursive file discovery Native Tree-Sitter AST 1. 9-Language Syntax Parsing 2. Symbol & Import Extraction 3. Call Target Resolution SQLite Code Graph fastast.db Index MCP Tools & CLI Queries

3. The 3-Stop Architecture Route

Stop 1: Native Tree-Sitter AST Engine
src/lib.rs & src/<language>/mod.rs

Parses source files into Tree-Sitter AST nodes across 9 languages (Python, Java, JavaScript, TypeScript, Rust, HTML, CSS, JSON, TOML). Extracts classes, methods, functions, module imports, and invocation calls into structured FileIndexResult structs.

Stop 2: SQLite Relational Index Store
python/fastast/indexer.py

Walks the repository honoring ignore rules (.git, node_modules, target, .venv). Populates indexed tables (files, symbols, imports, calls) and provides high-speed query methods (find_symbol, get_calls_from_symbol).

Stop 3: MCP Server & CLI Runner
python/fastast/server.py & python/fastast/cli.py

Connects coding agents and developers to the index. Exposes index_repository, query_symbols, and get_call_graph over stdio JSON-RPC for Claude Code and Cursor, plus terminal CLI commands (index, symbols, calls).

4. To Change This, Start Here

5. How to Run & Verify

# 1. Index a repository:
fastast index . --db fastast.db

# 2. Query symbols:
fastast symbols fastast.db --query "index"

# 3. Trace call graph:
fastast calls fastast.db --symbol "main"

# 4. Start the MCP server:
fastast-mcp --db fastast.db