Skip to main content

Lightweight code graph indexer with incremental file watching and MCP server

Project description

symtext

A code-graph indexer for LLM agents. Parses your project with tree-sitter, stores the structure (functions, classes, calls, imports, inheritance) in a local graph database, and serves it to your LLM client over MCP. Supports 24 languages and incremental updates via file-watching.

Quick start

Install uv if you don't have it:

curl -LsSf https://astral.sh/uv/install.sh | sh

Add symtext to your MCP client config:

{
  "mcpServers": {
    "symtext": {
      "command": "uvx",
      "args": ["symtext", "mcp"]
    }
  }
}

Where the snippet goes:

  • Claude Code~/.claude.json (user-wide), or <project>/.mcp.json (committed, project-wide). One-liner equivalent: claude mcp add symtext -- uvx symtext mcp.
  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
  • Cursor / Cline / Windsurf / VS Code — see docs/install.md.

Open your editor inside any project. First call indexes the repo (seconds for small repos, ~1 min for large); subsequent calls are instant. Everything lives under ~/.symtext/projects/<hash>/ — nothing is written into your project tree. Diagnostics: uvx symtext doctor.

Don't use uv? pipx and plain pip install symtext work too — see docs/install.md.

MCP tools

Tool Purpose
shape Codebase dimensions: node/edge counts, language breakdown, directory tree
summarize Per-file summaries: function counts, class names, top functions by caller count
symbols Full symbol listing for a file or directory
search_symbols Fuzzy search by name or docstring content
get_callers All functions that call a given function, with source context
get_callees All functions that a given function calls
get_importers All files that import a given module
get_dependencies Outbound imports for a file — modules + line numbers
get_hierarchy Class inheritance — ancestors, descendants, or both
path_between Shortest call chain between two functions
unused_symbols Functions with zero callers (dead-code finder, with entrypoint heuristics)
changed_symbols Git-aware blast radius: symbols changed vs a ref + their callers
describe_symbol Full profile: source, callers, callees, imports — one round-trip

The tools form a natural hierarchy: shape (counts) → summarize (per-file) → symbols (every symbol). Start broad, drill down.

Supported languages

24 languages: Bash, C/C++, C#, Dart, Elixir, Go, Haskell, HCL, Java, Kotlin, Lua, Objective-C, Perl, PHP, Protobuf, Python, R, Ruby, Rust, Scala, SQL, Swift, TypeScript/JavaScript, Zig.

Docs

Credits

Built on tree-sitter, graphdblite, and watchfiles. Inspired by codegraphcontext.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

symtext-0.1.0.tar.gz (224.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

symtext-0.1.0-py3-none-any.whl (155.7 kB view details)

Uploaded Python 3

File details

Details for the file symtext-0.1.0.tar.gz.

File metadata

  • Download URL: symtext-0.1.0.tar.gz
  • Upload date:
  • Size: 224.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.17

File hashes

Hashes for symtext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dea62ff07a2871ad9b88b41f23b4cb9145aea3bb5473c5c108c5bf324f99eae5
MD5 c9fa6ec3e809086a3e1198369ff1bc14
BLAKE2b-256 b6eaafe8160b805783e9f8d81b872909d378ad25bc7720af9f38530219cae48a

See more details on using hashes here.

File details

Details for the file symtext-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: symtext-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 155.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.17

File hashes

Hashes for symtext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9d4c519be345516d2eac6e633aaccc69d58f5c36b3de2fd9c1087cbbf66a8b9
MD5 febaf55d1a6f96815931e4dc00bebc04
BLAKE2b-256 463c23ce0d166dd0f1658c301d7648a375bc2cf81dde467228f30e5232abcc6d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page