MCP每日变更日志
一个专业的模型上下文协议(MCP)服务器,用于管理日常变更日志,具有自动格式化、智能监控和客户端就绪输出功能。此工具可帮助开发人员记录他们的工作、跟踪开发活动并生成专业报告。
🚀 特性
- 专业格式化:自动将非正式语言转换为专业客户端就绪格式
- 智能监控:实时跟踪发展活动和对话
- 零摩擦进入:直接输入处理,无需确认提示
- 多种输入法:MCP工具、直接添加脚本和命令行界面
- 报告生成:每日总结和综合报告
- Git集成:从git提交中自动生成更改日志条目
- 部署跟踪:跟踪部署并生成发布说明
- 品类管理:为组织预定义的专业类别
- 标签支持:灵活的标签系统,便于更好地组织
- 清洁建筑:仅使用基本文件优化代码库(最近已清理)
📋 安装
先决条件
- Node.js (版本18或更高)
- npm (附带Node.js)
- 克劳德桌面 (用于MCP集成)
步骤1:克隆和设置
# Clone the repository
git clone https://github.com/yourusername/mcp-daily-change-log.git
cd mcp-daily-change-log
# Install dependencies
npm install步骤2:配置MCP客户端
将此配置添加到MCP客户端配置文件中:
对于Claude Desktop:
- Linux:
~/.config/claude/claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 视窗:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"mcp-daily-change-log": {
"command": "node",
"args": ["enhanced-mcp-server.js"],
"cwd": "/path/to/mcp-daily-change-log",
"env": {}
}
}
}重要:替换 /path/to/mcp-daily-change-log 使用项目目录的实际绝对路径。
步骤3:启动MCP服务器
# Start the MCP server
npm run mcp-server步骤4:重新启动克劳德桌面
- 完全关闭 克劳德桌面
- 等待5秒
- 重启 克劳德桌面
- 检查MCP工具面板是否有绿色状态的“MCP每日变更日志”
🛠 可用命令
MCP工具(在Claude桌面中使用)
1. log_my_work
自动生成并记录最近开发工作的专业摘要。
Use: log_my_work
Optional: customHeader - Custom header for the work summary2. generate_daily_summary
生成所有开发活动的全面日终总结。
Use: generate_daily_summary
Optional: finalize (true/false) - Whether to create final polished summary3. analyze_conversation
分析用户提示和人工智能响应,以跟踪开发进度。
Use: analyze_conversation
Required: userPrompt - User prompt or command
Optional: aiResponse - AI response or output
Optional: codeChanges - Array of code changes made4. get_monitoring_status
获取智能监控系统的当前状态。
Use: get_monitoring_status
Optional: detailed (true/false) - Include detailed activity breakdown5. add_daily_log_entry
手动将专业条目添加到每日更改日志中。
Use: add_daily_log_entry
Required: header - Header/title for the log entry
Required: notes - Notes content
Optional: category - Category from predefined list
Optional: tags - Array of tags for the entry6. view_recent_entries
查看最近的更改日志条目。
Use: view_recent_entries
Optional: days - Number of days to look back (default: 7)直接命令(终端)
直接添加脚本(推荐替代方案)
# Add an entry with all parameters
node direct-add.js "Header" "Notes" "Category" "tag1,tag2"
# Examples:
node direct-add.js "Bug Fix" "Fixed login issue" "Bug Fixes" "auth,frontend"
node direct-add.js "Feature Implementation" "Added user dashboard" "Feature Implementation" "ui,backend"Git集成命令
# Generate changelog from today's git commits
npm run git-log:today
# Generate changelog from the past week's git commits
npm run git-log:week
# Custom git log with specific parameters
npm run git-log -- "3 days ago" "/path/to/repo" "Custom Header" "Category" "tag1,tag2"部署跟踪命令
# Track a new deployment
npm run deploy -- "v1.0.0" "production"
# Track deployment with previous version and custom changes
npm run deploy -- "v1.0.1" "production" "v1.0.0" "." "Fixed login bug" "Added new dashboard"
# List recent deployments
npm run deploy:list
# List deployments for specific environment with limit
npm run deploy:list -- "staging" 5
node direct-add.js "Daily Summary" "Completed all sprint tasks" "Documentation" "summary,completion"MCP服务器管理
# Start MCP server
npm run mcp-server
# Alternative: Start server directly
node enhanced-mcp-server.js📊 可用类别
- 功能实现 -新功能和增强功能
- 漏洞修补 -问题解决和修复
- 文档 -文档更新和创建
- 重构 -代码重构和优化
- 测试 -测试创建和验证
- 开发运维 -部署和基础设施
- UI/UX -用户界面和体验改进
- 演出 -优化和速度改进
- 安全 -安全增强和修复
🎯 用户活动
日常开发工作流程
- 开始新的一天
npm run mcp-server- 正常工作
- 系统会自动跟踪您的开发活动 - 继续编码、测试和开发任务
- 记录你的工作 (多种选择)
选项A:在Claude Desktop中使用MCP工具
Use: log_my_work选项B:使用直接添加脚本
node direct-add.js "Task Header" "Task description" "Category" "tags"- 生成每日摘要
Use: generate_daily_summary专业入门创建
快速入口
node direct-add.js "Client Meeting" "Discussed project requirements" "Documentation" "client,meeting"详细条目
node direct-add.js "Authentication System" "• Implemented JWT authentication\n• Added password reset functionality\n• Created user registration flow" "Feature Implementation" "auth,security,backend"监测与分析
检查系统状态
Use: get_monitoring_status with detailed=true分析对话
Use: analyze_conversation with userPrompt="Implemented new feature" and aiResponse="Feature implemented successfully"查看最近的工作
Use: view_recent_entries with days=7报告生成
每日报告
Use: generate_daily_summary with finalize=true周报
Use: view_recent_entries with days=7📁 文件组织
该工具自动创建和管理:
mcp-daily-change-log/
├── change-notes/ # Daily changelog files
│ ├── 2025-07-15-change-log.md
│ ├── 2025-07-14-change-log.md
│ └── 2025-07-13-change-log.md
├── lib/ # Core libraries
│ ├── dailyLogManager.js # File management & entry creation
│ ├── intelligentMonitor.js # Real-time activity monitoring
│ └── professionalFormatter.js # Professional text formatting
├── enhanced-mcp-server.js # Enhanced MCP server v3.0
├── direct-add.js # Direct entry script (reliable alternative)
├── config.js # Configuration settings
├── package.json # Dependencies & scripts
├── package-lock.json # Dependency lock file
└── README.md # Comprehensive documentation🎨 职业转型
该工具会自动将非正式语言转换为专业格式:
| 随意输入 | 专业输出 |
|---|---|
| “已修复错误” | “已解决功能问题” |
| “开发功能” | “开发功能实现” |
| “经过测试的东西” | “经过验证的系统组件” |
| “客户会议” | “客户沟通会话” |
| “代码审查” | “代码质量评估” |
📝 样本输出
# Daily Progress Report - 2025-07-15
## Executive Summary
This document outlines the development activities and progress made on 2025-07-15.
---
## Feature Implementation
- Developed user authentication module with JWT integration.
- Implemented password reset functionality with email verification.
- Created comprehensive user registration flow with validation.
**Logged at:** 14:30:22
**Tags:** #auth, #security, #backend
## Bug Fixes
- Resolved login timeout issues affecting user sessions.
- Fixed responsive design problems on mobile devices.
**Logged at:** 16:45:10
**Tags:** #frontend, #mobile, #ui🔧 配置
编辑 config.js 自定义:
export default {
// Base directory for change logs
changeLogDir: 'change-notes',
// File format
fileFormat: '{date}-change-log.md',
// Available categories
categories: [
'Feature Implementation',
'Bug Fixes',
'Documentation',
// Add custom categories
],
// Entry template
entryTemplate: '## {header}\n\n{notes}\n\n**Logged at:** {time}\n\n'
};🚨 故障排除
MCP服务器问题
问题:Claude Desktop中“已启用0个工具”
解决方案:
- 验证配置文件的位置和内容
- 确保配置中的绝对路径正确
- 完全重新启动克劳德桌面
- 检查Node.js版本(18+)
问题:服务器无法启动
解决方案:
# Check Node.js version
node --version
# Reinstall dependencies
npm install
# Test server directly
node enhanced-mcp-server.js文件写入问题
问题:条目未出现在文件中
解决方案:
# Use direct-add as reliable alternative
node direct-add.js "Test Entry" "Testing file writing" "Testing" "test"
# Check file permissions
ls -la change-notes/🤝 集成示例
使用开发工作流
# After completing a feature
node direct-add.js "User Dashboard" "Completed user dashboard with analytics" "Feature Implementation" "ui,analytics"
# After fixing bugs
node direct-add.js "Bug Resolution" "Fixed authentication timeout issues" "Bug Fixes" "auth,security"
# Generate changelog from git commits
npm run git-log:today
# Track a deployment
npm run deploy -- "v1.0.0" "production" "" "." "Initial release"
# End of day summary
Use: generate_daily_summary团队协作
# Before standup meeting
Use: view_recent_entries with days=1
# For client updates
Use: generate_daily_summary with finalize=true
# For sprint reviews
Use: view_recent_entries with days=7📈 最佳实践
- 定期记录:在完成任务时记录工作
- 描述性标题:使用清晰、专业的标题
- 正确分类:为组织使用适当的类别
- 有意义的标签:添加相关标签以更好地过滤
- Git集成:使用git日志自动跟踪代码更改
- 部署跟踪:记录所有带有版本信息的部署
- 每日总结:生成用于报告的日终摘要
🔒 安全与隐私
- 本地处理:所有数据均在本地处理
- 无外部请求:未向外部服务发送数据
- 敏感数据保护:自动清除密码/令牌
- 客户端安全输出:适合客户演示的专业格式
📞 支持
对于问题或疑问:
- 检查上面的故障排除部分
- 验证您的安装是否遵循了所有步骤
- 确保所有依赖项都已正确安装
- 使用直接添加脚本作为替代方案进行测试
🔄 Git集成
Git集成功能会根据您的Git提交自动生成更改日志条目。
特性
- 从任何时间范围提取提交(例如,“1天前”、“1周前”)
- 基于传统提交格式按类型分组提交
- 将格式提交到专业变更日志条目中
- 自动将条目添加到每日更改日志中
用法
# Generate changelog from git commits in the last day
npm run git-log:today
# Generate changelog from git commits in the last week
npm run git-log:week
# Custom git log with specific parameters
npm run git-log -- "3 days ago" "/path/to/repo" "Custom Header" "Category" "tag1,tag2"🚀 部署跟踪
部署跟踪功能可帮助您跟踪部署并生成发布说明。
特性
- 跟踪部署到不同环境(生产、暂存等)
- 存储版本信息和更改
- 为每个版本生成发行说明
- 比较版本之间的更改
- 列出部署历史记录
用法
# Track a new deployment
npm run deploy -- "v1.0.0" "production"
# Track deployment with previous version and custom changes
npm run deploy -- "v1.0.1" "production" "v1.0.0" "." "Fixed login bug" "Added new dashboard"
# List recent deployments
npm run deploy:list
# List deployments for specific environment with limit
npm run deploy:list -- "staging" 5发布说明
发布说明会自动生成并保存到 deployments 目录。您可以在以下网址找到它们:
deployments/release-notes-{version}.md🧹 最近的清理(2025-07-15)
代码库最近进行了优化,以提高可维护性:
- 删除了5个冗余文档文件 从
docs/目录 - 消除了重复的README文件 (MCP-README.md合并到主README.md中)
- 已删除示例配置文件 (claude桌面配置.json)
- 精简的文件结构 仅包含基本文件
- 保持100%的功能 同时降低复杂性
- 所有核心功能都经过测试和验证 清理后
该系统现在有一个更干净、更专注的架构,在一个README.md文件中有全面的文档。
📄 许可证
MIT许可证-可根据需要自由使用和修改。
______________________________________________________________________
准备开始专业发展日志! 🚀
