ASTra

•

Performs local semantic code search by parsing source code, building an AST call graph, and traversing it with A* biased by semantic similarity.

ASTra is a local-only semantic code search server designed to run as an MCP process over stdio, offering advanced code understanding for developers. It leverages tree-sitter to parse source files, constructs an Abstract Syntax Tree (AST) call graph using `petgraph`, and executes A* graph traversal, prioritizing paths based on semantic similarity derived from embeddings. Supporting Rust, Python, and JavaScript/TypeScript, ASTra enhances code navigation and retrieval augmentation without relying on external APIs for search queries after an initial indexing, which can be configured for fully local operation or with a lightweight cloud model. It provides tools for semantic RAG, semantic path search, and structured path search, making it ideal for integrating into LLM-powered development environments like Claude Desktop or Cursor.

Key Features

01Multi-language support for Rust, Python, and JavaScript/TypeScript
02Persists index data for fast warm restarts and efficient subsequent runs
03MCP server integration for seamless use with compatible editors/IDEs
040 GitHub stars
05AST-driven RAG with vector-biased A* graph traversal
06Local-only semantic code search without external APIs for queries

Use Cases

01Traversing and understanding execution paths through complex codebases
02Performing semantic code search within local development workspaces
03Enhancing Retrieval Augmented Generation (RAG) for LLMs in code-related tasks