
Grafyx
io.github.bilal07karadenizPublished by GitHub account bilal07karadenizv0.2.4Updated Oct 24, 2026
Real-time codebase graph for AI assistants: call graphs, dependencies, symbol lookup.
Overview
Grafyx parses a local codebase into a live relationship graph and exposes it over MCP so an assistant can trace calls, dependencies and symbols.
- What you can do
- Inspect project structure, modules and per-module stats, and switch the served project at runtime
- Look up functions, classes and files with their callers, callees, imports, inheritance and usages
- Trace call chains and dependency graphs for impact analysis, plus subclass trees and unused-symbol detection
- Search code by natural-language description or by symbols relevant to a feature
- Report detected coding conventions and force a re-parse of the codebase
- When to use it
- Useful when an assistant works on a Python, TypeScript or JavaScript project and needs architectural context rather than raw file reads: tracing call chains, judging the impact of a change, finding related code, or spotting dead code.
- Requirements
- Runs locally over stdio, launched with uvx from the grafyx-mcp PyPI package (or a pip install). Needs Python and, on Windows, WSL because Graph-sitter requires Linux. The project path defaults to the current directory and can be set with a --project option. The default search encoder is downloaded on first use and cached locally.
Installation
In SourceWeft
- Open Grafyx in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Grafyx
[PyPI] [Downloads] [CI] [License: MIT] [Python 3.12+] [MCP] [Grafyx MCP server]
Real-time codebase understanding for AI coding assistants.
What is Grafyx?
AI coding tools read raw files with zero architectural understanding -- they don't know what calls what, which classes inherit from where, or how your modules connect. Grafyx fixes this by parsing your entire codebase into a full relationship graph using Graph-sitter (built on tree-sitter), then exposing that graph to any AI assistant through the Model Context Protocol (MCP). Your assistant can trace call chains, map dependencies, find related code by description, detect conventions, and understand your project's architecture -- all in real time, with a file watcher that keeps the graph current as you edit.
Quick Start
Claude Code
Cursor / Windsurf / Cline
Add to your MCP config file:
- Cursor:
.cursor/mcp.json(project) or~/.cursor/mcp.json(global) - Windsurf:
~/.codeium/windsurf/mcp_config.json - Cline: Cline MCP settings in VS Code
VS Code (GitHub Copilot)
Add to .vscode/mcp.json:
Using pip instead of uvx? Replace the command with:
"command": "grafyx"(no args needed).
Available Tools
How It Works
- Startup -- Grafyx detects languages in your project and parses all source files into a semantic graph via Graph-sitter.
- Serving -- The FastMCP server exposes 14 tools over stdio. Your AI assistant calls them as needed.
- Live updates -- Watchdog monitors file changes. When you save, the graph is automatically re-parsed after a short debounce.
ML-augmented search
Grafyx's find_related_code uses a pretrained code embedding model (default:
jinaai/jina-embeddings-v2-base-code, Apache-2.0, 161M params) running on CPU
via ONNX through fastembed. The model
is downloaded on first use and cached locally — no GPU, no daemon, no cloud
calls.
Since 0.2.1, fastembed is a hard dependency, so the default install
already includes the encoder — no extra needed.
Benchmark (0.2.0, 278 docstring→function queries across FastAPI + Django):
The default encoder more than doubles retrieval quality over plain source-token search (+135% nDCG@10).
Full breakdown + per-query JSONL: docs/benchmarks/0.2.0/.
Switch encoders via the GRAFYX_ENCODER env var:
jina-v2(default) — Apache-2.0, fastembed-native, ~150 MB. Wins on accuracy; recommended unless you have a specific reason to switch.coderankembed— MIT, 137M, ONNX-int8, ~140 MB. Lower latency but ~12 nDCG@10 points behind jina-v2 in our eval. Hosted atBilal7Dev/grafyx-coderankembed-onnx.
Supporting numpy-only MLPs (~5 MB total weights, bundled in the wheel):
- M1 Relevance ranker — 33-feature MLP that re-ranks the encoder's top candidates using structural signals (caller count, name overlap, exports).
- M3 Source token filter — suppresses noise tokens (imports, strings, magic methods) from full-text search.
- M4 Symbol importance — weights symbols by caller count, exports, and structural signals.
- Gibberish detector — character-bigram MLP that blocks nonsense queries before they hit the index.
Reproducible benchmarks against FastAPI, Django, and Home Assistant ship in
benchmarks/ (python -m scripts.run_all).
Supported Languages
Languages are auto-detected. To specify manually:
Options
Default ignored: node_modules, .git, __pycache__, .venv, venv, .env, dist, build, .tox, .mypy_cache, .pytest_cache, .ruff_cache, egg-info, .eggs, .next, .nuxt, coverage, .coverage, .nyc_output
Multi-Agent Support
Grafyx works with agent teams. A single Grafyx instance serves all agents connected to the same project. When one agent modifies code, the file watcher updates the graph automatically, so other agents immediately see the changes.
Contributing
Troubleshooting
Windows: Graph-sitter requires Linux. Use WSL and configure your MCP client to launch via wsl:
License
MIT -- see LICENSE for details.
Source: README.md at commit 2d93bd1
Tools
0Version history
1- v0.2.4LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts