npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

auto-doc-sync-mcp

v1.1.1

Published

MCP Server for automatic documentation synchronization - AI context management for any codebase with multi-dev coordination

Readme

Auto-Doc-Sync MCP Server

Tự động đồng bộ documentation cho mọi dự án - Giúp team tránh conflicts và hiểu context codebase ngay lập tức.

🎯 Tính Năng

Documentation Sync

  • Tự động cập nhật CHANGES.md sau mỗi commit
  • Tạo AI Context (CONTEXT.md) với phân loại thay đổi
  • Module docs chi tiết cho từng module
  • Deduplication - Không bị trùng lặp
  • Dependency warnings - Cảnh báo khi cần install packages
  • Multi-language - Hỗ trợ Flutter, Node.js, Python, Ruby, Go
  • AI Prompts - Auto-generate prompts theo tech stack (BE/FE/Mobile)

🆕 Multi-Dev Coordination (NEW!)

  • 🔴 Real-time WIP Tracking - Biết ai đang edit file nào
  • 🛡️ Conflict Detection - Check conflict TRƯỚC khi edit
  • 📡 Remote Sync Checker - Phát hiện thay đổi từ remote chưa pull
  • 👥 Session Management - Quản lý Claude sessions đang active
  • 🧹 Auto Cleanup - Tự động dọn sessions cũ

📖 Chi tiết: Xem MULTI_DEV_COORDINATION.md

📦 Cài Đặt

1. Cài MCP Server

npm install -g auto-doc-sync-mcp

2. Cấu Hình Claude Desktop

Thêm vào ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "auto-doc-sync": {
      "command": "auto-doc-sync-mcp"
    }
  }
}

3. Restart Claude Desktop

Restart Claude Desktop để load MCP server.

🚀 Sử Dụng

Bước 1: Install vào Project

Trong Claude Code, chạy:

User: Install auto-doc-sync vào project này

Claude sẽ tự động:
1. Detect project type (Flutter, Node.js, etc.)
2. Tạo .claude/hooks/auto-doc-sync/auto-doc-sync.js
3. Install git post-commit hook
4. Tạo CHANGES.md, docs/CONTEXT.md, docs/modules/

Bước 2: Test Hook

Tạo một commit bất kỳ:

git add .
git commit -m "test: verify auto-doc-sync"

