Git-Aware Structural Context for AI Coding Agents.
Maps your repository into a local SQLite Tree-sitter graph, asynchronous semantic wiki, and long-term behavioral memory. Zero cloud lock-in. Sub-10ms FastMCP retrieval for Cursor, Claude Code, and Windsurf.
Core AST orchestrator & Tree-sitter coordinator
SELECT s.symbol_id, s.name, s.kind, e.target_symbol_id
FROM symbols s
JOIN edges e ON s.symbol_id = e.source_symbol_id
WHERE s.file_id = hash('src/synap_git/indexer/engine.py')
AND s.git_oid = 'a14f9bc';780x Faster Context Retrieval. From 7.2s to 9.2ms.
Standard AI agent context tools make blocking, synchronous LLM classification calls before retrieving code. Synap v2.4.0 uses deterministic AST intent routing, LRU vector caching, and SQLite WAL engine to return grounded context instantaneously.
pytest tests/benchmark_grounding.py 0 Cloud API CallsEliminates synchronous LLM classification in retrieval. Routes exact symbols, imports, and definitions directly through SQLite indices in under 1ms.
Pre-computes Euclidean norms and caches JSON deserialization with LRU buffers, eliminating repetitive vector serialization overhead during searches.
Fingerprints .git/HEAD and index files to achieve 0.001ms Git state checks, instantly invalidating only when changes occur.
Designed for Instant Local Execution.
Synapse runs as a lightweight, zero-dependency local daemon. It couples Tree-sitter AST parsers with SQLite WAL concurrency, delivering microsecond graph queries to AI agents without bogging down your machine.
Command line entrypoint managing daemons, full indexation, doctor health checks, and live status monitoring.
Built with Typer & Rich. Subcommands: init, index, sync, search, status --watch, doctor, wiki, mcp.
src/synap_git/cli/main.pyZero Blocking I/O Decoupled Grounding Framework.
Synapse decouples deterministic AST graph truth from asynchronous semantic digests and long-term agent memory. Each layer solves a specific failure mode in AI coding workflows.
L1 indexes raw AST grammar nodes across all major programming languages into local SQLite relational tables. It maps functions, classes, methods, and caller-callee dependency edges with SHA256 content hashes.
WITH RECURSIVE dependency_chain(symbol_id, target_id, depth) AS ( SELECT source_symbol_id, target_symbol_id, 1 FROM edges WHERE source_symbol_id = 'sym_SynapRuntime' UNION ALL SELECT e.source_symbol_id, e.target_symbol_id, dc.depth + 1 FROM edges e JOIN dependency_chain dc ON e.source_symbol_id = dc.target_id WHERE dc.depth < 4 ) SELECT s.name, s.kind, s.file_id, dc.depth FROM dependency_chain dc JOIN symbols s ON dc.target_id = s.symbol_id;
FastMCP Protocol Inspector.
Inspect the raw JSON-RPC standard I/O messages exchanged between coding agents and Synapse. All responses are token-budgeted and optimized for instant context injection.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"status": "success",
"query_time_ms": 9.2,
"tokens_provided": 420,
"symbols_found": 2,
"context": [
{
"symbol": "class TreeSitterRegistry",
"file": "src/synap_git/parser/registry.py",
"lines": "30-180"
},
{
"symbol": "def parse_ast()",
"file": "src/synap_git/parser/registry.py",
"lines": "125-145"
}
],
"synthesize_answer": false
}
}Connect to Any AI Coding Agent.
Synapse speaks standard FastMCP over stdio. Copy and paste the configuration block for your editor to give your agent instant 9.2ms codebase awareness.
Add to your project's .cursor/mcp.json or global Cursor MCP Settings:
{
"mcpServers": {
"synapse": {
"command": "synap",
"args": ["mcp", "serve", "${workspaceFolder}"]
}
}
}Designed for Developers & Daemons.
Every feature in Synapse is accessible through a high-performance Typer CLI. Test the subcommands below to inspect actual terminal output.
Stop Burning Dollars on Context Bloat.
Raw file dumps and unranked vector search saturate model context windows with noise. Calculate how much your engineering team saves with Synapse.
Repository Parameters
Engineered for Precision & Transparency.
Everything you need to know about setting up, integrating, and deploying Synapse across your developer toolchain.
Install Package
Install Synapse globally via pip or uv tool with zero heavy build dependencies.
pip install synap-gitInitialize Repo
Run init in your repository to build the local SQLite AST graph and semantic wiki.
synap init .Mount MCP Server
Connect Cursor or Claude Code to provide your AI agents with sub-10ms context.
synap start .