Qartez Mcp

data-ai MCP Server

Semantic code intelligence MCP server for Claude Code - project maps, symbol search, impact analysis, and more

Verified
data-aidata-ai
5 views55 stars7 forksNOASSERTION

Why This Matters

Discovered via github-topic:mcp and last synced 3mo ago.

Verified
Source
github-topic:mcp
Stars
55
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
122
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (122)

Cursor

`~/.cursor/mcp.json`

Augment

`~/.augment/settings.json`

qartez_cochange

92

qartez_move

Move a symbol to another file and rewrite all import paths. One MCP call.

166

2,286

Zig

`.zig` - `pub fn`, structs, enums, unions, `@import`

Makefile

`Makefile`, `GNUmakefile`, `.mk` - targets, variables, `include` imports

Goose

`~/.config/goose/config.yaml`

qartez_refs

Trace every usage of a symbol across the codebase, with optional transitive chains.

qartez_tools

**Always visible.** Lists all tiers and their tools. Use `enable: ["analysis"]`, `enable: ["all"]`, or `disable: ["refactor"]` to control which tools are exposed to the agent. Core tools cannot be disabled.

68

1,394

201

692

Kotlin

`.kt` `.kts`

OpenCode

`~/.config/opencode/opencode.json` (or `opencode.jsonc`)

qartez_context

Smart context builder: given files you plan to modify, returns the optimal set of related files to read first.

qartez_rename_file

Rename a file and update every import pointing to it.

27

185

11x

10 additional analytical tools have no meaningful grep/read equivalent - they solve problems the non-MCP stack cannot solve at all: `qartez_hotspots`, `qartez_clones`, `qartez_smells`, `qartez_test_gaps`, `qartez_wiki`, `qartez_boundaries`, `qartez_trend`, `qartez_knowledge`, `qartez_diff_impact`, `qartez_security`. <details> <summary>Multi-language bench</summary> `make bench-all` runs the same 28-scenario harness against five pinned OSS fixtures - **`colinhacks/zod`** (TypeScript), **`spf13/cobra`** (Go), **`encode/httpx`** (Python), **`FasterXML/jackson-core`** (Java), plus the Qartez self-bench (Rust) - then emits a cross-language summary to `reports/benchmark-<lang>.md` plus a combined matrix. Every tool, every language, every scenario - measured with the `cl100k_base` tokenizer against a faithful `Glob + Grep + Read + git log` simulation. ```bash make bench # Rust self-bench only - fresh measurements make bench-all # All 5 languages (Rust, TypeScript, Python, Go, Java) + cross-language summary make bench-fixtures # Clone and index the pinned fixture repos ``` Reports land in `reports/benchmark.md` / `reports/benchmark.json` for the single-language run, or `reports/benchmark-<lang>.md` plus a combined cross-language summary for `bench-all`. </details> --- ## How it works under the hood Four layers, computed once, queried from SQLite on every tool call. ### 1. Tree-sitter parsing Every source file is parsed by a language-specific tree-sitter grammar. No LSP server, no per-language SDK installs, no cold-start penalty. The parser extracts symbols (functions, methods, types, constants), their signatures, line ranges, export visibility, import relationships, and - for 21 imperative languages - cyclomatic complexity per function. ### 2. Structural shape hashing Function bodies are canonicalized into an AST skeleton (identifiers, literals, and comments normalized away) and hashed. Two symbols with the same hash are structural clones. That's what `qartez_clones` queries. ### 3. Graph analysis Import edges form a directed graph. Three algorithms run on top: - **PageRank** - the same random-walk algorithm Google used for web pages. Applied to your import graph, it surfaces the files that form the architectural backbone of your project. - **Blast radius** - reverse BFS that counts how many files are transitively affected by a change. `qartez_impact` uses this to warn before edits. - **Leiden clustering** - community detection that partitions your codebase into logical modules for the auto-generated architecture wiki and the `qartez_boundaries` starter config. ### 4. Git history mining Walks the last N commits (default 300) and counts file pairs that appear in the same commit. This reveals *logical coupling* that the import graph can't see - files that aren't linked by imports but are always edited together. `qartez_impact`, `qartez_context`, and `qartez_hotspots` fuse these signals - PageRank + blast + co-change + complexity - into one ranked answer. No other MCP server combines all four. ### Storage Everything lives in `.qartez/index.db` - a single SQLite file with FTS5 full-text indices. On startup, Qartez re-parses only files whose modification time changed. The file watcher is enabled automatically while the server is running - edits and new files are re-indexed in the background with zero downtime. Pass `--no-watch` to disable it. ### Transport Qartez communicates over **stdio** (stdin/stdout JSON-RPC), the standard MCP transport. No HTTP server, no port allocation, no network exposure. The IDE launches the `qartez` binary as a child process and exchanges messages over pipes. --- ## Supported languages One binary. No per-language setup. All 37 languages parsed by tree-sitter (with regex fallbacks for formats lacking a compatible grammar). 21 imperative languages also get cyclomatic complexity per function, powering `qartez_hotspots`. <details> <summary>Full language table (37 languages)</summary>