Hook sẽ tự động chạy và cập nhật:

  • ✅ CHANGES.md
  • ✅ docs/CONTEXT.md
  • ✅ docs/modules/*.md

Bước 3: Sync với Team

Sau khi git pull, chạy:

User: /sync

Claude sẽ hiển thị:
- Recent changes (last 24h)
- Breaking changes
- Active modules
- Dependencies cần update

🛠️ MCP Tools Available

1. install

Cài đặt auto-doc-sync vào project

User: Install auto-doc-sync vào /path/to/project

Parameters:

  • project_path (required): Đường dẫn đến project root
  • auto_detect (optional): Auto-detect project type (default: true)

2. sync

Xem recent changes và team activity

User: Sync project documentation
User: Sync widgets module

Parameters:

  • project_path (required): Project root path
  • module (optional): Module cụ thể để deep dive

3. configure_modules

Cấu hình custom module detection rules

User: Configure modules với rules:
- core-* cho lib/core/*
- widgets cho lib/features/widgets/*

Parameters:

  • project_path (required)
  • module_rules (required): Array of {name, pattern}

4. deduplicate

Dọn dẹp duplicate entries

User: Deduplicate documentation
User: Deduplicate CHANGES.md only

Parameters:

  • project_path (required)
  • target (optional): 'all', 'changes', 'modules' (default: 'all')

5. run_hook

Chạy hook manually (không cần commit)

User: Run auto-doc-sync hook manually

6. check_conflicts 🆕

Kiểm tra conflict trước khi edit file

User: Check conflicts cho file lib/auth/login.dart

Parameters:

  • project_path (required): Project root path
  • file_path (required): File cần check

Checks:

  • WIP conflicts (Claude sessions khác đang edit)
  • Remote changes (file thay đổi trên remote chưa pull)
  • Local uncommitted changes

7. list_sessions 🆕

Xem tất cả Claude sessions đang active

User: List active Claude sessions

Parameters:

  • project_path (required)
  • include_stale (optional): Include sessions inactive >30 phút

8. register_session 🆕

Đăng ký session hiện tại để tracking

User: Register session với description "Implementing auth feature"

Parameters:

  • project_path (required)
  • working_on (optional): Mô tả công việc đang làm

9. cleanup_sessions 🆕

Dọn dẹp sessions cũ/stale

User: Cleanup stale sessions

10. end_session 🆕

Kết thúc session hiện tại

User: End my Claude session

📚 MCP Resources Available

Tự động expose documentation files:

  • CHANGES.md - Global changelog
  • docs/CONTEXT.md - AI context
  • docs/modules/*.md - Module-specific docs

Claude có thể đọc các files này trực tiếp qua MCP resources.

🤖 MCP Prompts Available

Auto-generated prompts theo tech stack của project:

4 prompts tự động customize dựa trên Flutter/Node.js/Python/Ruby/Go:

  1. sync-and-review - Xem changes + recommendations tránh conflicts

    User: Use prompt sync-and-review
  2. onboarding-guide - Tạo hướng dẫn onboarding cho dev mới

    User: Use prompt onboarding-guide
  3. tech-stack-analysis - Best practices cho tech stack hiện tại

    User: Use prompt tech-stack-analysis
  4. module-coordination - Check module nào cần coordinate

    User: Use prompt module-coordination for widgets

Tất cả prompts tự động:

  • ✅ Detect tech stack (Flutter, Node.js, Python, etc.)
  • ✅ Read CONTEXT.md để hiểu current state
  • ✅ Generate language-specific best practices
  • ✅ Output bằng Tiếng Việt cho team

📖 Chi tiết: Xem PROMPTS.md

🎨 Workflow Thực Tế

Kịch Bản 1: Dev Bắt Đầu Làm Feature Mới

1. Dev: git pull
2. Hook tự động update docs
3. Dev: /sync
4. Claude hiển thị:
   - widgets module: 19 commits - High activity
   - Breaking changes: None
   - Dependencies: No updates needed
5. Dev: "Widgets module đang hot, tôi nên hỏi team trước"

Kịch Bản 2: Review Code Sau Pull

1. Dev: git pull origin main
2. Hook update docs
3. Dev: /sync widgets
4. Claude show:
   - Recent changes in widgets module
   - Files affected
   - Who made changes
5. Dev biết chính xác widgets module vừa thay đổi gì

Kịch Bản 3: Dependencies Update

1. Dev A commits pubspec.yaml changes
2. Hook detects dependency update
3. CHANGES.md shows: ⚠️ Dependencies updated - Run: flutter pub get
4. Dev B pulls code
5. Dev B: /sync
6. Claude warns: "Dependencies changed, run flutter pub get"
7. Dev B: flutter pub get

🔧 Supported Project Types

  • Flutter: Detects pubspec.yaml, tracks modules in lib/
  • Node.js: Detects package.json, tracks src/, lib/
  • Python: Detects requirements.txt, tracks modules
  • Ruby: Detects Gemfile
  • Go: Detects go.mod
  • Generic: Works with any Git project

📖 Output Examples

CHANGES.md

# Changes Log

## 2026-01-30

- **2a42b28** by Nguyen Huu Nhan (0 seconds ago)
  📌 Branch: `main`
  feat(docs): improve CONTEXT.md with comprehensive AI context
  📦 Modules: `other`
  Files: auto-doc-sync.js, CONTEXT.md

- **e1ca242** by Nguyen Huu Nhan (1 minute ago)
  📌 Branch: `main`
  test: verify library update detection
  📦 Modules: `other`
  ⚠️  **Dependencies updated** - Run: `flutter pub get`
  Files: pubspec.yaml

docs/CONTEXT.md

# Project Context

**Auto-generated AI Context** - Last updated: 2026-01-30T06:57:10.793Z

## 🎯 Recent Changes Summary (Last 24h)

### ✨ New Features (1)
- **2a42b28**: feat(docs): improve CONTEXT.md with comprehensive AI context
  - Affects: other

## 📊 Module Activity Analysis

### widgets
- **19 commit(s)** in last 24h
- **19 file(s)** changed
- ⚠️  **Updated**: Check [widgets.md](../modules/widgets.md) for latest changes

**Recent changes:**
- update code base (bda0ab7)

**Key files modified:**
- lib/features/widgets/buttons/primary_button.dart
- lib/features/widgets/cards/info_card.dart
- ... and 14 more

## 🤖 AI Context & Recommendations

### What AI Should Know:

1. **Activity Level**: 12 commit(s) in last 24h
2. **Most Active Modules**:
   - `widgets`: 19 commits - **High activity, coordinate before changes**

### Before You Code:
1. Check recent changes in modules you'll modify
2. Coordinate with team on highly active modules

🎯 Benefits

For Developers

  • ✅ Biết ngay module nào đang hot → tránh conflicts
  • ✅ Thấy dependencies updates → không bị build errors
  • ✅ Hiểu context nhanh → onboard dễ dàng

For Teams

  • ✅ Transparency: Ai làm gì, ở đâu
  • ✅ Coordination: Biết module nào cần phối hợp
  • ✅ History: Track changes chi tiết

For AI Assistants

  • ✅ Comprehensive context về codebase state
  • ✅ Breaking changes highlighted
  • ✅ Module dependencies rõ ràng

🐛 Troubleshooting

Hook không chạy sau commit?

# Check git hook exists
ls -la .git/hooks/post-commit

# Make it executable
chmod +x .git/hooks/post-commit

# Test manually
node .claude/hooks/auto-doc-sync/auto-doc-sync.js

Duplicate entries?

User: Deduplicate all documentation

Custom modules không detect?

User: Configure modules với custom rules

📝 License

MIT

🤝 Contributing

PRs welcome! Đây là MCP server được extract từ Construction Project - một hệ thống đã tested và proven to work.

🔗 Links