strata-mcp
Provides structural AST search, component usage analysis, route topology discovery, and Astro island hydration directive detection across .astro files.
Discovers file-based route topology, nested layouts, dynamic parameters, and API handlers for Inertia.js applications.
Enables AST-based code search, component tree mapping, route topology discovery, and state impact tracing across Next.js applications.
Supports structural search, component adoption audits, route scanning, and state impact analysis for Nuxt 3 apps using Vue SFC-aware AST parsing.
Provides AST-powered structural code search, component hierarchy trees, blast radius analysis, and state store consumption tracing across React/JSX/TSX codebases.
Traces components, layout wrappers, and pages that consume Redux state stores for state impact and dependency analysis.
Click on "Install 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., "@strata-mcpFind all remaining usages of OldButton in the src directory"
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.
strata-mcp
Multi-Framework Frontend Structural AST Search, Component Graph & Intelligence Engine
Precise AST-based structural code searching across Vue SFCs (.vue), Astro components (.astro), and React/Next (.js,.jsx,.ts,.tsx) with exact line-number remapping and persistent SQLite graph caching.
The Problem
Modern frontend development frequently spans Vue/Nuxt, React/Next, and Astro Islands. Developers and AI coding agents need deep structural intelligence (not just text regex) for tasks like:
Component Adoption Audits: "Where is legacy
OldButtonstill used, and which pages haven't migrated toNewButton?"Upward Blast Radius: "If I change
BaseTable.vue, which child components, layouts, and route pages are affected?"Route Topology Mapping: "What routes, layouts, and API handlers exist across Next.js, Nuxt 3, Astro, or Inertia?"
State Impact Tracing: "Which components and pages consume
useCartStoreorThemeContext?"Astro Island Auditing: "Which Vue and React components are embedded in
.astropages, and which ones are hydrated client-side (client:load,client:visible)?"
Existing AST tools like ast-grep are powerful for .js/.jsx/.ts/.tsx, but fail on multi-language documents like .vue and .astro because they treat entire files as HTML, breaking JavaScript/TypeScript AST parsing inside <script> and frontmatter (---) blocks.
Related MCP server: Frontend Code Analysis MCP
How strata-mcp Solves It
.vue / .astro / .tsx file
│
▼
[Document Splitter] ← @vue/compiler-sfc parse() / Astro frontmatter parser
│
├── script / frontmatter block ──► [ast-grep engine] ──► matches (relative coordinates)
│ │
├── template / JSX block ───────► [compiler-dom AST] ─► matches (relative coordinates + directives)
│
▼
[Offset Remapper] ← Remaps block-relative line/col back to original file line numbers
│
▼
[Persistent SQLite Graph] (.strata/graph.db) ← Bun SQLite WAL mode, smart mtime delta sync (<10ms)
│
▼
[MCP / CLI Response] ← Token-efficient summary (file:line:col [client:directive] - snippet)Multi-Language Document Splitting: Separates
<template>,<script>,<script setup>, and Astro frontmatter (---) with 100% offset fidelity.Native JS/TS AST Matching: Runs
ast-grepon script and frontmatter blocks (supporting metavariables like$VAR,$$$, and relational rulesinside,has,not).Advanced Import Recognition: Automatically detects static imports, dynamic/lazy imports (
defineAsyncComponent,React.lazy,next/dynamic), and barrel re-exports (export { default as Component }).Local Alias & Namespace Linking: Tracks aliased imports (
import { X as Y }) and namespace calls (<UI.X />), automatically resolving<Y />in templates back toX.Astro Island Directives: Detects hydration directives (
client:load,client:visible,client:only) and surfaces them directly in search results.Exact Line Remapping: Calculates the exact line and column numbers in the original
.vueor.astrofile.Persistent SQLite Graph Cache: Stores component hierarchies, render boundaries, state dependencies, and routes in
.strata/graph.dbwith sub-millisecond CTE queries.Zero Token Flooding: Outputs concise, line-oriented text by default (JSON optional).
Installation
Bun runtime is required. This package uses bun:sqlite (a Bun built-in) and is compiled with --target bun. It will crash if executed with Node.js, even if npm install succeeds. Always use bun or bunx to run it.
# Recommended: install globally with Bun
bun add -g @dimassetoid/strata-mcp
# Or run directly without installing
bunx @dimassetoid/strata-mcpAfter installing, trust lifecycle scripts for @ast-grep/cli:
bun pm trust @ast-grep/cliMCP Client Configuration
Connect strata-mcp to your favorite AI agent:
Claude Desktop / Claude Code (claude_desktop_config.json)
{
"mcpServers": {
"strata-mcp": {
"command": "bunx",
"args": ["@dimassetoid/strata-mcp"]
}
}
}Cursor (~/.cursor/mcp.json) / VSCode
{
"mcpServers": {
"strata-mcp": {
"command": "bunx",
"args": ["@dimassetoid/strata-mcp"]
}
}
}Available MCP Tools
Tool | Category | Description |
| Code Search | Searches code using |
| Code Search | Searches code using complex YAML rules with relational constraints ( |
| Adoption Audit | Scans component imports in script/frontmatter and tag usages in template/JSX across multi-casing (kebab & Pascal). |
| AST Helper | Dumps the CST syntax tree of a code snippet for AST pattern debugging. |
| Rule Sandbox | Validates a YAML rule against an in-memory code snippet without touching disk (< 20ms). |
| Token Economy | Extracts component interface ( |
| Architecture | Maps downward or upward component hierarchy trees (call graph / blast radius) from a file or route URL ( |
| Architecture | Resolves a URL route path directly to its page entrypoint file, layout wrappers, and downward component tree in 1 step. |
| Dead Code Audit | Two-pass in-memory audit identifying orphan components. Results are partitioned into |
| Routing | Discovers file-based route topology, dynamic parameters, nested layouts, and API handlers (Next.js, Nuxt 3, Astro, Inertia). Supports |
| State Architecture | Traces all components, layout wrappers, and pages consuming a specific state store (Pinia, Zustand, Redux), Context, or composable. |
| Dead Code Audit | Batch scanner detecting composables, stores, hooks, and utility functions with zero external consumers. Uses the SQLite |
High-Performance Architecture & Token Economy
Fast-Path Candidate Pruning (Engine B): Keyword-based file pre-filtering bypasses expensive AST subprocess spawning for non-matching files, dropping search execution times by 97% (from ~1,150ms to < 30ms, and < 2ms for non-existent symbols).
Persistent SQLite Codebase Graph Cache (Engine A): Uses native
bun:sqlitewith WAL mode in.strata/graph.dbto index components, edges, state dependencies, and routes with smartmtimedelta synchronization (< 10ms warm sync) and instant SQL Recursive CTE blast radius queries.Strict Token Economy: Instead of dumping full 1,500-line components into the LLM context window,
extract_component_contractdelivers high-density interface summaries (< 80 tokens), preserving context window limits.Engine Observability Metadata: Every audit result surfaces its execution engine and duration. Text output shows a badge (e.g.
[Engine: in-memory-ast | 32ms]or[Engine: sqlite-graph-cache | 6ms]); JSON output includes a_meta: { engine, durationMs, cached }payload for programmatic inspection.
CLI Companion Usage
You can run strata directly from the terminal without an MCP client:
1. Audit Component Adoption (Vue, React, Astro)
# Find all usages of OldButton across .vue, .astro, and .tsx files
strata find-component-usage OldButton --path ./src
# Output as structured JSON (including clientDirective metadata)
strata find-component-usage OldButton --path ./src --json2. Extract Component Contract (Token-Efficient Interface)
# Extract props, emits, slots, and render boundaries
strata contract ./src/components/ProductCard.vue
# Output as JSON contract
strata contract ./src/components/ProductCard.vue --json3. Visualize Downward Component Hierarchy Tree
# Generate indented call graph tree starting from root view/page
strata tree ./src/views/CatalogView.vue --depth 3
# Trace Upward Blast Radius (consumers up to pages)
strata tree ./src/components/OldButton.vue --direction upward
# Output tree as JSON hierarchy
strata tree ./src/views/CatalogView.vue --depth 3 --json4. Scan File-Based Route Topology (Next.js, Nuxt 3, Astro, Inertia)
# Scan routing topology, dynamic parameters, layouts, and API handlers
strata routes ./src
# Scan with explicit framework hint and JSON output
strata routes . --framework inertia --json
# Aggregate routes by domain/module (useful for projects with 40+ routes)
strata routes ./src --view summary
# Filter routes by path prefix for focused inspection
strata routes ./src --prefix /admin
strata routes ./src --prefix /auth --json5. Query State & Composable Impact (SQLite Graph)
# Trace all components, layout wrappers, and pages consuming a state store or composable
strata impact useForm --path ./resources/js
# Query Pinia or Zustand store consumers
strata impact useCartStore --path ./src6. Workspace Graph Delta Synchronization
# Manually synchronize local SQLite graph cache (.strata/graph.db)
strata sync ./src7. Audit Unused / Dead Components
# Scan project for components with 0 usages (ignoring pages and stories)
strata unused ./src --ignore "**/pages/**,**/*.stories.*"
# Include page files in the dead-code scan (alongside orphan components)
strata unused ./src --include-pages
# Output dead components as JSON (partitioned into orphanComponents + unreferencedPages)
strata unused ./src --json8. Audit Unused State — Composables, Stores & Hooks
# Scan for composables, stores, hooks, and utils with zero external consumers
strata unused-state ./src
# Target a specific directory (e.g. Inertia composables)
strata unused-state ./resources/js/composables
# Output as structured JSON
strata unused-state ./src --json9. Search AST Patterns Across Frameworks
# Search for Vue composables or functions
strata search "const $NAME = ref($$$)" --path ./src
# Search in React/TSX files
strata search "useEffect($$$, $$$)" --path ./src --lang tsx
# Search in Astro frontmatter
strata search "import $$$ from '$$$'" --path ./src10. Test AST Rule in Memory Sandbox
strata rule ./rules/my-rule.yaml --path ./src11. Dump CST Syntax Tree
strata dump "const count = ref(0);" --lang tsReal-World Example: Multi-Framework Adoption Audit
Prompt to your AI Assistant:
"Audit our project for migration from
OldButtontoNewButton. Check all.vue,.astro, and.tsxfiles and list which pages still useOldButton(including dynamic imports and Astro islands) and which ones are already migrated."
The assistant uses find_component_usage and returns:
src/pages/Checkout.vue:4:5 - <OldButton label="Pay Now" />
src/pages/Landing.astro:9:5 [client:visible] - <OldButton client:visible />
src/pages/Dashboard.tsx:3:1 - const OldButton = React.lazy(() => import('./OldButton'))
src/components/Barrel.ts:1:1 - export { default as OldButton } from './OldButton.vue'
src/pages/Migrated.vue:5:5 - <NewButton variant="primary">Migrated</NewButton>License
MIT © 2026. Free for personal and commercial open-source use.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Ground-truth code graph for your codebase: exact callers, callees, symbols & dependencies.
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to understand and navigate codebases through structural analysis. Provides code mapping, symbol search, and impact analysis using ast-grep for accurate parsing of Python, JavaScript, TypeScript, and Go projects.452MIT
- AlicenseNot gradedqualityDmaintenanceAnalyzes frontend project code (React, Vue, Angular) and converts it into AI-understandable flow diagrams and object structures. Provides tools for code analysis, variable/function/component inspection, and project structure insights.22MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to perform high-performance code search and analysis across multiple languages using symbol indexing, regex text search, and structural AST pattern matching. It also provides tools for technology stack detection and dependency analysis with persistent caching for optimized performance.7
- AlicenseNot gradedqualityAmaintenanceEnables AI coding tools to query your live codebase for routes, import graph, domain context, and blast radius, eliminating hallucinations about project structure.10476MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shironim/strata-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server