Stellaris MCP
Stellaris MCP is an AI-powered code search and exploration server combining semantic search, AST-based analysis, dependency graphing, and project health diagnostics. It provides 30+ tools across these categories:
Search & Indexing
search_code— Hybrid natural language search (FTS + vector embeddings + reranking) across code filessearch_docs— Semantic search across Markdown documentationreindex/reindex_file— Build or incrementally refresh the vector, FTS, and dependency graph index
Structural Code Exploration (no API calls)
get_file_tree— Browse the full project file tree with language statsget_file_outline— List all top-level symbols with line ranges, imports, and exportsget_file_folded— View symbol signatures + JSDoc without full bodies (token-efficient)get_symbol— Retrieve full source of a specific symbol with surrounding context
Dependency Graph Analysis (no API calls)
get_dependencies/get_dependents— Direct and transitive import/export analysisget_blast_radius— BFS impact analysis for changes, with severity ratingget_circular_deps— Detect circular dependency cycles (Tarjan's SCC)get_dead_code— Find files never imported (unused code candidates)get_topological_order— Safe refactoring order (dependencies before dependents)simulate_move— Preview import updates before renaming/moving a fileget_most_coupled— Identify highly coupled files (refactoring risk hotspots)
Architecture & Documentation
get_boundary_violations— Enforce layer rules fromstellaris.boundaries.jsonfind_doc_references— Find Markdown/spec files referencing a given symbol or file
Database Tools
db_snapshot— Introspect a PostgreSQL or Prisma schema and save a local snapshotdb_schema— Read the schema snapshot (tables, columns, keys, indexes, enums, RLS) without a live DB connectiondb_search— Search the schema snapshot by natural language query
Project Health & Visualization
project_health— Aggregated health score (A–F) covering cycles, dead code, coupling, and index freshnessgraph_view— Launch a 3D interactive dependency graph in the browsergraph_export— Export architecture diagrams in Mermaid, SVG, or HTML
Usage Tracking & Analytics
usage_stats— Token consumption and estimated API cost grouped by model, project, day, etc.usage_dashboard— Local interactive web dashboard with charts and cache analyticsusage_anomalies— Flag sessions hitting cost/token health thresholdsusage_breakdown— Structured report by task category, MCP server, and core tool
Session & Workflow Automation
session_briefing— Condensed project briefing (graph health + recent git activity) under ~800 tokensdetect_significant_changes— Heuristic detector for technically significant sessions
MCP Prompts (/nova_explore, /nova_find, /nova_file, /nova_review, /nova_usage) provide guided workflows for common tasks.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Stellaris MCP search for functions related to payment processing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Stellaris MCP
An MCP server that combines semantic search (pluggable embeddings + LanceDB) with AST-based code exploration (tree-sitter) for AI agents.
Search your codebase with natural language, browse file structures, inspect symbol outlines, and retrieve exact source code — all through the Model Context Protocol.
Features
Routed search — identifier / dotted / quoted string → FTS only (never embeds; a miss is empty, not a vector guess). Intent → hybrid FTS + vectors + RRF. Language keywords refused.
Pluggable embeddings — OpenAI (default), Voyage AI (
voyage-code-3, best on code), or Ollama (fully local, no internet required)Optional re-ranking — Voyage
rerank-2or Coherererank-v3.5post-RRF pass for +15-30% top-5 precisionDependency graph — resolves imports to real file paths, tracks file→file dependencies
Blast radius analysis — BFS traversal to find what would break if you change a file
Architecture boundaries (v4.4) — enforce layer rules (
stellaris.boundaries.json) at index time; violations surfaced viaget_boundary_violationswith zero runtime costDoc/spec linking (v4.4) — markdown
`backtick-quoted`symbol references are linked to their definitions, queryable viafind_doc_referencesContext-overflow protection (v4.4) — tier-aware result limits + automatic truncation with
_truncatedmetadata, configured bySTELLARIS_CONTEXT_WINDOW(small/medium/large/massive tiers)MCP Prompts — 5 guided workflows (
/nova_explore,/nova_find,/nova_file,/nova_review,/nova_usage)Usage dashboard — tracks Claude Code token consumption and estimated API cost in real time, with cache analytics and task category breakdown
Token breakdown — see where tokens go: by task category (coding, debugging, feature…), MCP server, and core tool — inspired by codeburn
Index integrity checker — automatically purges orphaned chunks and stale meta entries at every startup
Auto-reindex hook — Grok installs it on
npm install; Claude Code needs aPostToolUsesnippet (see below)AST exploration: file tree, symbol outlines, source extraction — zero API calls
Context-aware: imports, sibling symbols, and TODO/FIXME warnings included automatically
Incremental indexing: only changed files are re-embedded
Safe by default: no auto-indexing until you explicitly run
reindexfor the first timeAuto-indexing on subsequent startups (opt-in via
.stellarisrc)28 file extensions: TS, JS, Python, Go, Rust, PHP, Java, Ruby, HTML, CSS, Astro, Vue, Svelte, SCSS, JSON, YAML, SQL, GraphQL, Prisma, TOML, QML, shell, and more
Graceful degradation: works without any API key (AST tools still available)
Related MCP server: Serena MCP Server
How agents should search
Grep/rg wins on a known name for occurrences. Stellaris wins for intent, ranked definition, and large-file outline/symbol. Do not send every lookup through hybrid search_code.
Need | Tool |
Identifier / exact string, definition |
|
All occurrences, logs, lockfiles, CSS | grep / rg |
Intent / name unknown |
|
File known, ≳150 lines |
|
File known, small | Read the file |
Identifier miss ( | grep / rg — do not retry as intent |
Copy the agent skill so this routing is loaded automatically:
skills/stellaris-explore/SKILL.md
Grok:
~/.grok/skills/stellaris-explore/SKILL.mdor<project>/.grok/skills/stellaris-explore/SKILL.mdClaude Code:
~/.claude/skills/stellaris-explore/SKILL.mdor<project>/.claude/skills/stellaris-explore/SKILL.md
MCP prompts /nova_explore and /nova_find already follow this contract.
Benchmark: intent / multi-file (not a known identifier)
Tested on a real-world Astro project (341 files, 430 chunks indexed), on intent questions (auth flows, payment, i18n) — not search_code("usePermissions"):
Metric | Without Stellaris | With Stellaris | Improvement |
Tool calls (avg) | 5.0 | 1.5 | -70% |
Full files read (avg) | 2.8 | 0 | -100% |
Tokens consumed | ~12 000 | ~2 500 | -80% |
Precision | Variable (noisy grep results) | High (targeted previews) |
On a name you already have, grep/rg is cheaper for occurrences. search_code FTS is for the ranked definition (no embedding).
Tools
11 tools are listed by default: search_code, search_docs, get_file_tree, get_file_outline, get_symbol, get_dependencies, get_dependents, get_blast_radius, session_briefing, reindex, reindex_file.
Set STELLARIS_TOOLS=all in the server env to list the other 19 (graph analysis, architecture boundaries, DB schema, usage tracking) and to start the usage scanner. They stay callable either way.
Style and config files (.css, .scss, .less, .json, .yaml, .yml, .toml) are indexed for keyword search only: they are not embedded.
Semantic search (requires an embedding API key, or Ollama locally)
Tool | Description |
| Identifier / exact string → FTS only (never embeds; empty = no symbol). Intent → hybrid. Optional |
| Docs search. Same |
| Incremental re-indexing of the project. Builds vector index, FTS index, and dependency graph. Use |
| Re-index a single file by absolute path. Used by auto-reindex hooks after edits. |
Structural exploration (no API calls)
Tool | Description |
| Project file tree with language stats. |
| List symbols in a file with line ranges + imports, exports, and TODO/FIXME warnings. |
| Full source code of a specific symbol + surrounding file context (imports, siblings, warnings). |
Dependency graph (no API calls)
Tool | Description |
| Files that a given file imports. Supports |
| Files that import a given file (reverse dependencies). |
| BFS impact analysis: finds all files transitively affected by changes to a file. Returns severity (LOW/MEDIUM/HIGH) and files grouped by depth. |
Architecture & documentation (no API calls, STELLARIS_TOOLS=all)
Tool | Description |
| Returns architecture layer violations detected at index time. Rules are loaded from |
| Find markdown/spec files that reference a code symbol or file (via |
Usage tracking (no API calls, STELLARIS_TOOLS=all)
Tool | Description |
| Token consumption and estimated API cost. Group by |
| Launches a local web dashboard (port 8090) with interactive charts, session breakdown, cache analytics, and Breakdown tab. |
| Structured Markdown report: task category breakdown, MCP server breakdown, core tool breakdown. Accepts |
MCP Prompts
Type /nova in Claude Code to access guided workflows:
Prompt | Description |
| Full codebase walkthrough — file_tree → search → outline → symbol |
| Locate how a feature is implemented (semantic → drill-down) |
| Deep-dive into a specific file — outline + key symbols |
| Review recently changed files and assess their blast radius |
| Show token consumption stats and open the interactive usage dashboard |
Context-aware design
A common pitfall with code search tools is returning results that are too precise — the LLM gets the exact function it asked for, but misses the surrounding context needed to make safe decisions (imports, sibling functions, TODO warnings).
Stellaris addresses this with automatic context enrichment:
get_symbolreturns the requested source code plus file-level context by default:Imports — only the ones the symbol refers to, so the LLM knows where its dependencies come from
Sibling symbols — names and line ranges of other functions/classes in the same file, preventing duplications and revealing patterns
Warnings — TODO, FIXME, HACK, NOTE, @deprecated comments found anywhere in the file
get_file_outlinereturns symbol names plus the file's imports and exports, so the LLM understands the dependency graph before diving into code.
This adds ~100-200 tokens of "useful noise" per call — far cheaper than reading the entire file (~800-2000 tokens), while preventing blind refactoring errors.
On files ≤150 lines, get_symbol omits file_context (Read the small file instead). The context parameter can be set to false if you only need the raw source.
Example get_symbol response
{
"file": "src/indexer/chunker.ts",
"symbol": "chunkCodeAST",
"lines": "299-380",
"source": "function chunkCodeAST(content, file) { ... }",
"file_context": {
"imports": ["node:crypto", "tree-sitter", "../config/defaults.js"],
"exports": ["chunkFile", "parseFileSymbols", "extractFileContext"],
"siblings": [
"function extractImports (261-285)",
"function chunkMarkdown (382-429)",
"function chunkCodeFallback (431-465)"
],
"warnings": ["L42: TODO handle edge case for empty files"]
}
}Recommended workflow
reindex— index the project for the first time (builds vector, FTS, and graph indexes)get_file_tree— discover the project structureFind code — intent →
search_code(hybrid). Known identifier definition →search_code(FTS). Occurrences of a known name → grep/rg. Optionalpathto search another already-indexed project.get_file_outline— view symbols + imports/exports in a matched large file (Read small files directly)get_symbol— one body from a large file; follow thenext:hint. Do not Read the whole file.
Or use /nova_explore / the stellaris-explore skill.
Impact analysis workflow:
get_dependents— find who imports a file you're about to changeget_blast_radius— get full transitive impact before making changesget_dependencies— understand what a file relies on
Steps 2, 4, 5, and all graph tools consume zero API tokens.
After the first reindex, a .stellarisrc file is created in the project root with auto_index=true. Subsequent server startups will automatically run incremental indexing (only changed files).
Auto-reindex hook (Grok + Claude Code)
auto_index=true only runs at MCP startup. While a session is open, new/edited files are indexed by a PostToolUse hook.
Grok (automatic). npm install installs ~/.grok/hooks/stellaris-reindex.json when ~/.grok exists and Node 22 (nova-node) is available. It fires after write / search_replace (and Claude aliases Write / Edit), reads the path from hook stdin, and reindexes that file. Re-run:
npm run install-hooksThen start a new Grok session (or /hooks-list to confirm stellaris-reindex). The hook must run under Node 22 — never PATH Node 26 — because it loads better-sqlite3.
Claude Code (manual). Add this to ~/.claude/settings.json (replace the path):
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "node \"/path/to/stellaris-code-search/scripts/reindex-file.mjs\" \"$file_path\" 2>&1 || true",
"timeout": 30
}]
}]
}
}Installation
git clone https://github.com/GDM-Pixel/stellaris-code-search.git
cd stellaris-code-search
npm install
npm run buildNode 22 only (ABI 127). Grok / Nova launch this server with nova-node, not PATH node. This repo has a mise.toml pin. Do not npm rebuild better-sqlite3 under Node 24/26 — it breaks the MCP for every project until you reinstall with Node 22.
# if PATH node is not 22:
/home/charles/.local/bin/nova-node "$(command -v npm)" install
npm run doctor # must print ABI 127Configuration
Environment variables
Variable | Required | Description |
| For OpenAI provider (default) | API key for |
| No (default: |
|
| For Voyage provider | API key for |
| No (default: | Override Voyage embedding model |
| No (default: | Ollama base URL |
| No (default: | Ollama embedding model |
| No (default: |
|
| No (default: | Voyage re-rank model |
| For Cohere re-ranker | API key for |
| No (default: 11 core tools) |
|
| No (default: | Calling LLM's context window in tokens. Drives tier-based result limits and truncation thresholds: small (<50K), medium (50–150K), large (150–500K), massive (>500K). |
The server and the per-edit hook read DOTENV_CONFIG_PATH, then the .env of the working directory, then the .env next to the install: one .env in the Stellaris folder is enough for every project.
Without any embedding API key (and no Ollama), the server starts normally — get_file_tree, get_file_outline, and get_symbol work without it.
Switching embedding providers
If you change EMBEDDING_PROVIDER on an existing index, Stellaris will refuse to run an incremental reindex (to avoid silently corrupting the vector store). Run:
# Force-rebuild the index with the new provider
reindex force=trueThis deletes the old LanceDB table and meta.json, then rebuilds from scratch.
.vectorconfig.json (optional)
Place at the root of the project to index:
{
"include": ["src/**", "packages/**", "docs/**"],
"exclude": ["node_modules/**", "dist/**", "**/*.test.ts"],
"chunkStrategy": "ast"
}stellaris.boundaries.json (optional, v4.4)
Place at the project root to enforce architecture layer rules at index time. Any depends_on edge that matches a deny rule is flagged as a boundary violation and surfaced through get_boundary_violations. Detection happens during reindex — there is no runtime cost.
{
"deny": [
{
"name": "ui-never-imports-db",
"from": "src/ui/**",
"to": "src/db/**",
"reason": "UI layer must go through services, not DB directly"
},
{
"from": "src/domain/**",
"to": "src/infrastructure/**",
"reason": "Hexagonal architecture: domain must stay infrastructure-agnostic"
}
]
}Glob syntax: ** matches any depth, * matches one path segment, ? matches one character. Paths are relative to project root, forward slashes.
.stellarisrc (auto-generated)
Created automatically after the first successful reindex. Controls auto-indexing and embedding configuration.
# Stellaris Code Search configuration
auto_index=true
# Embedding provider (openai | voyage | ollama) — default: openai
# embedding_provider=voyage
# embedding_model=voyage-code-3
# Re-ranking (off | voyage | cohere) — default: off
# rerank_provider=voyage
# Import-alias overrides (safety net if auto-detection from
# tsconfig paths / vite resolve.alias fails). Path is relative
# to the project root.
# alias.@=src
# alias.#utils=src/lib/utilsYou can toggle auto_index via the reindex tool (enable_auto_index: false) or edit the file manually.
Import alias resolution. The dependency graph auto-detects path aliases from the tsconfig.json/jsconfig.json nearest each source file (following extends, including monorepo subdirectories), falling back to vite.config.* resolve.alias. The @/ and ~/ conventions resolve to the nearest src/ automatically. Use the alias.<name>=<path> lines above only as an override when auto-detection can't find your config.
.vectorignore (optional)
Same syntax as .gitignore, to exclude files from indexing.
Security
Stellaris never indexes sensitive files. Two layers of protection ensure secrets are never sent to OpenAI:
Glob exclusions (
DEFAULT_EXCLUDE) — files matching these patterns are never scanned:.env*,secrets.*,credentials.**.pem,*.key,*.cert,*.p12,*.pfx,*.keystore
Ignore filter (defense in depth) — same patterns applied via the
ignorelibrary during file scanning, as a second safety net.
Additionally, .gitignore and .vectorignore rules are always respected.
Claude Desktop integration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"stellaris-mcp": {
"command": "node",
"args": ["/path/to/stellaris-code-search/dist/index.js"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}To use Voyage embeddings instead of OpenAI:
{
"mcpServers": {
"stellaris-mcp": {
"command": "node",
"args": ["/path/to/stellaris-code-search/dist/index.js"],
"env": {
"EMBEDDING_PROVIDER": "voyage",
"VOYAGE_API_KEY": "pa-...",
"RERANK_PROVIDER": "voyage"
}
}
}
}To use Ollama (fully local, no API key needed):
{
"mcpServers": {
"stellaris-mcp": {
"command": "node",
"args": ["/path/to/stellaris-code-search/dist/index.js"],
"env": {
"EMBEDDING_PROVIDER": "ollama",
"OLLAMA_MODEL": "nomic-embed-text"
}
}
}
}Supported languages & formats
Language / Format | Extensions | Parsing | Symbol types |
TypeScript |
| tree-sitter (AST) | function, component, hook, class, type |
TSX |
| tree-sitter (AST) | function, component, hook, class, type |
JavaScript |
| tree-sitter (AST) | function, component, class |
JSX |
| tree-sitter (AST) | function, component, class |
Python |
| tree-sitter (AST) | function, class |
Go |
| tree-sitter (AST) | function, method, type |
Rust |
| tree-sitter (AST) | function, struct, impl, trait, type |
PHP |
| tree-sitter (AST) | function, class, type |
Java |
| tree-sitter (AST) | class, interface, enum |
Ruby |
| tree-sitter (AST) | class, module, method |
HTML |
| tree-sitter (AST) | element |
CSS |
| tree-sitter (AST) | rule |
Astro |
| fallback (chunked) | module |
Vue |
| fallback (chunked) | module |
Svelte |
| fallback (chunked) | module |
SCSS / Less |
| fallback (chunked) | module |
JSON |
| fallback (chunked) | module |
YAML |
| fallback (chunked) | module |
SQL |
| fallback (chunked) | module |
GraphQL |
| fallback (chunked) | module |
Prisma |
| fallback (chunked) | module |
TOML |
| fallback (chunked) | module |
Markdown |
| heading-based | doc_section |
Architecture
src/
index.ts # MCP entry point, tool + prompt registration
startup.ts # Auto-indexing on startup (reads .stellarisrc)
prompts.ts # MCP Prompts definitions (nova_explore, nova_find, nova_usage, ...)
config/
defaults.ts # Extensions, chunking settings, LanceDB config
loader.ts # .vectorconfig.json loader
stellarisrc.ts # .stellarisrc reader/writer
indexer/
scanner.ts # File scanning (.gitignore, .vectorignore)
chunker.ts # Multi-language AST parsing + symbol extraction
embedder.ts # Embedding factory (provider-agnostic)
hasher.ts # SHA-256 hashing + _index_config sentinel
providers/
base.ts # EmbeddingProvider interface + retry helper
openai.ts # OpenAI provider (text-embedding-3-small)
voyage.ts # Voyage AI provider (voyage-code-3)
ollama.ts # Ollama provider (nomic-embed-text, local)
store/
lancedb.ts # LanceDB vector storage (dynamic dims)
fts.ts # SQLite FTS5 full-text index
search/
route.ts # Query classifier: identifier/exact → FTS, intent → hybrid
hybrid.ts # RRF fusion of vector + FTS results + optional rerank
reranker.ts # Voyage / Cohere re-ranking post-RRF
graph/
resolver.ts # Import string → real file path resolution
store.ts # SQLite dependency graph (graph.db)
blast.ts # BFS blast radius + dependency chain
tools/
searchCode.ts # search_code tool (routed FTS / hybrid)
searchDocs.ts # search_docs tool (hybrid)
reindex.ts # reindex + reindex_file tools
getFileTree.ts # get_file_tree tool
getFileOutline.ts # get_file_outline tool
getSymbol.ts # get_symbol tool
getDependencies.ts # get_dependencies tool
getDependents.ts # get_dependents tool
getBlastRadius.ts # get_blast_radius tool
usageStats.ts # usage_stats tool (group_by: model/project/day/cache/anomaly/category/mcp/core_tool)
usageDashboard.ts # usage_dashboard tool + HTTP server
usageBreakdown.ts # usage_breakdown tool (Markdown report)
usage/
scanner.ts # JSONL scanner — global dedup by message.id, MCP/core split, classifier
store.ts # SQLite schema: turns, sessions, processed_files + v3.9 columns
pricing.ts # Per-model pricing table (April 2026)
classifier.ts # 13-category heuristic classifier (bilingual FR+EN)
dashboard.ts # Interactive HTML dashboard renderer (5 tabs incl. Breakdown)
indexer/
integrity.ts # Startup integrity check: orphan purge + stale meta cleanup
scripts/
reindex-file.mjs # Hook script for auto-reindex after Write/EditStorage
The index is stored in .vectors/ at the project root:
.vectors/lancedb/— LanceDB vector database (embeddings).vectors/fts.db— SQLite FTS5 full-text index.vectors/graph.db— SQLite dependency graph.vectors/meta.json— file meta-index (hashes, chunk IDs, timestamps)
This directory is automatically excluded from scanning.
Usage data is stored globally in ~/.claude/usage.db (SQLite). Data older than 180 days is automatically purged at startup. The dashboard shows the last 90 days.
At every startup, an integrity check runs automatically:
Orphaned chunks (in LanceDB/FTS/graph but absent from
meta.json) are purged from all 3 storesStale
meta.jsonentries (source file deleted from disk) are removed so the next reindex handles them correctly
Development
npm run dev # Run with tsx (hot reload)
npm run build # Compile TypeScript
npm run watch # Watch mode compilation
npm test # All test files (Node 22)Native addons (better-sqlite3, LanceDB, tree-sitter) are built for Node 22: run npm install, npm run build and npm test under Node 22 (mise exec -- in this repo).
Maintenance scripts
The server repairs an index at startup (integrity check, then incremental reindex). These scripts do the same for a list of projects, without opening a session in each:
Script | What it does |
| Purge chunks no file owns, forget half-indexed files, optionally reindex |
| Re-embed chunks stored without a vector by versions before 4.9.1 |
| Rebuild the dependency graph from the files (no embedding call) |
| Drop old LanceDB versions in every index under the directories |
| Relevance check against |
Run them with npx tsx. eval.json is a list of { "q": "question", "expect": "part of the file path" }.
License
Available Tools
30 toolsdb_schemaA
Read the local database schema snapshot. Returns tables, columns, types, primary keys, foreign keys, indexes, enums, and RLS policies. No DB connection needed — reads from .vectors/db-schema.json. Run db_snapshot first to create or refresh the snapshot.
Inputs: table, format, include_indexes, include_policies.
db_searchA
Search the database schema by natural language query. Finds tables and columns matching a concept (e.g. "user permissions", "image generation prompts", "article cover"). No DB connection needed — searches the local snapshot.
Inputs: query (required), limit.
db_snapshotA
Introspect a database and save a local schema snapshot to .vectors/db-schema.json. Connects to the DB via a connection string (PostgreSQL supported), or falls back to parsing local schema files (prisma/schema.prisma, database.types.ts). Run this once before using db_schema or db_search.
Inputs: connection_string, provider, schemas, save_connection.
detect_significant_changesA
Heuristic detector for "was this session technically significant?" Returns significant:true + signals if git diff exceeds thresholds (default: 100 lines or 5 files) or graph has cycles. Intended for Stop/SessionEnd hooks to prompt memorization via nova-mind-cloud storeMemory. No API.
Inputs: base, lines_threshold, files_threshold.
find_doc_referencesA
Find documentation/markdown files that reference a code symbol or file (via backtick-quoted identifiers). Use this to discover where a symbol is documented, or to check if a file you are about to delete is mentioned in the docs. Requires a prior reindex.
Inputs: symbol, file.
get_blast_radiusA
Analyze the blast radius of changes to a file: find all files that would be directly or transitively affected. Uses BFS on the dependency graph. Returns severity assessment, impacted files by depth, and edges. Requires a prior reindex. No API call needed.
Inputs: file (required), depth.
get_boundary_violationsA
Returns architecture boundary violations detected at index time. Rules are loaded from stellaris.boundaries.json at project root (format: { "deny": [{ "from": "src/ui/**", "to": "src/db/**", "reason": "..." }] }). Patterns are glob-style. Use this to enforce layering rules without runtime overhead. Requires a prior reindex.
Inputs: no named parameters.
get_circular_depsA
Detect circular dependencies in the project using Tarjan's SCC algorithm. Returns groups of files that form dependency cycles. Use this before refactoring to identify problematic coupling. Requires a prior reindex. No API call needed.
Inputs: max_cycles.
get_dead_codeA
Find files that are never imported by any other file (dead code candidates). Excludes known entry points (index, main, config, test files). Use this to identify unused code before cleanup. Requires a prior reindex. No API call needed.
Inputs: exclude_patterns.
get_dependenciesA
Get the files that a given file imports (its dependencies). Shows the dependency chain from this file outward. Requires a prior reindex to build the dependency graph. No API call needed.
Inputs: file (required), depth.
get_dependentsA
Get the files that import a given file (its dependents / reverse dependencies). Shows what other code relies on this file. Requires a prior reindex to build the dependency graph. No API call needed.
Inputs: file (required).
get_file_foldedA
STEP 3 of token-efficient exploration. Returns all symbols with signatures + JSDoc but NO function bodies — folded view under a token budget. Ideal when you need to understand a file structurally without reading every implementation. Falls back to truncated:true if budget exceeded. AST-based, no API.
Inputs: file (required), token_budget.
get_file_outlineA
STEP 2 of token-efficient exploration. Lists top-level symbols (functions/classes/types/hooks) with line ranges + imports/exports. ~200 tokens. After this, call get_file_folded for signatures+JSDoc, or get_symbol for full source of ONE symbol. NEVER Read the whole file — you have better tools. Uses AST, no API.
Inputs: file (required).
get_file_treeA
Get the project file tree structure. Returns all indexed files organized by directory, with stats on languages and file counts. No API call needed — instant response.
Inputs: path.
get_most_coupledA
Returns the most highly coupled files (highest combined in-degree + out-degree). High coupling signals refactoring candidates. Files with many consumers (high in-degree) are risky to change; files with many imports (high out-degree) have broad dependencies. Requires a prior reindex. No API call needed.
Inputs: top.
get_symbolA
STEP 4 of token-efficient exploration — the only step that returns full source. Fetches ONE symbol (function/class/type) with file context (imports, siblings, warnings). Use ONLY after search_code/get_file_outline/get_file_folded identified the symbol. No API.
Inputs: file (required), name (required), context.
get_topological_orderA
Returns files in dependency order (dependencies before dependents). Use this to determine the safe order to modify files during a refactor — process files in this order to avoid breaking intermediate builds. Requires a prior reindex. No API call needed.
Inputs: files.
graph_exportA
Export a static architecture diagram from the dependency graph. Groups files by semantic layer (Tools, Storage, Graph, Indexer, Analytics, API, Frontend, Backend, Security, Config) based on directory-name heuristics. Three output formats: mermaid (copy-paste in README, renders on GitHub/GitLab), svg (standalone dark-theme file), html (self-contained page with legend + download button). Requires a prior reindex. No API call needed.
Inputs: format, output_path, focus_dir, top_coupled, +1 more.
graph_viewA
Launch a 3D interactive visualization of the project dependency graph. Shows files as colored nodes (by language) connected by import edges. Supports filtering by file type, focusing on a specific file neighborhood, and clicking nodes to inspect file details and open them in VS Code. Requires a prior reindex to build the dependency graph. Opens in VS Code Simple Browser.
Inputs: port.
project_healthA
Aggregated project health check. Runs cycle detection (Tarjan), dead code analysis, coupling hotspots, graph complexity stats, max import depth, and index freshness — returns a global score A–F. Use as a quick diagnostic before any major refactoring. No API call needed.
Inputs: no named parameters.
reindexA
Force incremental reindex of the project codebase. Only re-embeds files that have changed since last index. Use this to initialize the index for the first time. After first indexation, auto-index is enabled for subsequent startups via .stellarisrc. Use force=true after switching embedding providers (deletes the old index automatically).
Inputs: path, enable_auto_index, force.
reindex_fileA
Reindex a single file after it has been modified or created. Much faster than a full reindex — use this in hooks after Write/Edit tool calls to keep the index up-to-date in real time. Requires OPENAI_API_KEY.
Inputs: file (required).
search_codeA
STEP 1 of token-efficient exploration. Semantic search in code (OpenAI embeddings). Returns a lightweight index: file paths, line numbers, short previews — NOT full source. Then: call get_file_outline for file structure, get_file_folded for signatures+JSDoc, and get_symbol ONLY for the specific symbol you need. Never Read whole files after this — you have better tools.
Inputs: query (required), limit, extensions.
search_docsA
Semantic search in documentation and markdown files. Finds relevant documentation sections by natural language query. Returns file paths, section headings, and full content.
Inputs: query (required), limit.
session_briefingA
Condensed project briefing designed for Claude Code SessionStart hook. Returns: graph health summary, cycles, and recent git activity with blast-radius ranking — all under ~800 tokens. Degrades gracefully if no git or no graph. Pairs with nova-mind-cloud searchMemory for complete context priming.
Inputs: days, max_recent_files, format.
simulate_moveA
Simulate moving a file from one path to another. Returns which files need import updates and what the new import strings should be. Use this before any file rename or refactor to get a complete migration plan. Requires a prior reindex. No API call needed.
Inputs: from (required), to (required).
usage_anomaliesA
List Claude Code sessions that hit health thresholds: SES001 cost ≥$25, SES002 ≥200 turns, SES003 ≥5M tokens, SES004 idle 7+ days. No API key required.
Inputs: period.
usage_breakdownA
Show where Claude Code tokens go: task category breakdown (coding, debugging, feature, refactoring, testing, exploration, planning, delegation, git, build_deploy, conversation, brainstorming), MCP server call counts, and core tool usage. Inspired by Codeburn. No API key required.
Inputs: period.
usage_dashboardA
Launch a local web dashboard showing Claude Code token usage with interactive charts. Opens in VS Code Simple Browser. No API key required.
Inputs: port.
usage_statsA
Get Claude Code token usage statistics and estimated API costs. Shows consumption by model, project, or day for a given period. No API key required.
Inputs: period, group_by.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 30 tools
Each tool has a clear, distinct purpose with no overlaps. Dependency analysis tools (get_dependencies, get_dependents, get_most_coupled, etc.) are precisely differentiated, and the token-efficient exploration sequence (search_code -> get_file_outline -> get_file_folded -> get_symbol) is well-structured. Even closely related tools like db_schema and db_search serve different functions.
Most tools follow a verb_noun pattern with snake_case (e.g., get_dependencies, search_code). However, the verb choices vary (get, search, detect, find, simulate) and some names are compound (detect_significant_changes) or use adjectives (get_most_coupled), resulting in minor inconsistency.
With 30 tools, the server significantly exceeds the typical well-scoped range of 3-15. While each tool is justified, the set spans multiple domains (code analysis, database, usage monitoring) that could be split into separate servers. This large surface area may overwhelm agents.
The tool set comprehensively covers code analysis, dependency management, project health, documentation search, database introspection, and usage tracking. All essential operations for these domains are present, with no obvious gaps in the workflow.
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
The context platform for AI agents: code search, team decisions, and grounded project context.
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.91MIT- AlicenseBqualityDmaintenanceProvides IDE-like semantic code retrieval and editing tools for LLMs, enabling precise code understanding and manipulation in large codebases via the Model Context Protocol.25MIT
- AlicenseNot gradedqualityDmaintenanceProvides semantic codebase understanding via a graph, enabling AI agents to search, explore, and plan changes with whole-repo context in a single tool call.33MIT
- AlicenseBqualityDmaintenanceEnables AI agents to index local Python repositories and retrieve code intelligence through semantic search, caller lookups, hybrid context expansion, and visualization.5MIT