Skip to main content
Glama

@reverse-craft/smart-fs-mcp

MCP (Model Context Protocol) server that exposes smart-fs functionality as AI-accessible tools. Enables AI assistants to read, search, and analyze code with source map support.

Features

  • read_code_smart - Read and beautify code files with source map coordinates

  • search_code_smart - Search in beautified code, returns original positions

  • find_usage_smart - Find variable/function definitions and references

  • apply_custom_transform - Apply Babel plugins for code transformation

Related MCP server: ts-mcp

Installation

npm install @reverse-craft/smart-fs-mcp

Usage

As MCP Server

Add to your MCP configuration (e.g., Claude Desktop, Kiro):

{
  "mcpServers": {
    "smart-fs": {
      "command": "npx",
      "args": ["@reverse-craft/smart-fs-mcp"]
    }
  }
}

Run Directly

npx @reverse-craft/smart-fs-mcp

MCP Tools

read_code_smart

Read and beautify code with optional line range and truncation.

{
  filePath: string;      // Path to file
  startLine?: number;    // Start line (1-based)
  endLine?: number;      // End line (1-based)
  charLimit?: number;    // String truncation length (default: 300)
  maxLineChars?: number; // Max chars per line (default: 500)
}

search_code_smart

Search in beautified code with context lines.

{
  filePath: string;       // Path to file
  query: string;          // Search query
  isRegex?: boolean;      // Use regex matching
  caseSensitive?: boolean;
  contextLines?: number;  // Lines of context (default: 2)
  maxMatches?: number;    // Max results (default: 50)
}

find_usage_smart

Find all definitions and references of an identifier.

{
  filePath: string;       // Path to file
  identifier: string;     // Variable/function name
  targetLine?: number;    // Target line for precise binding
  maxReferences?: number; // Max references (default: 10)
}

apply_custom_transform

Apply Babel plugin transformations.

{
  filePath: string;       // Path to file
  pluginPath: string;     // Path to Babel plugin
  outputPath?: string;    // Output file path
}

Output Format

All tools return formatted output with source map coordinates:

/path/to/file.js (1-20/5000)
Src=original position for breakpoints
    1 L1:0       var _0x1234 = function() {
    2 L1:25        var data = "SGVsbG8=...[TRUNCATED]...";
    3 L1:50078    return decode(data);

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables 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.
      4
      52
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to navigate and edit TypeScript/JavaScript source by named declarations, reading symbols, imports, diagnostics, and replacing code via the TypeScript AST.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI IDEs and assistants to perform AST analysis, map dependency graphs and call chains, run semantic code search, and optionally sync cloud-backed memory — all locally so source code never leaves the machine.
      1
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Enables AI IDEs and coding agents to navigate code at the AST symbol level, perform surgical, collision-free refactoring, and resolve live library documentation. It also supports project onboarding memory, giving agents semantic precision without regex guesswork or heavy dependencies.
      5
      1
      MIT