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., "@CodeWeaver MCP Serverpackage this codebase into a single markdown document"
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.
CodeWeaver MCP Server
Transform your entire codebase into a single, AI-readable Markdown document through the Model Context Protocol.
English | 简体中文
CodeWeaver MCP Server brings powerful code packaging capabilities to AI assistants like Claude Code. It converts complex project structures into clean, navigable Markdown files - perfect for code reviews, documentation, AI analysis, and sharing with teams.
Why CodeWeaver MCP?
🚀 Seamless AI Integration
Native MCP Protocol: Works out-of-the-box with Claude Code and other MCP-compatible AI assistants
Zero Context Switching: Access codebase packaging directly from your AI workflow
Instant Results: Get Markdown output immediately or save to file
📦 Complete Codebase Visibility
Full Structure Capture: Beautiful tree-view of your entire project hierarchy
All Code Included: Every file's content embedded with proper syntax highlighting
Smart Filtering: Respects
.gitignoreand supports custom ignore patterns
💡 Perfect for Multiple Use Cases
For AI Analysis
Feed entire codebases to AI models (ChatGPT, Claude, etc.)
Enable comprehensive code understanding without manual file sharing
Perfect for code reviews and refactoring discussions
For Documentation
Generate instant project snapshots
Create shareable codebase documentation
Archive project states at key milestones
For Team Collaboration
Share complete project context with teammates
Onboard new developers faster
Facilitate remote code discussions
For Code Reviews
Package pull requests with full context
Review entire features in one document
Track code changes across multiple files
Features
🎯 Pure TypeScript Implementation
No External Dependencies: Built entirely in TypeScript - no Go, Python, or other runtimes required
Fast & Lightweight: Efficient file scanning and processing
Cross-Platform: Works on macOS, Linux, and Windows
🛠️ Powerful Customization
Flexible Filtering: Include/exclude files with glob patterns
Gitignore Support: Automatically respects your
.gitignorerulesCustom Patterns: Add project-specific ignore patterns
Multiple Output Modes: Return content directly or save to file
📝 Smart Markdown Output
Syntax Highlighting: Automatic language detection for 20+ programming languages
Clean Formatting: Professional tree structure using box-drawing characters
Organized Layout: Logical file ordering (directories first, alphabetical)
Relative Paths: Clear file location references
Installation
Prerequisites
Node.js 18 or later
npm or yarn
Quick Install
Add to Claude Code
Or manually add to ~/.claude/config.json:
Usage
Basic Usage
Pack current directory:
Save to File
Include Gitignored Files
Custom Ignore Patterns
Output Format
CodeWeaver generates clean, structured Markdown:
├── src │ ├── index.ts │ └── utils.ts └── package.json
src/utils.ts
Example 2: Code Review Documentation
Example 3: Project Snapshot
API Reference
codeweaver_pack_codebase
Parameters:
Parameter | Type | Required | Default | Description |
| string | ✅ Yes | - | Directory path to pack |
| string | ❌ No | - | Output file path (returns content if omitted) |
| boolean | ❌ No |
| Include files listed in |
| string[] | ❌ No |
| Additional glob patterns to ignore |
Returns:
If
outputspecified: Success message with file path and sizeIf
outputomitted: Complete Markdown content
Error Handling:
"Error: Path does not exist"- Invalid directory path"Error: Path is not a directory"- Path points to a fileBinary files automatically skipped with notice
Development
Build from Source
Development Mode
Clean Build
Why Choose CodeWeaver MCP?
✅ For AI-First Workflows: Built specifically for AI tools, unlike generic file packers ✅ Zero Configuration: Works immediately with sensible defaults ✅ Professional Output: Clean, readable Markdown that humans and AI love ✅ Modern Stack: Pure TypeScript, no legacy dependencies ✅ Active Development: Regularly updated with new features ✅ MIT Licensed: Free for personal and commercial use
Comparison with Alternatives
Feature | CodeWeaver MCP | Command-line tools | VSCode Extensions |
AI Integration | ✅ Native MCP | ❌ Manual copy-paste | ⚠️ Limited |
Zero Config | ✅ Yes | ❌ Complex flags | ✅ Yes |
Cross-Platform | ✅ Yes | ⚠️ Varies | ⚠️ VSCode only |
Real-time Use | ✅ Yes | ❌ No | ⚠️ Limited |
TypeScript Native | ✅ Yes | ❌ Various | ⚠️ Varies |
Contributing
Contributions welcome! Please feel free to submit issues or pull requests.
License
MIT License - see LICENSE file for details
Acknowledgments
Inspired by the original CodeWeaver project and adapted for the Model Context Protocol ecosystem.
Made with ❤️ for the AI development community