PHP

`.php`

Haskell

`.hs` `.lhs` - top-level functions, `data`, `newtype`, `type`, typeclasses, `import`

Nginx

`.conf`, `.nginx` - `server`, `location`, `upstream` blocks

3k

Python

qartez_wiki

Generates a markdown architecture wiki using Leiden community detection on the import graph. Partitions files into clusters, names each one, and emits `ARCHITECTURE.md` with inter-cluster edges.

Tool

MCP tokens

qartez_stats

Codebase dashboard: files, symbols, edges by language, most-connected files.

qartez_knowledge

**Bus-factor analysis.** Git-blame-based authorship at file and module level. Surfaces single-author files and modules where knowledge is concentrated in one contributor.

161

701

qartez_impact

352

qartez_smells

Code smell detector: finds **god functions** (high complexity + long body), **long parameter lists**, and **feature envy** (methods that use another type more than their own). Tuneable thresholds.

107

4,489

Rust

`.rs`

Bash

`.sh` `.bash`

OCaml

`.ml` `.mli` - `let` bindings, `type`, `module`, `class`, `exception`, `open`/`include`

Jsonnet

`.jsonnet` `.libsonnet` - `local` functions/vars, fields, `import`/`importstr`

14

21

Yes

Yes

No

Optional

Partial

Yes

179

Rust

Ruby

`.rb`

Nix

`.nix` - attribute bindings, functions, `import` paths

TOML

`.toml` - tables, keys, arrays of tables

TypeScript

Embeddings + Milvus/Zilliz vector DB

code-review-graph

Claude-Context

319

Rust

Option

Description

Warp

`~/.warp/mcp_settings.json`

qartez_grep

127

qartez_rename

439

Prompt

What it does

468

6,750

150

Python

Swift

`.swift`

Elixir

`.ex` `.exs` - `defmodule`, `def`/`defp`, `defstruct`, `alias`/`use`/`import`

Dockerfile

`Dockerfile`, `Dockerfile.*`, `.dockerfile` - multi-stage `COPY --from` refs

23k

Python

15

~9

Project

Stars

20

Python

Task

Without Qartez

qartez_map

87

qartez_deps

Dependency graph for a file: what it imports, what imports it.

qartez_clones

Structural code-clone detection via AST shape hashing (identifiers, literals, and comments are normalized away). Finds duplicate logic the human reviewer would never spot.

qartez_test_gaps

Test coverage gap analysis via the import graph. Three modes: `gaps` ranks untested source files by risk, `map` shows test-to-source mappings, `suggest` recommends tests to run for a git diff range.

qartez_semantic

Semantic search using a local embedding model. Natural-language queries ranked by hybrid FTS5 + vector similarity (RRF). Requires the `semantic` cargo feature and a one-time model download (~270 MB).

qartez_project

Auto-detects your toolchain (Cargo, npm/bun/yarn, Go, Python, Make, Gradle) and runs test/build/lint/typecheck through a single tool.

155

848

Go

`.go`

Java

`.java`

CSS

`.css` `.scss`

Dart

`.dart` - classes, mixins, enums, underscore-based privacy

R

`.r` `.R` - function/variable assignments, S4/R6 classes, `library`/`require`/`source`

SQL

`.sql` - `CREATE TABLE`/`VIEW`/`FUNCTION`/`PROCEDURE`, `ALTER`, `BEGIN...END` blocks

Caddyfile

`Caddyfile`, `.caddyfile` - site blocks, `handle`, `reverse_proxy`, snippets

Languages

MCP tools

C

tree-sitter + SQLite + hybrid type resolution

903

Python

118

Go

Scala

`.scala` `.sc` - classes, traits, objects, case classes

Protobuf

`.proto` - `message`, `service`, `rpc`, `enum`, `import`

