codeweaver-mcp
Token-efficient MCP server for multi-language project analysis (Java, TypeScript, JavaScript, Markdown, Python) with plugins, semantic search, and static analysis.
README
CodeWeaver ๐ธ๏ธ
โ ๏ธ Beta Release (v0.6.0) - Static Analysis + Code Cleanup! SpotBugs & Checkstyle integration, all packages updated, codebase fully cleaned. PMD & SonarLint coming soon!
Token-efficient MCP server for Multi-Language project analysis (Java, TypeScript, JavaScript, Markdown, Python)
Weaving Code Intelligence for LLMs - A lightweight Model Context Protocol server that provides token-efficient access to Java, TypeScript, JavaScript, Markdown, and Python files through a multi-agent architecture with language plugins.
โก Highlights
- โ Zero Native Dependencies* - Pure Node.js/TypeScript with language-specific parsers
- โ Dual Interface - CLI tool AND MCP server from same codebase
- โ Token-Efficient - Smart file reading with token limits
- โ
Multi-Language Support ๐ - Java, TypeScript, JavaScript, Markdown, AND Python with unified plugin architecture!
- ๐ฏ Complete Java Support (Java 8-23) - Records, Sealed Classes, Module System
- ๐ฏ Complete TypeScript Support - Classes, Interfaces, Types, Enums, Generics, Decorators
- ๐ฏ Complete JavaScript Support - Modern ES6+, JSX, Arrow Functions, Async/Await
- ๐ฏ Complete Markdown Support - Headers as Sections, Links as References, Code Blocks
- ๐ฏ Complete Python Support ๐ - Classes, Functions, Methods, Decorators, Type Hints, Async/Await
- โ Class-Level Annotations/Decorators - Spring, JPA, Jakarta EE, TypeScript decorators, Python @decorators
- โ Method Parameters - Names, types, and annotations extracted
- โ Generic Type Parameters - Full signature with bounds (Java, TypeScript)
- โ Language Field - Every symbol tagged with source language
- โ Easy Extensibility - Plugin system for adding new languages
- โ Powerful Search - Keyword, pattern, AND semantic search (AI-powered) ๐
- โ
Semantic Code Search - Find code by meaning/intent using LanceDB + Transformers ๐
- โก ONNX Runtime Optimizations - Multi-threading + SIMD for 3x faster embeddings! ๐
- โก 16x faster with Batch-Processing - 10k files in ~10 min (was 8h!)
- ๐ฏ Multi-Collection Support - Separate indexes for Code AND Docs! ๐
- ๐ File Watcher - Automatic incremental updates on file changes! ๐
- ๐ SEMANTIC_SEARCH.md - Comprehensive guide with workflows and best practices
- ๐ฏ MULTI_COLLECTION_GUIDE.md - Multi-collection usage guide (Code + Docs)
- ๐ FILE_WATCHER_GUIDE.md - Keep your index always up-to-date!
- ๐ PERFORMANCE_OPTIMIZATION.md - Future optimizations (GPU acceleration)
- โ Code Quality Analysis - Cyclomatic complexity, LOC metrics, import analysis
- โ
Static Analysis ๐ - SpotBugs (bugs), Checkstyle (style) with plugin architecture!
- ๐ฌ SpotBugs - Finds NullPointerExceptions, Resource Leaks, SQL Injections
- โ Checkstyle - Code style enforcement, naming conventions
- ๐ Plugin Architecture - Easy to add PMD, SonarLint later
- โ Git Integration - Status, diff, blame, log, branches, compare
- โ Test-Driven - 291 tests passing (100%) - All features fully tested! ๐
* Core features (Discovery, Symbols, Search, Analysis, VCS) have zero native dependencies. Semantic Search optionally requires LanceDB + ONNX Runtime (native components).
๐ Quick Start
# Install
npm install
# Build
npm run build
# Use as CLI
npm run dev -- info
npm run dev -- symbols index
npm run dev -- search keyword "CodeWeaver"
npm run dev -- analysis project
# Use as MCP Server
npm run dev -- --mcp
๐ Documentation
๐ Complete Documentation Index - Full navigation of all CodeWeaver documentation
Quick Links:
| Category | Documents | Description |
|---|---|---|
| ๐ Getting Started | QUICKSTART โข WORKFLOW โข PRODUCTION | Installation, tutorials, deployment |
| ๐ Reference | API โข USAGE โข PERFORMANCE | API reference, benchmarks, usage guide |
| ๐ฏ Guides | SEMANTIC SEARCH โข MULTI-COLLECTION โข FILE WATCHER | Advanced feature guides |
| ๐๏ธ Architecture | ARCHITECTURE โข DATA MODELS โข TOKEN MGMT | System design, technical deep-dives |
| ๐จโ๐ป Development | CONTRIBUTING โข TESTING โข ROADMAP | For contributors |
| ๐ฆ Project | CHANGELOG โข CODE OF CONDUCT | Release notes, governance |
| ๐ Other | GLOSSARY | Terms & acronyms |
New to CodeWeaver? Start with QUICKSTART.md (5 minutes) or DEVELOPER_WORKFLOW.md (20 minutes).
๐ฆ Current Features (Phase 1 + 2 + 3 + 4 Complete)
โ Implemented
Agents:
- Project Metadata Agent ๐ - Multi-language project metadata extraction with plugin architecture
- Gradle: Java version, dependencies, plugins, modules
- npm: TypeScript/JavaScript, package manager detection, scripts, workspaces
- Auto-detection: Automatically detects project type(s)
- Unified Schema: Language-agnostic metadata format
- Extensible: Easy to add new build systems (pip, Maven, Cargo, etc.)
- System Check Agent ๐ - Dependency validation and system health checks
- Critical: Node.js (>=18), Git (>=2.0) - required for core features
- Optional: Python (>=3.8), Gradle (>=7.0), Maven (>=3.6)
- Auto-check: Quick startup validation in CLI mode
- Doctor Command: Full system diagnostic with recommendations
- Cache Agent - Content-addressable caching with SHA-256 hashing
- Snippets Agent - Token-efficient file reading with line ranges
- Symbols Agent - Multi-language symbol extraction with plugin architecture ๐
- Java: Classes, Interfaces, Enums, Records, Annotation Types, Sealed Classes, Module System
- TypeScript: Classes, Interfaces, Types, Enums, Functions, Generics, Decorators, Namespaces
- JavaScript: Classes, Functions, Arrow Functions, Async/Await, ES6+ features
- Markdown: Headers as Sections, Local Links as References, Code Blocks
- Python ๐: Classes, Functions, Methods, Decorators, Type Hints, Async/Await
- Methods with parameters, generics, and annotations/decorators
- Fields/Properties with modifiers and visibility
- Constructors, nested types, enum constants
- Language-tagged symbols for easy filtering
- Search Agent - Keyword and pattern search with file filtering
- Analysis Agent - Cyclomatic complexity, LOC metrics, code quality
- VCS Agent - Git operations (status, diff, blame, log, branches, compare)
- Semantic Index Agent - LanceDB vector search with multi-collection support ๐
- File Watcher Agent - Automatic incremental index updates on file changes ๐
- Symbol Storage - In-memory symbol index with JSON Lines persistence
MCP Tools (19 total):
File & Project:
project.meta- Get unified project metadata (auto-detects: Gradle, npm, pip, Maven, etc.)- Multi-language support with plugin architecture
- Optional
projectTypeparameter for specific extraction
file.read- Read file with optional token limit (default: 10000)file.readRange- Read specific line ranges (1-indexed, inclusive)file.readWithNumbers- Read file with line numbers for reference
Symbols:
symbols.index- Index entire project and extract symbolssymbols.find- Find symbols by name (case-insensitive substring)symbols.findByKind- Find symbols by kind (class/method/field/constructor)symbols.get- Get symbol details by qualified name
Search:
search.keyword- Search for keyword in files (grep-like)search.files- Find files by name pattern (glob-like: *.java)
Analysis:
analysis.file- Analyze single file for complexity and metricsanalysis.project- Analyze entire project for statistics
Version Control:
vcs.status- Get Git repository statusvcs.diff- Get diff for file(s)vcs.blame- Get Git blame information for filevcs.log- Get commit historyvcs.branches- Get list of all branchesvcs.compare- Compare two branches
System:
system.check- Check system dependencies (planned for MCP integration)
CLI Commands:
Info & Files:
codeweaver info- Display project informationcodeweaver file read <path> [--limit N] [--numbers]- Read filescodeweaver file range <path> <start> <end>- Read line rangescodeweaver file context <path> <line> [-c N]- Get context around line
Symbols:
codeweaver symbols index- Index project and extract symbolscodeweaver symbols find <name>- Find symbols by namecodeweaver symbols get <qualifiedName>- Get symbol detailscodeweaver symbols list <kind>- List all symbols of a kind
Search:
codeweaver search keyword <keyword> [-i] [-m N] [-c N] [-e .ext]- Keyword searchcodeweaver search files <pattern>- Find files by patterncodeweaver search semantic <query> [--index] [-c collection] [-l N]- Semantic search ๐
Analysis:
codeweaver analysis file <path>- Analyze file complexity and metricscodeweaver analysis project [--top N]- Analyze project statisticscodeweaver analysis complexity <path>- Show complexity breakdown
Version Control:
codeweaver vcs status- Show Git repository statuscodeweaver vcs diff [file]- Show diff for file(s)codeweaver vcs blame <file> [-l <range>]- Show Git blamecodeweaver vcs log [-n N] [--since] [--author]- Show commit historycodeweaver vcs branches- List all branchescodeweaver vcs compare <base> <compare>- Compare two branches
File Watching: ๐
codeweaver watch [--debounce N] [--code-only] [--docs-only]- Watch files and auto-update index
System Check: ๐
codeweaver doctor- Check system dependencies (Node.js, Git, Python, Gradle, Maven)codeweaver doctor --quick- Quick check (only critical dependencies)
Infrastructure:
- Auto-detection (stdio = MCP mode, TTY = CLI mode)
- Progress tracking (JSON Lines format to
.codeweaver/progress.jsonl) - Checkpoint/resume capability
- TypeScript strict mode, ESM modules
- Vitest test framework (73 tests passing)
๐๏ธ Architecture
Multi-Agent System
graph TB
CLI[CLI Interface<br/>7 Command Groups] --> SERVICE[CodeWeaverService]
MCP[MCP Server<br/>19 Tools] --> SERVICE
SERVICE --> DISC[Discovery Agent]
SERVICE --> CACHE[Cache Agent]
SERVICE --> SNIP[Snippets Agent]
SERVICE --> SYM[Symbols Agent]
SERVICE --> SEARCH[Search Agent]
SERVICE --> ANALYSIS[Analysis Agent]
SERVICE --> SEMANTIC[Semantic Index Agent]
SERVICE --> WATCHER[File Watcher Agent]
SERVICE --> VCS[VCS Agent]
SERVICE --> STORE[Symbol Storage]
DISC --> GRADLE[Gradle Parser]
CACHE --> SHA[SHA-256 Hashing]
SNIP --> TOKEN[Token Counter]
SYM --> PLUGINREG[Plugin Registry]
PLUGINREG --> JAVAPLUGIN[Java Plugin<br/>java-parser]
PLUGINREG --> TSPLUGIN[TypeScript Plugin<br/>typescript-estree]
PLUGINREG --> JSPLUGIN[JavaScript Plugin<br/>typescript-estree]
PLUGINREG --> MDPLUGIN[Markdown Plugin<br/>remark]
PLUGINREG --> PYPLUGIN[Python Plugin<br/>tree-sitter WASM]
SEARCH --> REGEX[Regex Matching]
ANALYSIS --> COMPLEXITY[Cyclomatic<br/>Complexity]
SEMANTIC --> LANCEDB[LanceDB<br/>Vector Search]
SEMANTIC --> ONNX[ONNX Runtime<br/>Embeddings]
WATCHER --> CHOKIDAR[Chokidar<br/>File Watching]
WATCHER --> SEMANTIC
VCS --> GIT[Git Operations]
STORE --> JSONL[JSON Lines]
style SERVICE fill:#e1f5ff
style CLI fill:#d4edda
style MCP fill:#fff3cd
style SYM fill:#cfe2ff
style SEARCH fill:#cfe2ff
style ANALYSIS fill:#cfe2ff
style SEMANTIC fill:#fff3cd
style WATCHER fill:#fff3cd
style VCS fill:#cfe2ff
Directory Structure
src/
โโโ index.ts # Main entry (auto-detection)
โโโ cli/
โ โโโ index.ts # CLI entry point
โ โโโ commands/
โ โโโ info.ts # Info command
โ โโโ file.ts # File commands
โ โโโ symbols.ts # Symbols commands (Phase 2)
โ โโโ search.ts # Search commands (Phase 2)
โ โโโ analysis.ts # Analysis commands (Phase 3)
โโโ mcp/
โ โโโ index.ts # MCP entry point
โ โโโ server.ts # MCPServer class
โ โโโ tools.ts # Tool registration (12 tools)
โโโ core/
โ โโโ service.ts # Shared business logic
โ โโโ agents/
โ โ โโโ discovery.ts # Gradle analysis
โ โ โโโ cache.ts # Caching
โ โ โโโ snippets.ts # File reading
โ โ โโโ symbols.ts # Multi-language symbol extraction (Phase 2)
โ โ โโโ search.ts # Keyword/pattern search (Phase 2)
โ โ โโโ analysis.ts # Complexity analysis (Phase 3)
โ โ โโโ semantic.ts # Vector search (Phase 4)
โ โ โโโ vcs.ts # Git operations (Phase 4)
โ โ โโโ watcher.ts # File watching (Phase 4)
โ โโโ language/
โ โ โโโ plugin.ts # LanguagePlugin interface
โ โ โโโ detector.ts # Language detection
โ โ โโโ registry.ts # Plugin registry
โ โ โโโ plugins/
โ โ โโโ java/
โ โ โ โโโ index.ts # JavaLanguagePlugin
โ โ โ โโโ parser.ts # java-parser wrapper
โ โ โ โโโ extractor.ts # Java symbol extraction
โ โ โโโ typescript/
โ โ โโโ index.ts # TypeScript/JavaScriptLanguagePlugin
โ โ โโโ parser.ts # typescript-estree wrapper
โ โ โโโ extractor.ts # TS/JS symbol extraction
โ โโโ storage/
โ โโโ json-symbol-store.ts # Symbol index
โโโ types/
โ โโโ mcp.ts
โ โโโ progress.ts
โ โโโ project.ts
โ โโโ cache.ts
โ โโโ symbols.ts
โ โโโ analysis.ts # Analysis types (Phase 3)
โโโ utils/
โโโ progress-writer.ts # Progress tracking
โโโ mode-detector.ts # CLI vs MCP detection
tests/
โโโ unit/ # 184 passing tests
โ โโโ mcp/server.test.ts # 6 tests
โ โโโ agents/
โ โ โโโ discovery.test.ts # 4 tests
โ โ โโโ cache.test.ts # 5 tests
โ โ โโโ snippets.test.ts # 7 tests
โ โ โโโ symbols.test.ts # 23 tests (Java)
โ โ โโโ search.test.ts # 11 tests
โ โ โโโ analysis.test.ts # 11 tests
โ โ โโโ semantic.test.ts # Tests for semantic search
โ โ โโโ vcs.test.ts # Tests for VCS operations
โ โ โโโ watcher.test.ts # Tests for file watcher
โ โโโ language/
โ โ โโโ detector.test.ts # Language detection tests
โ โ โโโ registry.test.ts # Plugin registry tests
โ โ โโโ java.test.ts # Java plugin tests
โ โ โโโ typescript.test.ts # 21 tests (TypeScript/JavaScript)
โ โโโ storage/
โ โโโ json-symbol-store.test.ts # 5 tests
โโโ integration/ # 12 passing tests
โ โโโ smoke.test.ts # 5 tests
โ โโโ multi-language.test.ts # 12 tests (Multi-Language Integration)
โโโ fixtures/
โโโ gradle-projects/simple/ # Gradle test fixtures
โโโ java/ # Java test files
โโโ typescript/ # TypeScript/JavaScript test files
๐ Usage
As CLI Tool
Project & Files:
# Show project information
codeweaver info
# Read entire file
codeweaver file read src/core/service.ts
# Read file with line numbers
codeweaver file read src/core/service.ts --numbers
# Read file with token limit
codeweaver file read src/core/service.ts --limit 500
# Read specific lines (1-indexed, inclusive)
codeweaver file range src/core/service.ts 10 20
# Get context around line (default: ยฑ5 lines)
codeweaver file context src/core/service.ts 42
codeweaver file context src/core/service.ts 42 --context 10
Symbols (Phase 2):
# Index entire project
codeweaver symbols index
# Find symbols by name (case-insensitive)
codeweaver symbols find "UserService"
codeweaver symbols find "get" # Finds all getXxx methods
# Get specific symbol by qualified name
codeweaver symbols get "com.example.UserService"
codeweaver symbols get "com.example.UserService#findById"
# List all symbols of a kind
codeweaver symbols list class
codeweaver symbols list method
codeweaver symbols list field
Search (Phase 2):
# Search for keyword
codeweaver search keyword "TODO"
codeweaver search keyword "processData"
# Case-insensitive search
codeweaver search keyword "exception" --case-insensitive
codeweaver search keyword "exception" -i
# Search with context lines
codeweaver search keyword "TODO" --context 3 -c 3
# Limit results
codeweaver search keyword "public" --max-results 10 -m 10
# Filter by file extensions
codeweaver search keyword "interface" --extensions .java .ts -e .java -e .ts
# Find files by pattern
codeweaver search files "*.java"
codeweaver search files "*Test.java"
codeweaver search files "User*.ts"
As MCP Server
1. Configure MCP Client
Add to your MCP configuration (e.g., Claude Desktop):
{
"mcpServers": {
"codeweaver": {
"command": "node",
"args": [
"/absolute/path/to/mcp-workbench/dist/index.js",
"--mcp"
],
"cwd": "/path/to/your/java/project"
}
}
}
Or use npm:
{
"mcpServers": {
"codeweaver": {
"command": "npm",
"args": ["run", "dev", "--", "--mcp"],
"cwd": "/absolute/path/to/mcp-workbench"
}
}
}
2. Available MCP Tools (10 total)
Project & Files:
project.meta - Get project metadata
// Input: {} (no parameters)
// Output: ProjectMetadata
{
"name": "my-project",
"version": "1.0.0",
"javaVersion": "21",
"gradleVersion": "8.5",
"modules": [...],
"dependencies": [...],
"plugins": [...]
}
file.read - Read file with token limit
// Input: { filePath: string, maxTokens?: number }
await mcp.call('file.read', {
filePath: 'src/main/java/com/example/App.java',
maxTokens: 5000
});
file.readRange - Read specific lines
// Input: { filePath: string, startLine: number, endLine: number }
await mcp.call('file.readRange', {
filePath: 'src/main/java/com/example/App.java',
startLine: 10,
endLine: 30
});
file.readWithNumbers - Read with line numbers
// Input: { filePath: string }
await mcp.call('file.readWithNumbers', {
filePath: 'src/main/java/com/example/App.java'
});
// Output: " 1: package com.example;\n 2: \n 3: public class App { ... }"
Symbols (Phase 2):
symbols.index - Index entire project
// Input: {} (no parameters)
await mcp.call('symbols.index', {});
// Output: { files: 15, symbols: 234, classes: 12, classList: [...] }
symbols.find - Find symbols by name
// Input: { name: string }
await mcp.call('symbols.find', {
name: 'UserService'
});
// Output: SymbolDefinition[]
symbols.findByKind - Find symbols by kind
// Input: { kind: 'class' | 'method' | 'field' | 'constructor' }
await mcp.call('symbols.findByKind', {
kind: 'method'
});
// Output: SymbolDefinition[]
symbols.get - Get symbol by qualified name
// Input: { qualifiedName: string }
await mcp.call('symbols.get', {
qualifiedName: 'com.example.UserService#findById'
});
// Output: SymbolDefinition
Search (Phase 2):
search.keyword - Search for keyword in files
// Input: { keyword: string, caseSensitive?: boolean, maxResults?: number, contextLines?: number, fileExtensions?: string[] }
await mcp.call('search.keyword', {
keyword: 'TODO',
caseSensitive: false,
maxResults: 50,
contextLines: 2,
fileExtensions: ['.java', '.ts']
});
// Output: SearchResult[] with file, line, column, content, beforeContext, afterContext
search.files - Find files by pattern
// Input: { pattern: string }
await mcp.call('search.files', {
pattern: '*Test.java'
});
// Output: string[] (file paths)
๐งช Testing
# Run all tests
npm test
# Run tests in CI mode (no watch)
npm test -- --run
# Run specific test file
npm test -- tests/unit/agents/snippets.test.ts
Test Coverage:
- โ MCP Server (6 tests)
- โ Discovery Agent (4 tests)
- โ Cache Agent (5 tests)
- โ Snippets Agent (7 tests)
- โ Symbol Storage (5 tests)
- โ Symbols Agent (23 tests - Java)
- โ Language Plugins (21 tests - TypeScript/JavaScript, 13 tests - Markdown)
- โ ๏ธ Python Plugin (18 tests - skipped due to WASM config)
- โ Search Agent (11 tests)
- โ Analysis Agent (11 tests)
- โ Semantic Agent (tests for vector search)
- โ VCS Agent (tests for Git operations)
- โ File Watcher Agent (tests for file watching)
- โ Integration Tests (17 tests: 5 smoke + 12 multi-language)
- Total: 256 passing (100%)
๐ง Development
Prerequisites
- Node.js >= 20.0.0
- TypeScript 5.7+
- Java JDK 21 (for target projects)
- Gradle (optional, wrapper preferred)
Setup
# Clone repository
git clone <repository-url>
cd mcp-workbench
# Install dependencies
npm install
# Build
npm run build
# Development mode (with auto-reload)
npm run build:watch
# Run in dev mode (no build required)
npm run dev
Scripts
npm run build # Compile TypeScript
npm run build:watch # Watch mode
npm run dev # Run with tsx (no build)
npm test # Run tests (watch mode)
npm run lint # ESLint
npm run format # Prettier
npm run clean # Remove dist & cache
npm run validate-links # Validate markdown links ๐
Documentation Tools:
npm run validate-links # Validate internal links (~2s)
npm run validate-links:external # Include external links (~30s)
npm run validate-links:verbose # Detailed output
See LINK_VALIDATION.md for details.
๐ Token Efficiency
CodeWeaver is designed to minimize token usage when providing code context to LLMs:
Strategies
- Line Ranges: Only send requested line ranges, not entire files
- Token Limits: Automatic truncation to configurable limits (default: 10k)
- Smart Truncation: Respects word boundaries when truncating
- Token Counting: Simple heuristic (~4 chars/token) for quick estimates
- Context Windows: Provide minimal context around specific lines
Token Estimation
| Content Type | Typical Size | Tokens (approx) |
|---|---|---|
| Small snippet (20 lines) | ~1 KB | ~250 |
| Medium snippet (80 lines) | ~4 KB | ~1000 |
| Large snippet (200 lines) | ~10 KB | ~2500 |
| Project metadata | ~2 KB | ~500 |
Max Response Size: 10,000 tokens (~40 KB text)
๐บ๏ธ Roadmap
โ Phase 1: Foundation (Complete - 100%)
- โ MCP Server skeleton with tool registration
- โ Progress tracking (JSON Lines)
- โ Discovery Agent (Gradle metadata)
- โ Cache Agent (content-addressable storage)
- โ Symbol Storage (JSON Lines persistence)
- โ Core Service (shared logic)
- โ CLI Interface with commands
- โ MCP Interface with stdio
- โ Build & Test Setup (32 tests passing)
- โ Snippets Agent with token limits
- โ Documentation (complete)
- โ Integration Tests (5 smoke tests)
โ Phase 2: Indexing (Complete - 100%)
- โ Symbols Agent (java-parser, symbol extraction)
- โ Search Agent (keyword + pattern search)
- โ Project-wide indexing (classes, methods, fields, constructors)
- โ Symbol search (by name, kind, qualified name)
- โ File search (glob patterns with * and ?)
- โ Context search (lines before/after matches)
- โ MCP Tools integration (6 new tools)
- โ CLI Commands integration (symbols, search)
- โ Full test coverage (19 new tests)
- โ Documentation update
Note: LanceDB semantic search deferred to later phase as enhancement
โ Phase 3: Analysis (Complete - 100%)
- โ Analysis Agent (complexity & metrics calculation)
- โ Cyclomatic Complexity calculation (if, loops, catch, &&, ||, ?:)
- โ Code Metrics (LOC, SLOC, comments, blank lines)
- โ Import analysis
- โ Method call detection
- โ Project-wide statistics (total complexity, average, top N files)
- โ MCP Tools integration (2 new tools)
- โ CLI Commands integration (analysis)
- โ Full test coverage (11 new tests)
- โ Documentation update
Note: Static analysis tools (SpotBugs, Checkstyle) and Gradle runner deferred
โ Phase 4: VCS Integration (Complete - 100%)
- โ VCS Agent (Git operations)
- โ Repository status (modified, added, deleted, untracked files)
- โ Diff generation (file-level and project-level)
- โ Blame information (line-by-line authorship)
- โ Commit history (with filtering options)
- โ Branch management (list, compare)
- โ MCP Tools integration (6 new tools)
- โ CLI Commands integration (vcs)
- โ Full test coverage (11 new tests)
- โ Documentation update
๐ Phase 5: Orchestration (Planned)
- Orchestrator Agent (DAG-based pipeline)
- Parallel task execution
- Dependency resolution
๐ Troubleshooting
Tests failing?
# Clean and reinstall
npm run clean
rm -rf node_modules package-lock.json
npm install
npm test -- --run
Build errors?
# Check TypeScript version
npx tsc --version # Should be 5.7+
# Rebuild
npm run clean
npm run build
MCP server not responding?
# Check if running in MCP mode
npm run dev -- --mcp
# Verify stdio transport
echo '{}' | npm run dev -- --mcp
CLI not working?
# Ensure TTY mode (not piped)
npm run dev -- info
# Check built binary
node dist/index.js info
๐ Progress Tracking
View live progress during implementation:
# Bash/Git Bash
tail -f .codeweaver/progress.jsonl
# PowerShell
Get-Content .codeweaver\progress.jsonl -Wait
# Read checkpoint
cat .codeweaver/checkpoint.json
๐ค Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Write tests for new features
- Ensure all tests pass:
npm test -- --run - Follow code style (ESLint + Prettier)
- Submit a pull request
Code Style
- TypeScript Strict Mode: All type errors must be resolved
- ESM Modules: Use
.jsextensions in imports - Test-Driven Development: Write tests first
- No Unused Variables: Clean code, no warnings
๐ License
MIT License - see LICENSE
๐ Documentation
Vollstรคndige Dokumentation in docs/
๐บ๏ธ Schnellzugriff
Komplette Navigation: docs/INDEX.md - Vollstรคndiger Dokumentations-Index mit Navigation nach Rolle
Beliebte Dokumente:
- DEVELOPER_WORKFLOW.md - ๐ START HERE! Complete Developer Workflow (All 19 MCP tools in action)
- QUICKSTART.md - โก 5-Minuten Quick-Start Guide
- API.md - ๐ Complete API Reference (alle 19 MCP Tools)
- PERFORMANCE.md - โก Performance Benchmarks & Scalability
- SEMANTIC_SEARCH.md - ๐ฅ Semantic Search Guide mit Workflows
- ARCHITECTURE.md - ๐๏ธ System-Architektur (Dual-Mode, Multi-Agent)
- GLOSSARY.md - ๐ Glossar aller Begriffe & Akronyme
๐ Externe Links
- Model Context Protocol - MCP Specification
๐ฏ Current Status
Alpha Release v0.1.0 โ ๏ธ
โ Working Features:
- MCP Server with 19 tools (project, files, symbols, search, analysis, vcs)
- CLI with 7 command groups (includes watch mode)
- Multi-Language Support - Java, TypeScript, JavaScript, Markdown, Python with plugin architecture
- Semantic Search with ONNX Runtime optimizations
- Multi-Collection Support (Code + Docs)
- File Watcher for automatic index updates
- Symbol Extraction - Complete support for Java, TypeScript, JavaScript, Markdown, and Python
- Code Quality Analysis - Cyclomatic complexity, LOC metrics
- Git Integration - Status, diff, blame, log, branches
- 291 tests passing (100% - all features tested)
โ ๏ธ Known Limitations:
- Performance varies on large codebases (>10k files)
- Semantic search memory usage can be high
- File watcher may miss rapid changes
- Documentation is incomplete
- Breaking changes expected in future releases
๐ฎ Planned Improvements:
Python WASM configurationโ COMPLETED- GPU acceleration for semantic search
- Better error messages
- More language support (Go, Rust, C#, etc.)
- Performance optimizations
- Comprehensive documentation
๐ก Philosophy
CodeWeaver follows these principles:
- Token Efficiency First - Never overwhelm LLMs with entire files
- Zero Native Dependencies - Pure Node.js for portability
- Test-Driven Development - Tests before implementation
- Dual Interface - Same codebase serves CLI and MCP
- Progressive Enhancement - Working foundation, build up from there
Built with โค๏ธ for the LLM-assisted development workflow.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.