# Grafyx [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/bilal07karadeniz/Grafyx  
**GitHub Stars:** 4  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/grafyx

## Description
Real-time codebase graph for AI assistants: call graphs, dependencies, symbol lookup.

## Tools
Capabilities this server exposes over MCP:

- **get_project_skeleton** — Get the full project structure with file tree and statistics.

Call this first when starting work on a project to understand its
overall shape, module layout, and code distribution.
- **get_function_context** — Get comprehensive context for a function: signature, parameters,
callers, callees, dependencies, and docstring.

Supports 'ClassName.method_name' syntax (e.g., 'ToolExecutor.execute').
For two top-level functions sharing the same name in different
files (where ``ClassName.method`` doesn't apply), pass ``file_path``
to pick one. If multiple matches remain, returns a disambiguation list.

Use this when you need to understand what a function does, who calls it,
and what its blast radius is for modifications.
- **get_file_context** — Get comprehensive context for a file: functions, classes, imports,
and relationships to other files.

Use this when you need to understand what a file contains and how it
connects to the rest of the codebase.
- **get_class_context** — Get comprehensive context for a class: methods, properties,
inheritance chain, and usages throughout the codebase.

Use this when you need to understand a class's interface and where it is used.
- **get_module_context** — Get an overview of all symbols in a directory/package.

This is the intermediate zoom level between get_project_skeleton
(whole project) and get_file_context (single file). Use it to
understand what a package contains before drilling into specifics.
- **find_related_code** — Find functions, classes, and files related to a natural language description.

Use this when you know WHAT you're looking for conceptually but not
WHERE it lives in the codebase. Prevents duplicating existing functionality.
- **find_related_files** — Find files related to a natural language description by scoring
symbols inside them.

Use this when you need to understand which files are relevant to a
feature or concept. Returns files grouped with their matching symbols.
- **get_dependency_graph** — Get the dependency graph for a symbol: what it depends ON and
what depends on IT, up to the specified depth.

Use this to understand the impact radius of changing a symbol.
- **get_call_graph** — Get the call graph for a function: what it calls and what calls it,
recursively up to the specified depth.

Supports 'ClassName.method_name' syntax (e.g., 'SkillManager.initialize').
If multiple functions share the same name, returns a disambiguation list.

Use this to trace execution flow and understand how a function fits
into the larger call chain. By default, Python builtins and common
stdlib methods (len, append, strip, etc.) are filtered out for clarity.
Set include_builtins=True to see everything.
- **set_project** — Set or change the project directory that Grafyx analyzes.

Call this when Grafyx reports 'No project loaded' — typically when
running as a global MCP server.  Pass the workspace root path.

After calling this, all other Grafyx tools will work on the specified
project.  Re-call with a different path to switch projects.
- **get_conventions** — Detect and report coding conventions used in this codebase.

Use this to understand the project's style BEFORE writing new code,
so your additions are consistent with existing patterns.
- **refresh_graph** — Bring the codebase graph up to date with the code on disk.

Use this after making changes to the codebase, or if the graph seems
stale. On mirrored (Windows-mount) projects the mirror is re-synced
first and only the changed files are re-parsed (incremental, ~seconds);
a full re-parse runs only when the change set can't be determined.
Normally the file watcher handles this automatically on native
projects.
- **get_unused_symbols** — Find functions and classes with zero inbound references (dead code detection).

Analyzes the caller index and import graph to identify symbols that
are never called, subclassed, or referenced from other code.

Excludes common false positives: dunder methods, framework-decorated
handlers, entry points, and exception classes.
- **get_subclasses** — Find all classes that extend a given class, recursively.

Use this to understand the impact of changing a class's interface:
which subclasses would need updating?

Supports multi-level inheritance trees up to the specified depth.
When the codebase has multiple classes sharing ``class_name`` (e.g.
Django defines ``Field`` in both ``contrib/gis/gdal/field.py`` and
``db/models/fields/__init__.py``), pass ``file_path`` to pick the
intended definition. Without it, the first match wins and the
response includes ``ambiguous: True`` plus a ``candidates`` list so
you can retry.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "grafyx": {
    "command": "uvx",
    "args": ["--from","grafyx-mcp","grafyx"]
  }
}
```

## Documentation

## What Grafyx MCP server does

Grafyx MCP server gives an AI coding assistant structured access to a codebase’s relationships. Instead of limiting the assistant to raw file contents, it provides project structure, symbol details, imports, callers, callees, inheritance, dependencies, and usage information.

The server supports Python files with `.py` and `.pyi` extensions, along with TypeScript and JavaScript files using their common source extensions. Languages are detected automatically, or they can be selected explicitly when starting the command.

Its tools support several levels of code navigation. An assistant can inspect the entire project, narrow the view to a directory or module, examine a function or class, trace calls, inspect dependency impact, find subclasses, and identify unused symbols. Natural-language search is available for locating related code and files based on symbols and descriptions.

## How it works

At startup, Grafyx parses the selected project into a semantic graph using Graph-sitter, which is based on tree-sitter. A FastMCP server exposes the graph through 14 MCP tools over standard input and output. The served project can also be changed at runtime with `set_project`.

Watchdog monitors source changes when file watching is enabled. After an edit, Grafyx reparses the affected project after a short debounce period, allowing connected agents to query an updated graph. Multiple agents can connect to one instance serving the same project; changes made by one agent become available to the others after the watcher updates the graph.

`find_related_code` uses a code-embedding model through fastembed and ONNX on the CPU. The default encoder is downloaded on first use and cached locally. The encoder can be changed with `GRAFYX_ENCODER`, including the default `jina-v2` and the alternative `coderankembed`.

## Setup and configuration

Install with `uvx` without a separate package installation, or install the `grafyx-mcp` package with pip and launch the `grafyx` command. The README provides MCP configuration examples for Claude Code, Cursor, Windsurf, Cline, and VS Code.

The command accepts `--project` to choose the analyzed directory, `--languages` for a comma-separated language list, `--ignore` for additional ignored patterns, `--no-watch` to disable live updates, and `--verbose` for debug logging. It analyzes the current directory by default. Common generated and dependency directories, including `node_modules`, `.git`, virtual environments, build outputs, and cache directories, are ignored by default.

## Limitations and notes

Windows users are directed to run Grafyx through WSL and configure the MCP client to launch it there.

The documented language support is limited to Python, TypeScript, and JavaScript. The embedding model is downloaded on first use, so semantic search has an initial model setup step and local cache requirements. File watching can be disabled, but doing so removes automatic graph refreshes; `refresh_graph` remains available for manual reparsing.

_Full upstream README: https://allmcps.com/mcp/grafyx/readme_

