Metadata-Version: 2.3
Name: sylvan
Version: 1.7.0
Summary: Unified code + documentation retrieval MCP server
Author: darki73
Author-email: darki73 <apple.zhivolupov@gmail.com>
License: Custom Non-Commercial
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Dist: mcp>=1.10.0,<2.0.0
Requires-Dist: tree-sitter-language-pack>=0.7.0,<2.0.0
Requires-Dist: sqlite-vec>=0.1.0,<1.0.0
Requires-Dist: pathspec>=0.12.0,<2.0.0
Requires-Dist: pyyaml>=6.0,<7.0
Requires-Dist: tiktoken>=0.12.0,<1.0.0
Requires-Dist: fastembed>=0.4.0,<1.0.0
Requires-Dist: ollama>=0.6.1,<1.0.0
Requires-Dist: structlog>=25.5.0,<27.0.0
Requires-Dist: claude-agent-sdk==0.1.52
Requires-Dist: aiosqlite>=0.21.0,<1.0.0
Requires-Dist: jinja2>=3.1,<4.0
Requires-Dist: uvicorn>=0.30.0,<1.0.0
Requires-Dist: starlette>=0.38.0,<2.0.0
Requires-Dist: websockets>=16.0
Requires-Dist: watchfiles>=1.0.0 ; extra == 'all'
Requires-Dist: asyncpg>=0.30.0 ; extra == 'all'
Requires-Dist: asyncpg>=0.30.0 ; extra == 'postgres'
Requires-Dist: watchfiles>=1.0.0 ; extra == 'watch'
Requires-Python: >=3.12
Provides-Extra: all
Provides-Extra: postgres
Provides-Extra: watch
Description-Content-Type: text/markdown

# 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 57 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

- 57 MCP tools for search, browsing, analysis, and refactoring
- 34 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.

## 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.