Python

Dependency graph + git history + LLM-generated docs

YAML

`.yaml` `.yml` - K8s, GitHub Actions, GitLab CI, docker-compose, Ansible

new

**Rust**

651

**Rust**

86

TypeScript

772

TS / Rust

25

TypeScript

287

Python

Zed

`~/.config/zed/settings.json`

qartez_boundaries

Architecture-boundary enforcement. Declare "these modules may not import those" in `.qartez/boundaries.toml` and get every violating edge back. `suggest=true` seeds a starter config from the Leiden clustering.

Kiro

`~/.kiro/settings/mcp.json`

qartez_safe_delete

Delete a symbol after reporting every file that still imports it. Refuses to apply when importers exist unless `force=true`.

Lua

`.lua` - functions, methods (`M.f`/`M:f`), `require` imports

qartez_diff_impact

**Batch impact for a git diff range.** Pass a revspec like `main..HEAD` to get changed files with PageRank, union blast radius, convergence points, and co-change omissions. One call replaces N calls to `qartez_impact` + `qartez_cochange`.

qartez_refactor_plan

Ordered, safety-annotated refactor plan for one file. Each step names a technique (Extract Method, Introduce Parameter Object), an estimated CC impact category (High/Medium/Low) with a range, and safety signals from impact, test coverage, and caller count.

qartez_insert_before_symbol

Splice new code immediately before an anchor symbol. Anchor lookup goes through the indexed symbol table - no need for the exact surrounding context.

qartez_maintenance

Inspect and compact `.qartez/index.db`. Default action `stats` reports DB / WAL sizes, top tables, current workspace fingerprint, and last full-reindex timestamp. Other actions: `checkpoint`, `optimize_fts` (merge FTS5 segments), `vacuum_incremental`, `vacuum`, `convert_incremental` (one-shot conversion to `auto_vacuum=INCREMENTAL`), `purge_stale` (drop rows for roots no longer in the workspace). Use this on a bloated DB instead of deleting `.qartez/index.db` by hand.

134

Rust

IDE

Config path

qartez_read

Read one or more symbols' source code with line numbers. No file scanning. Jumps directly to the symbol.

qartez_add_root

Register an additional project root at runtime. Indexes the directory, refreshes pagerank/co-change, and hot-attaches a file watcher; the alias is optional (derived from the path basename) and persistence is toggleable for ephemeral roots.

Gemini

`~/.gemini/settings.json`

qartez_outline

3,009

qartez_unused

Dead-code finder: exported symbols with zero importers, pre-materialized at index time.

qartez_health

**Prioritized fix list.** Cross-references `qartez_hotspots` with `qartez_smells` and buckets files as Critical (hotspot + smell), High (hotspot only), or Medium (smell only). Each entry carries a concrete suggested refactor technique.

qartez_replace_symbol

Replace a symbol's whole line range with new source. Caller provides the full replacement including the signature; preview by default, `apply=true` executes atomically.

qartez_list_roots

List every project root currently tracked by the server with its alias, source (cli/config/runtime), watcher attachment state, file count, and last index timestamp.

Windsurf

`~/.codeium/windsurf/mcp_config.json`

Antigravity

`~/.gemini/antigravity/mcp_config.json`

qartez_hotspots

**The refactor radar.** Ranks files and functions by hotspot score = **cyclomatic complexity x PageRank x (1 + churn)**. Points straight at the highest-risk code in the repo.

qartez_insert_after_symbol

Splice new code immediately after an anchor symbol. Same anchor-based addressing as `qartez_insert_before_symbol`.

qartez_security

Security scanner with 13 built-in rules. Regex-based pattern matching scored by PageRank to prioritize high-impact files. Custom rules via `.qartez/security.toml`. Filters by severity (low/medium/high/critical) and category.

qartez_workspace

Add or remove workspace domains at runtime. Registers external directories under a custom alias in `.qartez/workspace.toml`, indexes them, and purges them on removal.

Codebase-Memory

Repowise

Amp

`~/.config/amp/settings.json`

qartez_hierarchy

735

Capability

Qartez

Cline

VS Code global storage `saoudrizwan.claude-dev/settings/cline_mcp_settings.json`

qartez_find

52

qartez_calls

564

qartez_trend

Complexity trend over git history: tracks how a function's cyclomatic complexity evolved commit by commit. Flags functions that are GROWING, STABLE, or SHRINKING.

Savings

Speedup