Sylvan¶
Sylvan is a code intelligence engine that gives AI agents fast, precise access to your codebase. Instead of reading entire files to find a single function or grepping across directories to trace a dependency, agents query sylvan's structured index and get back exactly the symbols, signatures, and relationships they need. The server parses your code with tree-sitter, stores it in a SQLite database with full-text and vector search, and exposes everything through 58 MCP tools. Typical token savings exceed 80%.
Agent: find_code("authentication middleware")
-> 3 results with signatures, 280 tokens
Agent: read_symbol(symbol_id)
-> exact function source, 150 tokens
vs. Read("src/auth/middleware.py")
-> entire file, 4,200 tokens
Key features¶
- 58 MCP tools -- search, browse, analyze, and index code through a single server. Your agent never needs to fall back to Read/Grep/Glob.
- 40 programming languages -- tree-sitter parsing for Python, TypeScript, Go, Rust, Java, C#, and 34 more (including CSS, SCSS, LESS, Stylus, JSON), plus 10 document formats (Markdown, RST, HTML, etc.).
- Hybrid search -- combines full-text search (FTS5) with vector similarity (sqlite-vec) and reciprocal rank fusion for ranked results.
- Blast radius analysis -- before renaming or deleting a function, see every file that would be affected, with confirmed vs. potential impact.
- Dependency graphs -- trace imports, find callers, and map relationships across files and repos.
- Quality reports -- complexity metrics, code duplication, dead code detection, and security pattern scanning per repository.
- Third-party library indexing -- index Django, FastAPI, or any pip/npm package and search its source the same way you search your own code.
- Session intelligence -- tracks which symbols the agent has already seen and deprioritizes them in future search results.
- Multi-instance clustering -- multiple server instances share the same database, so parallel agents can search simultaneously without contention.
- Web dashboard -- live overview of indexed repos, session stats, token efficiency, quality reports, and interactive symbol search.
Quick install¶
Then connect it to your agent. For Claude Code, add this to .mcp.json or .claude/settings.json:
{
"mcpServers": {
"sylvan": {
"command": "uv",
"args": ["run", "--directory", "/path/to/sylvan", "sylvan", "serve"]
}
}
}
For SSE or streamable HTTP transports, see the installation guide.
Index your first project¶
The agent can now search, browse, and analyze the code. See Your First Project for the full walkthrough.
Documentation¶
Getting Started¶
- Installation -- install, verify, and connect to your agent
- Your First Project -- index a codebase and make your first queries
- Configuration -- providers, embeddings, and config file options
Working With Sylvan¶
- Searching Code -- full-text, vector, and hybrid search
- Browsing and Reading -- read_symbol, whats_in_file, doc_table_of_contents
- Understanding Impact -- blast radius, dependency graphs, who_depends_on_this
- Working With Libraries -- indexing third-party packages
- Multi-Repo Projects -- workspaces and cross-repo search
- Quality and Security -- quality reports, dead code, security scanning
- The Dashboard -- web UI for repos, sessions, search, and quality
- Token Efficiency -- how token savings are measured
- CLI Reference -- all commands with options and examples
For Your Agent¶
- Teaching Your Agent -- the workflow guide, tool gate, and SubagentStart hook
- Subagent Access -- how subagents get MCP tool access
- The Tool Reference -- all 57 tools with parameters and return values
Extending Sylvan¶
- Writing Providers -- summary and embedding provider plugins
- Adding Languages -- tree-sitter language specs
- Building Tools -- adding new MCP tools
- The ORM -- async active record ORM
- Schema and Migrations -- database schema management