reposynapse
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., "@reposynapse get project context"
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.
Este paquete está deprecado y ya no recibe actualizaciones.
Por favor usa la versión actualizada y mejorada: reposynapse
reposynapse
Universal MCP server that analyzes any codebase and provides structured context to AI assistants. Dynamic, accurate, and token-efficient.
What's New in v1.8.0
Bug fix: diff-aware 0L — modified files added to hotfiles now show real line counts instead of
0L.section="modified"inget_project_context— dedicated section for git-modified files only (no mixing with oversized).depth=1inread_file_outline— top-level symbols only. Reduces ~450 tokens to ~80 tokens on complex files.Multi-name
search_symbol— search multiple symbols at once:"handleDelete,handleEdit".Fuzzy match indicator in
search_symbol— results now show~ci(case-insensitive),~sub(substring),~fuzzytags. Header shows(fuzzy — no exact match found)when no exact match exists.max_files=-1default limit insearch_in_project— when showing all files,max_resultsdefaults to 5 per file (was 30) to avoid token budget blowup. Override with explicitmax_results.
See CHANGELOG.md for previous versions.
Related MCP server: cctx-mcp
Quick Setup
Automatic (recommended)
npm install -g reposynapse
# Run the interactive setup wizard
reposynapse-setupThe wizard will:
Detect installed AI tools (Claude Desktop, Cursor, Windsurf, VS Code, Cline, Zed, OpenCode, Codex, Antigravity)
Let you select which ones to configure
Safely merge
reposynapseinto their config files (backup created)Show a summary of changes
# Alternative: use the --setup flag
reposynapse --setup
# Check current config status (non-interactive)
reposynapse-setup --statusManual Setup
Claude Desktop / Cursor / Windsurf (claude_desktop_config.json / ~/.cursor/mcp.json):
{
"mcpServers": {
"reposynapse": {
"command": "npx",
"args": ["reposynapse"]
}
}
}VS Code (~/Library/Application Support/Code/User/mcp.json on macOS, %APPDATA%\Code\User\mcp.json on Windows):
{
"servers": {
"reposynapse": {
"type": "stdio",
"command": "npx",
"args": ["reposynapse"]
}
}
}Usage
Tools (12 exposed — optimized for minimal token overhead)
# ─── Project Context ───
get_project_context # Full context (default: compact)
get_project_context { "format": "ultra" } # Ultra-efficient (~165 tokens)
get_project_context { "section": "stack" } # Specific section only
get_project_context { "section": "endpoints" } # Sections: stack|structure|endpoints|models|status|hotfiles|modified|imports|annotations
get_project_context { "section": "modified" } # Git-modified files only (v1.8.0)
get_project_context { "force_refresh": true } # Force re-analysis
# ─── Smart File Reading (v1.5.2) ───
read_file { "file": "src/server.ts" } # Smart: full if <200L, outline if >200L
read_file { "file": "src/server.ts", "start_line": 100, "end_line": 150 } # Range
read_file_outline { "file": "src/server.ts" } # Outline: all symbols + line ranges
read_file_outline { "file": "src/server.ts", "depth": 1 } # Top-level only (~80t vs ~450t) (v1.8.0)
read_file_symbol { "file": "src/server.ts", "symbol": "createServer" } # Fuzzy match
# ─── Search (v1.5.2+) ───
search_in_file { "file": "src/server.ts", "pattern": "TODO" } # In-file search
search_in_file { "file": "src/server.ts", "pattern": "TODO", "context_lines": 3 } # With context
search_in_project { "pattern": "handleRoute" } # 1-line summary: total matches + top 10 hottest files
search_in_project { "pattern": "export", "file_pattern": "*.tsx" } # Filter by glob
search_in_project { "pattern": "TODO", "max_files": 5 } # Code detail for top 5 files (sorted: code before docs)
search_in_project { "pattern": "TODO", "max_files": 5, "context_lines": 2 } # Detail with context (overlapping ranges merged automatically)
search_in_project { "pattern": "TODO", "max_files": 5, "max_results": 10 } # Max 10 matches per file
# max_files=-1 defaults to 5 matches/file to avoid token blowup (v1.8.0) — override with max_results
# grep replacement (v1.6.6) — all files matching glob, grouped + sorted, respects .gitignore
search_in_project { "pattern": "useState", "file_pattern": "*.ts", "max_files": -1 }
search_in_project { "pattern": "invokeLambda", "file_pattern": "*.tsx", "max_files": -1, "context_lines": 2 }
# exclude docs/markdown from results (v1.7.0)
search_in_project { "pattern": "handleRoute", "exclude_pattern": "*.md" }
search_in_project { "pattern": "TODO", "exclude_pattern": "*.md,docs/**", "max_files": 5 }
# ─── Global Symbol Search (v1.7.0+) ───
search_symbol { "name": "createServer" } # Find symbol across project (fuzzy)
search_symbol { "name": "User", "type": "interface" } # Filter by type
search_symbol { "name": "handle", "exported_only": true } # Only exported symbols
search_symbol { "name": "handleDelete,handleEdit" } # Multi-name search (v1.8.0)
# ─── File Listing (v1.5.2) ───
list_files # Project root
list_files { "path": "src", "pattern": "*.ts" } # Filtered
# ─── Annotations ───
annotate { "action": "list" }
annotate { "action": "add", "category": "businessRules", "text": "..." }
annotate { "action": "remove", "category": "gotchas", "index": 0 }
# ─── Diagnostics (v1.6.1) ───
get_diagnostics # Auto-detects language, runs checker, returns ONLY fatal errors
# ─── Docs ───
generate_project_docs # Force regenerate .reposynapse/Resources (Zero Token Cost!)
MCP Resources are automatically available to AI - no tool call needed:
Resource | Description |
| ~50 token summary |
| Complete compact context |
| Languages & frameworks |
| Folders & entry points |
| API endpoints |
| Data models |
| Complex/oversized files |
| Business rules & gotchas |
| Internal dependency graph |
| All file outlines (symbols + lines) |
| Full JSON (programmatic) |
Output Formats
Minimal (~50 tokens)
my-app:typescript+nextjs [src/app/components/lib] entry:src/index.tsUltra (~165 tokens)
my-app|typescript|nextjs
[src:45(⚠page.tsx:1200L) app:20 components:15 lib:8]
→src/index.ts,src/app/page.tsx
API(12):G:/api/users P:/api/auth
M(5):User,Post,Comment
⚠3hot|hub:store/index.ts(←12)|rules:2|gotchas:1
[docs|test:25|docker|ci:github]Compact (~350 tokens) - Default
# my-app (typescript)
A modern web application
Stack: typescript, Next.js, React, pnpm
Deps: next, react, prisma, zod
Structure:
src/ (45) - Source code ⚠page.tsx:1200L
app/ (20) - Next.js app router
components/ (15) - UI components
Entry: src/index.ts, src/app/page.tsx
API (12):
GET /api/users → src/app/api/users/route.ts:5
POST /api/auth → src/app/api/auth/route.ts:10
Models (5):
User (model): id, email, name...
Post (model): id, title, content...
⚠ Hot Files (3):
src/app/page.tsx (1200L) - oversized
src/store/index.ts (800L) - oversized,high-imports
Import hubs: store/index.ts(←12), utils/api.ts(←9)
Orphans: legacy/parser.ts, utils/deprecated.ts
📋 Business Rules:
- Schedules: ≥1min separation
⚠ Gotchas:
- page.tsx: 1200+ lines, read by sections
Status: tests:25 | docker | ci:github | todos:3Zero-Token Auto-Docs (v1.3.0)
On startup, the MCP generates a .reposynapse/ directory with rich markdown docs:
your-project/
├── .reposynapse/
│ ├── ARCHITECTURE.md ← Stack, frameworks, deps, patterns
│ ├── COMPONENTS.md ← Folders, entry points, hot files, endpoints
│ ├── MODELS.md ← All data models with fields
│ ├── IMPORTS.md ← Hub files, orphans, mermaid diagram
│ ├── OUTLINES.md ← All symbols with line ranges (v1.5.0)
│ └── STATUS.md ← TODOs, CI/CD, Docker, annotationsThe AI reads these files naturally — 0 MCP token cost. A file watcher keeps them updated automatically when you change code (5s debounce).
Hot Files Detection (v1.2.0)
Automatically identifies problematic files based on:
Criterion | Threshold | Why it matters |
Lines of code | > 300 | File too large to navigate easily |
Import count | > 15 | High coupling |
Export count | > 20 | Too many responsibilities |
TODO density | > 3 | Concentrated tech debt |
Import Graph (v1.2.0)
Analyzes internal import/require statements to build a dependency map:
Hub files: Most-imported files (core of the system)
Orphan files: Files nobody imports (possible dead code)
Mermaid output: Visual diagram with
get_project_imports { "format": "mermaid" }
Annotations (v1.2.0)
Manage project knowledge via MCP tools — no manual file editing needed:
# Add a business rule
add_annotation { "category": "businessRules", "text": "Orders require payment before shipping" }
# Add a gotcha
add_annotation { "category": "gotchas", "text": "UserService.ts has 2000+ lines, read by sections" }
# List all with indices
list_annotations
# Remove by index
remove_annotation { "category": "gotchas", "index": 0 }Annotations are persisted in .reposynapse-notes.json and included in all context formats.
Smart Caching
In-memory: 30s TTL for repeated calls
Disk cache: 1h TTL with file hash validation
Auto-invalidate: When config files change (package.json, etc.)
The cache file .reposynapse.json is stored in your project root. Add to .gitignore.
Supported Languages
Language | Deps | Endpoints | Models |
TypeScript/JS | package.json | Express, Fastify, Hono, NestJS, Next.js | Interfaces, Types, Classes |
Python | requirements.txt, pyproject.toml | FastAPI, Flask, Django | Pydantic, Dataclasses |
Rust | Cargo.toml | Actix, Axum, Rocket | Structs, Enums |
Go | go.mod | Gin, Echo, Fiber | Structs |
Java/Kotlin | pom.xml, build.gradle | Spring | Classes, Records |
PHP | composer.json | Laravel, Symfony | Classes |
Ruby | Gemfile | Rails, Sinatra | ActiveRecord |
C#/.NET | .csproj | ASP.NET | Classes, Records |
Swift | Package.swift | Vapor | Structs, Classes |
Dart | pubspec.yaml | - | Classes |
Analysis Includes
Tech Stack: Languages, frameworks, dependencies, package manager
Structure: Folders with descriptions, entry points, config files, largest file per folder
API Endpoints: REST routes, GraphQL operations
Data Models: Interfaces, types, schemas, database models
Architecture: MVC, Clean Architecture, Serverless, etc.
Status: TODOs, tests, CI/CD, Docker
Hot Files: Oversized, high-import, TODO-dense files
Import Graph: Hub files, orphan files, dependency map
Annotations: Business rules, gotchas, warnings (managed via MCP)
Environment Variables
Variable | Description | Default |
| Project root override |
|
Contributing
git clone https://github.com/Jul879n/reposynapse
cd reposynapse
npm install
npm run buildAdding Language Support
src/detectors/language.ts- Language detectionsrc/detectors/endpoints.ts- Endpoint patternssrc/detectors/models.ts- Model patterns
Adding Detectors
src/detectors/hotfiles.ts- Hot file thresholdssrc/detectors/imports.ts- Import graph patternssrc/detectors/annotations.ts- Annotation manager
License
MIT
Use less tokens. Know more. Ship faster.
Available Tools
18 toolsadd_importA
Add an import statement to a file. Automatically checks for duplicates and inserts after the last existing import.
Inputs: file (required), import_statement (required).
annotateB
Add/remove/list project annotations (business rules, gotchas, warnings).
Inputs: action (required), text, index, category.
batch_renameA
Rename a symbol (word-boundary match) across all source files in the project. Returns a list of modified files and replacement count.
Inputs: new_name (required), old_name (required), file_pattern.
generate_project_docsA
Regenerate .reposynapse/ docs. Usually automatic.
Inputs: no named parameters.
get_complexityA
List functions/methods above complexity thresholds (too many lines or params). Ultra-compact output to help prioritize what to refactor without reading every file.
Inputs: min_lines, min_params, file_pattern.
get_diagnosticsA
Run project diagnostics and return ONLY fatal errors. Auto-detects language (TypeScript, Rust, Go, Python, .NET, Java, Ruby, Swift, PHP) and runs the appropriate checker. Spelling errors and warnings are filtered out to save tokens.
Inputs: no named parameters.
get_project_contextA
Call FIRST. Returns project context. Use section param for specific info.
Inputs: format, section, force_refresh.
insert_after_symbolB
Insert code immediately after a named function or class. Useful for adding a new method or helper next to a related one.
Inputs: code (required), file (required), symbol (required).
list_filesB
List files/dirs. Respects .gitignore.
Inputs: path, pattern, max_depth.
patch_fileA
Apply a unified diff patch to a file. The AI only sends changed lines, not the full file — saves tokens on large files.
Inputs: file (required), patch (required).
read_fileA
Smart reader. <200L: full content. >200L: outline. Optional line range.
Inputs: file, end_line, file_path, start_line.
read_file_outlineB
File outline: symbols with line ranges (~100 tokens). Use depth=1 for top-level only (~80t vs ~450t on complex files).
Inputs: file, depth, file_path.
read_file_symbolA
Read function/class by name. Fuzzy matching supported.
Inputs: symbol (required), file, file_path.
remove_dead_codeA
Find exported symbols that are never imported by any other file in the project. dry_run=true (default) reports only; dry_run=false deletes them.
Inputs: dry_run, file_pattern.
replace_symbolA
Replace the full body of a named function, class, or interface. The AI sends only the new implementation — no need to read the full file first.
Inputs: file (required), symbol (required), new_body (required).
search_in_fileC
Search pattern in file. Regex supported.
Inputs: pattern (required), file, file_path, max_matches, +1 more.
search_in_projectA
Search across all project files. Default: 1-line compact output — total matches, file count, top 10 hottest files. Use max_files=N for code detail on N files. Use max_files=-1 with file_pattern to get all matching files grouped and sorted (replaces grep).
Inputs: pattern (required), max_files, max_results, file_pattern, +2 more.
search_symbolA
Search for a symbol (function, class, interface, type, const, enum) across project files. Returns file location, type, signature, and exported status. Supports fuzzy matching and regex (e.g. "get.*Context"). Use path_filter to limit search scope. Use context_filter to find symbols by return type or param type.
Inputs: name (required), type, path_filter, context_lines, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
The tool families are mostly distinct: read_file* covers whole-file vs outline vs symbol access, search_* covers file/project/symbol scopes, and editing tools separate patch vs symbol replacement vs insertion. Minor overlap remains between search_in_project and search_symbol for locating definitions, and between patch_file and replace_symbol.
Most tools follow a clear verb_noun or verb_preposition_noun pattern, with consistent families such as read_file_outline/read_file_symbol and search_in_file/search_in_project. Small deviations like annotate, batch_rename, and search_symbol (without in_) do not seriously undermine the convention.
At 18 tools, the surface is slightly above the ideal 3-15 range, but the count is justified by the broad scope: context, annotations, reading, searching, diagnostics, complexity, patching, symbol refactoring, imports, and dead-code removal. A few tools could be consolidated, but none feels redundant enough to be a real problem.
The set covers the full read-edit-refactor workflow, including diagnostics after edits, symbol-aware operations, and dead-code detection. It lacks an explicit arbitrary file create/delete tool and import removal, but patch_file and the existing symbol tools cover most real workflows.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server and CLI tool that transforms codebases into AI-ready context through semantic search, call graph analysis, and incremental indexing. It enables AI assistants to perform hybrid vector and keyword searches to understand complex repository structures and cross-file relationships.3526 npm3MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides structure-aware code analysis (symbol trees, dependencies, docs) to reduce AI agent token consumption by up to 99%, along with Git commit intelligence.MIT
- AlicenseCqualityDmaintenanceAn MCP server that analyzes local or remote GitHub repositories, providing intelligent code context and structure to AI coding assistants.1013MIT
- AlicenseBqualityDmaintenanceInstant codebase knowledge graph MCP server. It auto-detects languages, indexes functions, classes, and call chains, enabling LLMs to navigate code in milliseconds.24MIT