Skip to main content
Glama

RepoMind-MCP

npm version License: MIT

A local Model Context Protocol server that gives AI coding assistants a map of your codebase — file structure, import graph, and "what breaks if I change this file" — without dumping the whole repo into the model's context.

It runs entirely on your machine over stdio. No network calls, no uploading code anywhere.

Quick Start

Add this to your MCP client config (e.g. Claude Desktop's claude_desktop_config.json):

{
  "mcpServers": {
    "repomind-mcp": {
      "command": "npx",
      "args": ["-y", "repomind-mcp"]
    }
  }
}

Restart your client. The assistant can now call the tools below whenever it needs to understand your project's layout instead of guessing.

Related MCP server: mcp-server-ts-analysis

What it actually does

Ask your assistant something like "what would break if I change src/auth.ts?" or "give me an architecture diagram of this project" — it reaches for one of these tools instead of grepping blindly:

Tool

Answers the question...

Key argument

repomind_scan_workspace

"What's in this project?" — file tree, counts, sizes by type

basePath

repomind_get_dependencies

"What does this file import, directly and transitively?"

targetPath

repomind_generate_diagram

"Draw me the architecture" — Mermaid diagram grouped by folder

scopePaths (optional)

repomind_impact_analysis

"What breaks if I change this file?" — reverse dependency BFS

targetPath, depth

All paths are absolute and everything runs against your local filesystem — node_modules, .git, dist, and other build/binary noise is ignored automatically. Supports JavaScript, TypeScript, and Python import resolution.

Under the hood, a single in-memory dependency graph (keyed by file mtime, see src/cache.ts) backs all four tools, so repeated calls on an unchanged workspace are fast.

Also exposed

  • Resource repomind://workspace/graph — the full serialized dependency graph as JSON, for clients that want to inspect it directly rather than calling a tool.

  • Prompts architecture-review and blast-radius-check — pre-built prompt templates that pull in the live file tree / impact analysis so the assistant reviews your actual code, not a hypothetical one.

Local Development

Only needed if you're modifying RepoMind-MCP itself — most users just want the Quick Start above.

npm install
npm run build   # compiles src/ (TypeScript) -> dist/ (ESM)
npm start        # runs the server on stdio

Point your client at the compiled entry point instead of npx:

{
  "mcpServers": {
    "repomind-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/RepoMind-MCP/dist/index.js"]
    }
  }
}

Testing

scratch/test-server.js spins up the built server and drives it through a handful of JSON-RPC tool calls end-to-end:

npm run build && node scratch/test-server.js

License

MIT

Available Tools

4 tools
repomind_generate_diagramB

Generates a beautiful visual Mermaid diagram representing the dependency graph of the files. Can group files by their parent directories into subgraphs.

Inputs: scopePaths, diagramType, workspaceRoot.

repomind_get_dependenciesA

Analyzes imports in JavaScript, TypeScript, and Python files within a target path (file or directory) to build a directed dependency graph showing local module relationships.

Inputs: targetPath (required).

repomind_impact_analysisA

Calculates the downstream blast radius (reverse dependents) of modifying a target file or module, showing exactly which files depend on it directly or indirectly.

Inputs: targetPath (required), depth.

repomind_scan_workspaceA

Recursively scans a workspace directory, mapping its file structure, listing source files, and providing statistics, while ignoring binary/build folders (e.g. node_modules, .git, dist).

Inputs: basePath (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct phase of repository analysis: scanning structure, computing dependencies, generating diagrams, and calculating impact. No overlap or ambiguity exists between them.

    Naming Consistency5/5

    All tools follow the consistent pattern 'repomind_<verb>_<object>' with snake_case throughout. The verb-noun construction is uniform and predictable across the set.

    Tool Count5/5

    Four tools is an ideal size for a focused repository analysis server. Each tool earns its place and there is no bloat or redundancy.

    Completeness5/5

    The tool set forms a complete workflow: scan a workspace, extract dependencies, visualize them, and analyze impact. No obvious gaps exist for the stated purpose of repository analysis.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers