Skip to main content
Glama

Sylvan

Tests PyPI Python Downloads License Code style: Ruff Docs MCP

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

Related MCP server: io.github.pmgarg/cgraphy

Dashboard

Overview

Search - find code by name, signature, or keywords with syntax-highlighted source Search

Session - live token efficiency tracking per session and all-time Session

Quality Report - code smells, security findings, test/doc coverage Quality

Blast Radius - visualize impact before changing a symbol Blast Radius

Libraries - indexed third-party packages with symbol counts Libraries

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

uv tool install sylvan

Add to your MCP client config:

{
  "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 for full breakdown, real-world numbers, and what we do not do.

Documentation

Full docs at darki73.github.io/sylvan

License

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

Available Tools

70 tools
add_repo_to_workspaceA

Adds an indexed repo to a workspace. Resolves cross-repo imports automatically.

Inputs: repo (required), workspace (required).

batch_plan_renameA

Plan renames for multiple strings in one call. Takes a mapping of old_name -> new_name pairs and returns classified edit locations for each. More efficient than calling plan_rename repeatedly.

Inputs: repo (required), renames (required).

check_version_driftA

Compares installed dependencies against indexed library versions. Reads pyproject.toml, package.json, go.mod and reports outdated, up-to-date, and not-indexed libraries.

Inputs: repo (required).

code_health_reportB

Comprehensive static quality analysis for a repository. Returns test coverage, documentation coverage, code smells, security findings, code duplication, and quality gate pass/fail. No test execution needed.

Inputs: repo (required).

connection_configA

Returns this server's MCP connection config: command, args, working directory, dashboard URL, and database path. Useful for connecting subagents or SDK clients.

Inputs: no named parameters.

cross_repo_impactA

Cross-repo blast radius. Shows which files across multiple repositories are affected by changing a shared symbol. Returns confirmed and potential impact per repo.

Inputs: symbol_id (required), workspace (required), depth.

delete_repo_indexA

Permanently deletes a repository's index and all associated data: files, symbols, sections, imports, quality records, references. Cannot be undone.

Inputs: repo (required).

delete_user_ruleB

Deletes a preference by key and scope. For global scope, scope_id is not needed.

Inputs: key (required), scope (required), scope_id.

doc_table_of_contentsA

Returns a structured table of contents for indexed documentation. Lists every heading with section IDs and hierarchy. Filterable by document path.

Inputs: repo (required), doc_path.

doc_treeA

Nested table of contents grouped by document. Returns heading trees per doc file with depth control. Better than doc_table_of_contents for repos with many documentation files.

Inputs: repo (required), max_depth.

find_codeA

Searches indexed symbols (functions, classes, methods, constants, types) by name, keyword, or docstring. Returns ranked results with signatures and locations, no file content loaded. Also searches indexed third-party libraries. ~50 tokens per result vs ~2000 for reading each file.

Inputs: query (required), kind, repo, language, +3 more.

find_code_batchB

Multiple symbol searches in one call. Each query runs independently with optional repo, kind, and language overrides. Returns results grouped by query.

Inputs: queries (required), repo, max_results_per_query.

find_columnsA

Searches column metadata from ecosystem context providers (dbt). Finds columns by name or description across models. Filterable by model name pattern.

Inputs: repo (required), query (required), max_results, model_pattern.

find_docsA

Searches indexed documentation sections (markdown, RST, HTML, OpenAPI) by title, summary, or content. Returns section summaries and IDs without loading file content.

Inputs: query (required), repo, doc_path, max_results.

find_similar_codeB

Vector similarity search for code patterns. Given a symbol ID, finds semantically similar functions, classes, or methods across the codebase. Useful for discovering alternative implementations or repeated patterns.

Inputs: symbol_id (required), repo, max_results.

find_tech_debtB

Returns quality metrics per symbol: has_tests, has_docs, has_types, complexity score. Filterable by untested_only, undocumented_only, or min_complexity threshold.

Inputs: repo (required), limit, untested_only, min_complexity, +1 more.

find_textA

Full-text search across indexed file content. Finds comments, strings, TODOs, and literal text that symbol search misses. Returns matching lines with optional surrounding context.

Inputs: query (required), repo, max_results, file_pattern, +1 more.

forget_thisA

Deletes a memory by ID. Permanent removal from the project knowledge base.

Inputs: id (required), repo (required).

generate_project_docsC

Generates a sylvan/ project context directory with architecture docs, quality reports, dependency maps, and an agent instruction file (CLAUDE.md or .cursorrules). Creates planning directories for future/working/completed tasks.

Inputs: repo (required), root, agent.

get_memoryB

Retrieves a specific memory by ID. Returns the full content, tags, and timestamps.

Inputs: id (required), repo (required).

how_to_use_sylvanA

Returns workflow rules and tool sequences for common tasks: code exploration, safe editing, dependency analysis, library integration. Also reports pending editor setup actions if project_path is provided.

Inputs: project_path.

import_graphA

Returns file-level import dependency graph. Shows what a file imports, what imports it, or both. Returns nodes with symbol counts and directed edges. Follows import chains up to 3 hops deep.

Inputs: repo (required), file_path (required), depth, direction.

indexed_librariesA

Lists all indexed third-party libraries with name, version, and symbol count.

Inputs: no named parameters.

indexed_reposA

Lists all indexed repositories with file count, symbol count, source path, and indexing timestamp.

Inputs: no named parameters.

index_library_sourceA

Indexes a third-party library's source code for API lookup. Fetches the actual implementation at a specific version from pip, npm, go, or cargo. Format: pip/django@4.2, npm/react@18, go/github.com/gin-gonic/gin, cargo/serde.

Inputs: package (required).

index_multi_repoB

Indexes multiple folders and groups them into a workspace. Resolves cross-repo imports automatically. Enables cross-repo search, blast radius, and dependency analysis.

Inputs: paths (required), workspace (required), description.

index_projectA

Indexes a local folder for code and documentation search. Incremental: re-runs only process changed files. Returns file count and symbol count. For third-party libraries, use index_library_source instead.

Inputs: path (required), name.

inheritance_chainA

Returns the inheritance chain for a class: ancestors (what it extends) and descendants (what extends it). Searched by class name across the index.

Inputs: class_name (required), repo.

is_peak_hoursA

Returns whether this is peak or off-peak hours for the AI provider. Peak: weekdays 13:00-19:00 UTC. Weekends are always off-peak. Includes time until next transition.

Inputs: no named parameters.

load_user_rulesA

Returns the user's behavioral rules for this repo: code style, test patterns, commit format, interaction preferences. Merges global, workspace, and repo scopes (repo wins). One DB query, no inference.

Inputs: repo (required).

migration_guideA

Compares two indexed versions of a library. Returns symbols added, removed, and changed with signature diffs. Both versions must be indexed via index_library_source first.

Inputs: package (required), to_version (required), from_version (required).

open_dashboardA

Returns the URL for the sylvan web dashboard. The dashboard shows indexed repos, quality reports, library management, and interactive symbol search.

Inputs: no named parameters.

pin_library_versionA

Pins a library version to a workspace. Once pinned, search_all_repos includes that library's symbols. The library must be indexed via index_library_source first.

Inputs: library (required), workspace (required).

plan_renameA

Finds all locations where a string appears in a repo and classifies each by context: string literal, import path, class name, code identifier, documentation, or comment. Returns structured edit entries for rename-safe occurrences and skip entries with reasons for the rest. Accepts a single rename or a batch mapping.

Inputs: repo (required), new_name (required), old_name (required).

project_structureA

Returns the repository's directory tree with language and symbol counts per directory. Directories beyond max_depth are collapsed with file counts. Compact output like the tree command.

Inputs: repo (required), max_depth.

read_doc_sectionA

Retrieves the content of one documentation section by ID. Returns one heading's worth of content instead of the entire file. ~100 tokens vs ~2000 for reading the full doc.

Inputs: section_id (required), verify.

read_doc_sectionsA

Batch retrieves multiple documentation sections in one call. Returns content for each section ID.

Inputs: section_ids (required).

read_symbolA

Retrieves exact source code of a function, class, or method by symbol ID. Returns only that symbol's lines, signature, and docstring. ~50-200 tokens vs ~2000 for reading the full file.

Inputs: symbol_id (required), repo, verify, context_lines.

read_symbolsB

Batch retrieves source code for multiple symbols in one call. Returns source, signature, and file info for each. Reports not_found for any missing IDs.

Inputs: symbol_ids (required).

recall_previous_sessionsB

Searches project memories by semantic similarity, not keywords. Returns past decisions, root causes, and context ranked by relevance. Finds matches even when the query uses different words than what was saved.

Inputs: repo (required), query (required), max_results.

reindex_fileA

Reindexes a single file. Faster than index_project when only one file changed. Returns updated symbol count.

Inputs: repo (required), file_path (required).

remember_thisA

Saves project context that would be lost between sessions: decisions, root causes, business constraints, architecture rationale. Vector-searchable by meaning, portable across agents and machines. Auto-deduplicates similar content.

Inputs: repo (required), content (required), tags.

remove_libraryB

Removes an indexed library and its source files from disk.

Inputs: name (required).

rename_everywhereB

Finds all edit locations needed to rename a symbol. Returns exact file, line, old_text, and new_text for each occurrence. Uses blast radius to find affected files across the import graph.

Inputs: new_name (required), symbol_id (required).

repo_deep_diveA

Full repository orientation: stats (files, symbols, sections), directory tree, language breakdown, and manifest contents (pyproject.toml, package.json, go.mod). Replaces 5-10 separate calls to understand a repo's scale, structure, and stack.

Inputs: repo (required).

repo_overviewA

High-level repository summary: file count, languages, symbol breakdown by kind, documentation coverage. Quick orientation for unfamiliar codebases.

Inputs: repo (required).

risky_to_changeB

Ranks symbols by risk: combines cyclomatic complexity with git churn rate. High hotspot scores mean the code is both complex and frequently changed. Configurable time window and complexity threshold.

Inputs: repo (required), days, top_n, min_complexity.

save_user_ruleB

Saves a behavioral rule the user established. Key should be descriptive (e.g. 'test_style'). Instruction must be actionable as a standalone rule. Scope: global (all repos), workspace, or repo.

Inputs: key (required), scope (required), instruction (required), scope_id.

search_all_reposB

Searches symbols across all repos in a workspace. Results from different repos are ranked together. Supports kind, language, and pagination filters.

Inputs: query (required), workspace (required), kind, language, +1 more.

server_logsA

Returns sylvan server log entries. Defaults to most recent lines (tail). Supports from_start for head and offset for pagination.

Inputs: lines, offset, from_start.

setup_claude_codeA

Creates or updates .claude/settings.local.json with sylvan tool permissions and SubagentStart hook for this project.

Inputs: project_path (required).

setup_copilotB

Creates .github/copilot-instructions.md with tool routing rules for this project.

Inputs: project_path (required).

setup_cursorC

Creates .cursor/rules/sylvan.md with tool routing rules for this project.

Inputs: project_path (required).

setup_windsurfC

Creates .windsurf/rules/sylvan.md with tool routing rules for this project.

Inputs: project_path (required).

understand_symbolA

Returns a symbol's source code, file imports, callers, and sibling symbols in one call. Replaces 3-5 separate lookups when you need full context around a function or class.

Inputs: symbol_id (required), include_callers, include_imports.

usage_statsA

Returns usage statistics: tokens returned vs avoided, tool calls, symbols and sections retrieved. Three levels: current session, per-project lifetime, and overall. Filterable by repo.

Inputs: repo.

what_breaks_if_i_changeA

Shows which files and symbols would be affected by changing a given symbol. Separates confirmed impact (name actually referenced) from potential impact (file imported but name not confirmed). Follows import chains up to 3 hops.

Inputs: symbol_id (required), depth.

what_breaks_if_i_change_theseB

Blast radius for multiple symbols in one call. Returns confirmed and potential impact for each symbol independently.

Inputs: symbol_ids (required), depth.

what_calls_thisA

Returns all symbols that call a given function or method. Each caller includes file path, signature, and line number. Symbol-level precision, more granular than file-level who_depends_on_this.

Inputs: symbol_id (required), max_results.

what_changed_in_symbolsA

Compares symbols between the current index and a previous git commit. Returns symbols added, removed, or changed with signature diffs. Works at symbol level, not line level.

Inputs: repo (required), commit, file_path, max_files.

what_does_this_callB

Returns all symbols that a given function or method calls. Each callee includes file path, signature, and line number. Shows what a function depends on.

Inputs: symbol_id (required), max_results.

whats_changed_recentlyA

Returns files changed in the last N commits with language, symbol count, and last commit message per file. Lighter than what_changed_in_symbols when you only need file-level change overview.

Inputs: repo (required), commits, file_path.

whats_in_fileA

Returns a hierarchical outline of all symbols in a file: functions, classes, methods with signatures and line numbers. No file content loaded. ~100 tokens vs ~2000 for reading the file.

Inputs: repo (required), file_path (required).

whats_in_filesA

Batch retrieves outlines for multiple files in one call. Returns symbol trees with signatures and line numbers for each file.

Inputs: repo (required), file_paths (required).

where_to_startA

Suggests queries for exploring a repo: key entry points, popular classes, unexplored areas, docs. Adapts to what has already been explored this session.

Inputs: repo (required).

who_calls_thisA

Returns symbol-level references: callers (direction=to) or callees (direction=from). Based on the reference graph, not text matching. Each reference includes file path, signature, and line number.

Inputs: symbol_id (required), direction.

who_depends_on_theseA

Importers for multiple files in one call. Returns dependency lists per file with per-file max_results limit.

Inputs: repo (required), file_paths (required), max_results.

who_depends_on_thisA

Returns all files that import a given module. Each result includes has_importers flag: false means the import chain is transitively dead (nothing depends on that importer). Structural query based on the import graph, not text matching.

Inputs: repo (required), file_path (required), max_results.

who_touched_thisA

Returns git blame, change frequency, and recent commits for a file or symbol. Accepts either file_path or symbol_id to scope the query.

Inputs: repo (required), file_path, symbol_id.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides code intelligence for AI coding agents by indexing repositories into a hybrid knowledge graph, enabling agents to query dependencies, impact, and context through 28 MCP tools.
      4
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to query code structure efficiently through 16 MCP tools, including symbol lookup, full-text search, dependency analysis, and refactor planning, powered by tree-sitter parsing and index-backed code intelligence.
      3
      MIT