Skip to main content
Glama
README.md
# Sylvan

[![Tests](https://github.com/darki73/sylvan/actions/workflows/tests.yml/badge.svg)](https://github.com/darki73/sylvan/actions/workflows/tests.yml)
[![PyPI](https://img.shields.io/pypi/v/sylvan)](https://pypi.org/project/sylvan/)
[![Python](https://img.shields.io/pypi/pyversions/sylvan)](https://pypi.org/project/sylvan/)
[![Downloads](https://img.shields.io/pypi/dm/sylvan)](https://pypi.org/project/sylvan/)
[![License](https://img.shields.io/pypi/l/sylvan)](https://github.com/darki73/sylvan/blob/main/LICENSE)
[![Code style: Ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
[![Docs](https://github.com/darki73/sylvan/actions/workflows/docs.yml/badge.svg)](https://darki73.github.io/sylvan/)
[![MCP](https://img.shields.io/badge/MCP-compatible-blue)](https://modelcontextprotocol.io)

Code intelligence platform for AI agents. Search, analyze, and navigate codebases through MCP tools - returning exactly the code your agent needs at a fraction of the token cost.

## Why

AI agents burn tokens reading entire files when they need one function. They grep across directories to trace a dependency. They piece together call chains one file at a time. Every wasted read costs money and context window space.

Sylvan indexes your codebase into a structured database of symbols, sections, and import relationships, then exposes it through 58 MCP tools. Your agent asks for what it needs and gets exactly that - function signatures, blast radius, dependency graphs, semantic search results. Typical token savings exceed 80%.

## Dashboard

![Overview](docs/overview.png)

<details>
<summary>More screenshots</summary>

**Search** - find code by name, signature, or keywords with syntax-highlighted source
![Search](docs/search.png)

**Session** - live token efficiency tracking per session and all-time
![Session](docs/session.png)

**Quality Report** - code smells, security findings, test/doc coverage
![Quality](docs/quality.png)

**Blast Radius** - visualize impact before changing a symbol
![Blast Radius](docs/blast-radius.png)

**Libraries** - indexed third-party packages with symbol counts
![Libraries](docs/libraries.png)

</details>

## Features

- 65 MCP tools for search, browsing, analysis, memory, and refactoring
- 40 programming languages via tree-sitter
- Hybrid search - full-text (FTS5) + vector similarity with ranked fusion
- Blast radius analysis before any refactor
- Dependency graphs, call chains, class hierarchies
- Third-party library indexing (pip, npm, cargo, go)
- Multi-repo workspaces with cross-repo analysis
- Code quality reports - smells, security, duplication, dead code
- Web dashboard with live token efficiency tracking
- Multi-instance cluster support

## Quick start

```bash
uv tool install sylvan
```

Add to your MCP client config:

```json
{
  "mcpServers": {
    "sylvan": {
      "command": "sylvan",
      "args": ["serve"]
    }
  }
}
```

Your agent handles the rest - index a project, search for code, navigate with precision.

> **Upgrading to 1.8.0?** Run a full re-index from the dashboard to build the call graph and repo briefing for existing repos.

## Token cost

Sylvan loads ~9,200 tokens of tool descriptions into your agent's context at session start. See [TRANSPARENCY.md](TRANSPARENCY.md) for full breakdown, real-world numbers, and what we do not do.

## Documentation

Full docs at [darki73.github.io/sylvan](https://darki73.github.io/sylvan/)

## License

Non-commercial open source. Free to use, modify, and distribute with attribution. See [LICENSE](LICENSE) for details.

TDQS

B3.1/5.0

Scored across 70 tools

Disambiguation3/5

Most tools have a distinct purpose and the descriptions actively disambiguate near-neighbors (e.g. 'more granular than file-level who_depends_on_this'). However there are real collisions: what_does_this_call, what_calls_this and who_calls_this overlap heavily (who_calls_this's direction parameter already covers both of the others), and repo_deep_dive/repo_overview, doc_tree/doc_table_of_contents, and rename_everywhere/plan_rename each require careful reading to pick correctly.

Naming Consistency2/5

The set mixes interrogative prose names (what_does_this_call, whats_in_files, who_touched_this, where_to_start, is_peak_hours), verb_noun names (read_symbol, find_code, index_project), and bare noun phrases (project_structure, import_graph, usage_stats, code_health_report). There is no predictable pattern to generalize from, so an agent must read every description rather than infer from the name.

Tool Count2/5

70 tools is far beyond what an agent can hold in working context, and the breadth is inflated by many singular/plural and batch variants plus redundant analysis tools (find_tech_debt, code_health_report, risky_to_change). The domain is genuinely broad (indexing, search, deps, quality, git, docs, memory, libraries, workspaces, setup), so it is not a pure count problem, but the surface is still oversized for its scope.

Completeness4/5

Lifecycle coverage is strong: index/reindex/delete repos, index/remove/pin libraries, search, read, dependency and blast-radius analysis, rename planning, quality, git history, docs, memory, workspaces, editor setup, and diagnostics are all present. Minor gaps remain — rename_everywhere and plan_rename return edit locations but nothing applies them, and there is no explicit update path for an existing memory or user rule.

Maintenance

ActivityActive
ResponsivenessNo recent community issues