vibe-coding-mcp 2.12.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/LICENSE +21 -0
  3. package/README.md +205 -291
  4. package/SECURITY.md +65 -0
  5. package/dist/core/mcpServerFactory.d.ts +30 -0
  6. package/dist/core/mcpServerFactory.js +136 -0
  7. package/dist/core/mcpServerFactory.js.map +1 -0
  8. package/dist/core/prompts.d.ts +42 -0
  9. package/dist/core/prompts.js +158 -0
  10. package/dist/core/prompts.js.map +1 -0
  11. package/dist/core/resources.d.ts +47 -0
  12. package/dist/core/resources.js +99 -0
  13. package/dist/core/resources.js.map +1 -0
  14. package/dist/core/toolRegistry.d.ts +55 -0
  15. package/dist/core/toolRegistry.js +185 -0
  16. package/dist/core/toolRegistry.js.map +1 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.js +88 -147
  19. package/dist/index.js.map +1 -1
  20. package/dist/stdio.d.ts +7 -1
  21. package/dist/stdio.js +15 -137
  22. package/dist/stdio.js.map +1 -1
  23. package/package.json +11 -4
  24. package/dist/__tests__/collectCodeContext.test.d.ts +0 -2
  25. package/dist/__tests__/collectCodeContext.test.d.ts.map +0 -1
  26. package/dist/__tests__/collectCodeContext.test.js +0 -139
  27. package/dist/__tests__/collectCodeContext.test.js.map +0 -1
  28. package/dist/__tests__/createSessionLog.test.d.ts +0 -2
  29. package/dist/__tests__/createSessionLog.test.d.ts.map +0 -1
  30. package/dist/__tests__/createSessionLog.test.js +0 -130
  31. package/dist/__tests__/createSessionLog.test.js.map +0 -1
  32. package/dist/__tests__/exportSession.test.d.ts +0 -2
  33. package/dist/__tests__/exportSession.test.d.ts.map +0 -1
  34. package/dist/__tests__/exportSession.test.js +0 -180
  35. package/dist/__tests__/exportSession.test.js.map +0 -1
  36. package/dist/__tests__/generateDevDocument.test.d.ts +0 -2
  37. package/dist/__tests__/generateDevDocument.test.d.ts.map +0 -1
  38. package/dist/__tests__/generateDevDocument.test.js +0 -174
  39. package/dist/__tests__/generateDevDocument.test.js.map +0 -1
  40. package/dist/__tests__/git.test.d.ts +0 -2
  41. package/dist/__tests__/git.test.d.ts.map +0 -1
  42. package/dist/__tests__/git.test.js +0 -282
  43. package/dist/__tests__/git.test.js.map +0 -1
  44. package/dist/__tests__/normalizeForPlatform.test.d.ts +0 -2
  45. package/dist/__tests__/normalizeForPlatform.test.d.ts.map +0 -1
  46. package/dist/__tests__/normalizeForPlatform.test.js +0 -171
  47. package/dist/__tests__/normalizeForPlatform.test.js.map +0 -1
  48. package/dist/__tests__/projectProfile.test.d.ts +0 -2
  49. package/dist/__tests__/projectProfile.test.d.ts.map +0 -1
  50. package/dist/__tests__/projectProfile.test.js +0 -216
  51. package/dist/__tests__/projectProfile.test.js.map +0 -1
  52. package/dist/__tests__/publishDocument.test.d.ts +0 -2
  53. package/dist/__tests__/publishDocument.test.d.ts.map +0 -1
  54. package/dist/__tests__/publishDocument.test.js +0 -93
  55. package/dist/__tests__/publishDocument.test.js.map +0 -1
  56. package/dist/__tests__/sessionHistory.test.d.ts +0 -2
  57. package/dist/__tests__/sessionHistory.test.d.ts.map +0 -1
  58. package/dist/__tests__/sessionHistory.test.js +0 -229
  59. package/dist/__tests__/sessionHistory.test.js.map +0 -1
  60. package/dist/__tests__/summarizeDesignDecisions.test.d.ts +0 -2
  61. package/dist/__tests__/summarizeDesignDecisions.test.d.ts.map +0 -1
  62. package/dist/__tests__/summarizeDesignDecisions.test.js +0 -158
  63. package/dist/__tests__/summarizeDesignDecisions.test.js.map +0 -1
  64. package/dist/core/ai.d.ts.map +0 -1
  65. package/dist/core/cache.d.ts.map +0 -1
  66. package/dist/core/config.d.ts.map +0 -1
  67. package/dist/core/errors.d.ts.map +0 -1
  68. package/dist/core/logger.d.ts.map +0 -1
  69. package/dist/core/profileStorage.d.ts.map +0 -1
  70. package/dist/core/schemas.d.ts.map +0 -1
  71. package/dist/core/security.d.ts.map +0 -1
  72. package/dist/core/sessionStorage.d.ts.map +0 -1
  73. package/dist/index.d.ts.map +0 -1
  74. package/dist/platforms/confluence.d.ts.map +0 -1
  75. package/dist/platforms/discord.d.ts.map +0 -1
  76. package/dist/platforms/github-wiki.d.ts.map +0 -1
  77. package/dist/platforms/notion.d.ts.map +0 -1
  78. package/dist/platforms/obsidian.d.ts.map +0 -1
  79. package/dist/platforms/slack.d.ts.map +0 -1
  80. package/dist/stdio.d.ts.map +0 -1
  81. package/dist/tools/analyzeCode.d.ts.map +0 -1
  82. package/dist/tools/autoTag.d.ts.map +0 -1
  83. package/dist/tools/batch.d.ts.map +0 -1
  84. package/dist/tools/collectCodeContext.d.ts.map +0 -1
  85. package/dist/tools/createSessionLog.d.ts.map +0 -1
  86. package/dist/tools/exportSession.d.ts.map +0 -1
  87. package/dist/tools/generateDevDocument.d.ts.map +0 -1
  88. package/dist/tools/git.d.ts.map +0 -1
  89. package/dist/tools/normalizeForPlatform.d.ts.map +0 -1
  90. package/dist/tools/projectProfile.d.ts.map +0 -1
  91. package/dist/tools/publishDocument.d.ts.map +0 -1
  92. package/dist/tools/sessionHistory.d.ts.map +0 -1
  93. package/dist/tools/sessionStats.d.ts.map +0 -1
  94. package/dist/tools/summarizeDesignDecisions.d.ts.map +0 -1
  95. package/dist/tools/template.d.ts.map +0 -1
  96. package/dist/types/index.d.ts.map +0 -1
  97. package/dist/utils/astParser.d.ts.map +0 -1
  98. package/dist/utils/gitExecutor.d.ts.map +0 -1
  99. package/dist/utils/gitParsers.d.ts.map +0 -1
  100. package/dist/utils/i18n.d.ts.map +0 -1
  101. package/dist/utils/markdown.d.ts.map +0 -1
  102. package/dist/utils/mermaidGenerator.d.ts.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,74 @@
1
+ # Changelog
2
+
3
+ All notable changes to `vibe-coding-mcp` are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versioning follows [SemVer](https://semver.org/spec/v2.0.0.html).
4
+
5
+ ## [Unreleased]
6
+
7
+ - Shared session store (opt-in S3 / Git / WebDAV sync; team mode).
8
+ - Auto-summary by topic across weeks instead of by day.
9
+ - Wider AST language support (Rust / Swift / Kotlin) + diagrams.
10
+ - `vibe-coding://search?q=...` resource for cross-session search.
11
+ - Git `prepare-commit-msg` integration surfacing decision summaries.
12
+
13
+ ## [2.14.0] - 2026-05-20
14
+
15
+ ### Highlights ⭐
16
+ - **HTTP and stdio expose the same surface now.** v2.13.0's "stdio has 15 tools, HTTP has 7" drift is gone — both entry points go through `src/core/mcpServerFactory.ts` and `src/core/toolRegistry.ts`. **15 tools, 3 resources, 3 prompts** everywhere.
17
+ - **One slash command publishes a full daily log.** `/daily-vibe-log` reads `vibe-coding://sessions/list`, composes a session log, offers to publish to Notion / Obsidian / GitHub Wiki — no manual tool chaining required.
18
+ - **`/refactor-context` writes your PR description.** Pulls the design-decision summary out of the captured session and produces a structured "why / what / trade-offs / how to review" PR body, not a paraphrased diff.
19
+ - **Streamable HTTP (MCP 2025-03-26).** `/sse` is retired (HTTP 410 with pointer); `POST /mcp` is the new endpoint.
20
+
21
+ ### Added
22
+ - **MCP Resources (3):**
23
+ - `vibe-coding://sessions/list` — list of captured sessions.
24
+ - `vibe-coding://sessions/{id}` — full session detail (resource template).
25
+ - `vibe-coding://config` — current platform configuration.
26
+ - **MCP Prompts (3):**
27
+ - `daily-vibe-log` — assemble today's captured sessions into a daily log.
28
+ - `document-session` — fetch a session, extract decisions, generate a dev document, optionally publish.
29
+ - `refactor-context` — produce a refactor-ready PR description from a session (decisions + AST + git diff).
30
+ - **Auto-capture hook guide** — [`docs/AUTO_CAPTURE.md`](./docs/AUTO_CAPTURE.md) documents how to wire `PostToolUse` / `Stop` hooks in `~/.claude/settings.json` so Claude Code sessions auto-capture into `muse_session_history`.
31
+ - **+34 tests** covering the tool registry, resources, prompts, and the McpServer factory (149 → 183 passing).
32
+
33
+ ### Changed
34
+ - **Entry-point unification.** `src/index.ts` (HTTP) and `src/stdio.ts` (bin) now both consume a single shared registry (`src/core/toolRegistry.ts`) and the new `src/core/mcpServerFactory.ts`. Same 15 tools / 3 resources / 3 prompts on both transports.
35
+ - **High-level `McpServer` API.** Both entry points moved from low-level `Server + setRequestHandler(CallToolRequestSchema, ...)` to `McpServer.registerTool() / .resource() / .prompt()` (SDK 1.25+).
36
+ - **Transport: SSE → Streamable HTTP.** `src/index.ts` uses `StreamableHTTPServerTransport` at `POST /mcp`. The legacy `/sse` route returns HTTP 410 with a pointer to `/mcp`.
37
+
38
+ ## [2.13.0] - 2026-05-20
39
+
40
+ ### Highlights ⭐
41
+ - **SDK pin tightened to ^1.25.0** (resolves to 1.29.0). Source-compatible — no breaking change.
42
+ - **CI on every push, weekly CodeQL** with `security-and-quality` pack.
43
+ - **`SECURITY.md` published** — this package is the canonical source of `src/core/security.ts` used by the other MCPs in the workspace, so the threat model lives here.
44
+
45
+ ### Added
46
+ - GitHub Actions `ci.yml` running `npm ci`, `npm run typecheck`, `npm run build`, and `npm test` on Node 20 for every push and PR to `main`.
47
+ - GitHub Actions `release.yml` that publishes to npm with provenance when a `v*.*.*` tag is pushed (gated on `NPM_TOKEN`).
48
+ - GitHub Actions `codeql.yml` running the `security-and-quality` query pack weekly and on every push / PR.
49
+ - `SECURITY.md` with threat model, supported versions, reporting process.
50
+ - `npm run typecheck` script (`tsc --noEmit`) for CI use.
51
+
52
+ ### Changed
53
+ - Bump `@modelcontextprotocol/sdk` constraint from `^1.0.0` to `^1.25.0` (resolves to 1.29.0). No source changes required.
54
+ - Tighten the npm `files` whitelist so published tarballs only contain `dist/**/*.{js,d.ts,js.map}` plus `README.md`, `SECURITY.md`, `CHANGELOG.md`, `LICENSE`.
55
+
56
+ ### Known issues (resolved in 2.14.0)
57
+ - The repo still ships **two entry points** with feature drift: `src/index.ts` (SSE transport, 7 tools) vs. `src/stdio.ts` (stdio transport, 15 tools). Full unification is deferred to Phase 3 (2.14.0) to keep this release purely additive.
58
+
59
+ ## [2.12.1] - prior
60
+
61
+ - MCP Registry support.
62
+
63
+ ## [2.12.0] and earlier
64
+
65
+ - Session stats, auto-tag, template, batch tools (v2.9-v2.12).
66
+ - Session export and project profile tools (v2.7).
67
+ - Session history management (v2.6).
68
+ - AI-powered code analysis (v2.5).
69
+ - AI-powered summarization with Claude API.
70
+ - See git history for earlier releases.
71
+
72
+ [Unreleased]: https://github.com/MUSE-CODE-SPACE/vibe-coding-mcp/compare/v2.14.0...HEAD
73
+ [2.14.0]: https://github.com/MUSE-CODE-SPACE/vibe-coding-mcp/compare/v2.13.0...v2.14.0
74
+ [2.13.0]: https://github.com/MUSE-CODE-SPACE/vibe-coding-mcp/compare/v2.12.1...v2.13.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 MUSE-CODE-SPACE / yoon-k
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,322 +1,236 @@
1
- # Vibe Coding Documentation MCP (MUSE)
2
-
3
- MCP server that automatically collects, summarizes, documents, and publishes code and design decisions created during vibe coding sessions.
4
-
5
- ## Features
6
-
7
- This MCP server provides 15 tools for managing vibe coding documentation:
8
-
9
- | Tool | Description |
10
- |------|-------------|
11
- | `muse_collect_code_context` | Collects code blocks and conversation summaries into structured context |
12
- | `muse_summarize_design_decisions` | Extracts key architectural and design decisions from conversation logs |
13
- | `muse_generate_dev_document` | Generates README, DESIGN, TUTORIAL, CHANGELOG, API, or ARCHITECTURE documents |
14
- | `muse_normalize_for_platform` | Converts Markdown documents for Notion, GitHub Wiki, or Obsidian |
15
- | `muse_publish_document` | Publishes generated documents to external platforms |
16
- | `muse_create_session_log` | Creates daily or session-based vibe coding session logs |
17
- | `muse_analyze_code` | AST-based code analysis with Mermaid diagram generation |
18
- | `muse_session_history` | Manages session history - save, retrieve, search past sessions |
19
- | `muse_export_session` | Exports sessions to Markdown, JSON, or HTML formats |
20
- | `muse_project_profile` | Manages project-specific settings and configurations |
21
- | `muse_git` | Git integration - status, log, diff, branch, snapshot, design decision extraction |
22
- | `muse_session_stats` | Session analytics dashboard with productivity insights and trends |
23
- | `muse_auto_tag` | AI-powered auto-tagging for sessions based on content analysis |
24
- | `muse_template` | Custom template management for documents and reports |
25
- | `muse_batch` | Batch operations to execute multiple tools in sequence or parallel |
26
-
27
- ### Additional Features (v2.0)
28
- - **AST Parsing**: TypeScript, Python, Go code analysis
29
- - **Mermaid Diagrams**: Class, Flowchart, Sequence, ER, Architecture diagrams
30
- - **Multi-language**: Korean/English support
31
- - **6 Document Types**: README, DESIGN, TUTORIAL, CHANGELOG, API, ARCHITECTURE
32
- - **6 Platforms**: Notion, GitHub Wiki, Obsidian, Confluence, Slack, Discord
33
-
34
- ### Code Quality (v2.1)
35
- - **Input Validation**: Zod schema-based type-safe validation for all tools
36
- - **Error Handling**: Structured error classes (ToolError, ValidationError, PlatformError)
37
- - **Security**: Command injection prevention (exec → spawn), path sanitization
38
- - **Performance**: LRU cache, regex cache, memoization utilities
39
-
40
- ### Security (v2.2)
41
- - **Path Traversal Prevention**: Validates file paths stay within allowed directories
42
- - **SSRF Protection**: Webhook URL validation for Slack/Discord
43
- - **Network Timeout**: AbortController-based request timeout (30s default)
44
- - **Retry Logic**: Exponential backoff with configurable retry attempts
45
-
46
- ### Enhanced Quality (v2.3)
47
- - **Structured Logging**: JSON-based logging with child loggers per tool
48
- - **Configuration Validation**: Startup validation for all platform configurations
49
- - **Platform Expansion**: Full support for 6 platforms (Notion, GitHub Wiki, Obsidian, Confluence, Slack, Discord)
50
- - **AST Memoization**: Cached code analysis for improved performance
51
- - **Test Coverage**: 149 tests with 85%+ coverage on core modules
52
-
53
- ### AI-Powered Analysis (v2.4)
54
- - **Claude AI Integration**: Use Claude AI for enhanced design decision analysis
55
- - **Smart Summarization**: AI-generated insights and recommendations
56
- - **Fallback Support**: Automatic fallback to pattern-based analysis when AI unavailable
57
- - **Optional Feature**: Enable with `useAI: true` parameter
58
-
59
- ### AI Code Analysis (v2.5)
60
- - **AI-Powered Code Review**: Deep code analysis with quality, security, and performance insights
61
- - **Issue Detection**: Identify potential bugs, security vulnerabilities, and code smells
62
- - **Improvement Suggestions**: AI-generated recommendations for better code
63
- - **Works with AST**: Combines AI insights with AST-based analysis for comprehensive results
64
-
65
- ### Session History (v2.6)
66
- - **Persistent Storage**: Save coding sessions to local JSON files
67
- - **CRUD Operations**: Create, read, update, delete sessions
68
- - **Search & Filter**: Find past sessions by keyword, tags, or date
69
- - **Statistics**: Track total sessions, code contexts, and design decisions
70
-
71
- ### Session Export & Project Profiles (v2.7)
72
- - **Session Export**: Export sessions to Markdown, JSON, or HTML formats
73
- - **Multiple Templates**: Default, minimal, detailed, and report templates
74
- - **Project Profiles**: Manage project-specific settings and configurations
75
- - **Publishing Config**: Default platforms and settings per project
76
- - **Code Analysis Config**: Language preferences and diagram types
77
- - **Documentation Config**: Default document types, language, author info
78
- - **Team Management**: Store team member information per project
79
-
80
- ### Git Integration (v2.8)
81
- - **Repository Status**: View staged, unstaged, and untracked files
82
- - **Commit History**: Browse commit log with filtering by author, date, grep
83
- - **Diff Analysis**: View changes with statistics (staged, unstaged, between refs)
84
- - **Branch Info**: List local and remote branches with tracking info
85
- - **Git Snapshot**: Capture complete repository state for session context
86
- - **Design Decision Extraction**: Auto-extract design decisions from commit messages
87
- - **Session Linking**: Attach Git context to coding sessions
88
-
89
- ### Session Statistics Dashboard (v2.9)
90
- - **Overview Analytics**: Total sessions, code contexts, design decisions at a glance
91
- - **Language Distribution**: Breakdown of programming languages used across sessions
92
- - **Timeline View**: Session activity over time (daily, weekly, monthly)
93
- - **Tag Analytics**: Most used tags and tag co-occurrence analysis
94
- - **Productivity Insights**: Session duration, code output, and efficiency metrics
95
- - **Trend Analysis**: Compare current period with previous or average
96
-
97
- ### AI Auto-tagging (v2.10)
98
- - **Smart Tag Suggestions**: Pattern-based and AI-powered tag recommendations
99
- - **Confidence Scoring**: Each tag suggestion includes confidence level
100
- - **Custom Tag Training**: Train the system with custom tag patterns
101
- - **Configurable Rules**: Define tag rules for file extensions, keywords, patterns
102
- - **Batch Tagging**: Apply tags to multiple sessions at once
103
-
104
- ### Custom Templates (v2.11)
105
- - **Template Management**: Create, edit, delete custom document templates
106
- - **Variable Substitution**: Support for `{{variable}}`, `${variable}`, `{variable}` formats
107
- - **Built-in Templates**: README, Session Summary, Weekly Report templates included
108
- - **Template Preview**: Preview rendered output before applying
109
- - **Import/Export**: Share templates between projects
110
-
111
- ### Batch Operations (v2.12)
112
- - **Sequential Execution**: Run multiple tools in order with dependency management
113
- - **Parallel Execution**: Execute independent operations concurrently
114
- - **Dependency Graph**: Topological sort for operation ordering
115
- - **Job Tracking**: Monitor batch job status, cancel running jobs
116
- - **Error Handling**: Stop on error or continue with remaining operations
117
- - **Result Chaining**: Pass output from one operation to next using `$ref` syntax
118
-
119
- ## Installation
120
-
121
- ### Claude Code (Recommended)
1
+ # vibe-coding-mcp
122
2
 
123
- ```bash
124
- claude mcp add vibe-coding-mcp npx vibe-coding-mcp
125
- ```
126
-
127
- ### npm
128
-
129
- ```bash
130
- npm install -g vibe-coding-mcp
131
- ```
132
-
133
- ### Claude Desktop
134
-
135
- Add to `claude_desktop_config.json`:
136
-
137
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
138
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
139
-
140
- ```json
141
- {
142
- "mcpServers": {
143
- "vibe-coding-mcp": {
144
- "command": "npx",
145
- "args": ["vibe-coding-mcp"]
146
- }
147
- }
148
- }
149
- ```
150
-
151
- ## Environment Variables
152
-
153
- ```env
154
- # Anthropic API (optional, for AI-powered analysis)
155
- ANTHROPIC_API_KEY=your_anthropic_api_key_here
156
-
157
- # Notion API (optional)
158
- NOTION_API_KEY=your_notion_api_key_here
159
- NOTION_DATABASE_ID=your_database_id_here
160
-
161
- # GitHub (optional, for Wiki publishing)
162
- GITHUB_TOKEN=your_github_token_here
163
- GITHUB_REPO=owner/repo
164
-
165
- # Confluence (optional)
166
- CONFLUENCE_BASE_URL=https://your-domain.atlassian.net
167
- CONFLUENCE_USERNAME=your_email@example.com
168
- CONFLUENCE_API_TOKEN=your_api_token_here
169
- CONFLUENCE_SPACE_KEY=YOURSPACE
170
-
171
- # Slack (optional, webhook URL passed via tool parameter)
172
- SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
173
-
174
- # Discord (optional, webhook URL passed via tool parameter)
175
- DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
176
- ```
177
-
178
- ## Demo Scenarios
179
-
180
- ### 1. Generate README and Publish to Notion
181
-
182
- ```
183
- User: Collect the code we wrote today and create a README, then publish to Notion.
184
-
185
- Claude: [Uses collect_code_context → generate_dev_document → normalize_for_platform → publish_document]
186
- ```
187
-
188
- ### 2. Create Design Decision Docs for GitHub Wiki
189
-
190
- ```
191
- User: Summarize our design decisions and publish to GitHub Wiki.
192
-
193
- Claude: [Uses summarize_design_decisions → generate_dev_document → normalize_for_platform → publish_document]
194
- ```
195
-
196
- ### 3. Daily Vibe Coding Log
3
+ > Auto-documents your AI coding sessions — wire it as a Claude Code hook and your daily README / design-decision log / refactor-PR description writes itself.
197
4
 
198
- ```
199
- User: Create a session log for today's work.
200
-
201
- Claude: [Uses collect_code_context → create_session_log]
202
- ```
5
+ [![CI](https://github.com/MUSE-CODE-SPACE/vibe-coding-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/MUSE-CODE-SPACE/vibe-coding-mcp/actions/workflows/ci.yml)
6
+ [![npm](https://img.shields.io/npm/v/vibe-coding-mcp.svg)](https://www.npmjs.com/package/vibe-coding-mcp)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+ ![Maintained](https://img.shields.io/badge/maintained-yes-brightgreen.svg)
203
9
 
204
- ### 4. Git-Aware Session Documentation
205
-
206
- ```
207
- User: Capture my current Git state and create a session with design decisions from commits.
208
-
209
- Claude: [Uses muse_git(action='snapshot') → muse_git(action='extractDecisions') → muse_session_history(action='save')]
210
- ```
10
+ [English](#english) · [한국어](#한국어)
211
11
 
212
- ### 5. Complete Session Export with Git Context
12
+ ---
213
13
 
214
- ```
215
- User: Export all my sessions from this week with Git information.
14
+ <a name="english"></a>
15
+ ## Why vibe-coding?
216
16
 
217
- Claude: [Uses muse_git(action='linkToSession') muse_export_session(format='markdown')]
218
- ```
17
+ You spent four hours pair-programming with Claude. You made three architectural decisions, wrote eight files, and reverted twice. Tomorrow you will not remember why you picked the second option in commit `a1b2c3d` over the first one you tried. Most people solve this with manual journaling that lasts two weeks, or by trawling `git log` after the fact.
219
18
 
220
- ### 6. Session Analytics Dashboard
19
+ vibe-coding-mcp solves it differently: it sits as an MCP server next to your editor, **collects code blocks and design decisions out of the conversation**, generates **README / DESIGN / API / ARCHITECTURE** documents from them, and **publishes to Notion / GitHub Wiki / Obsidian / Confluence / Slack / Discord** — all from inside the chat with Claude. Wire it as a Claude Code `PostToolUse` + `Stop` hook (one block of JSON, see [Quickstart](#5-minute-quickstart)) and every session auto-captures into `~/.vibe-coding-mcp/sessions/` without you typing anything. The bundled `daily-vibe-log` prompt then rolls today's captures into one document.
221
20
 
222
- ```
223
- User: Show me my coding productivity statistics for this month.
21
+ The Phase 3 refactor (v2.14.0, May 2026) collapsed the two-entry-point drift (`index.ts` had 7 tools, `stdio.ts` had 15) into a **single transport-agnostic registry**, so HTTP and stdio now expose the same 15 tools, 3 resources, and 3 prompts.
224
22
 
225
- Claude: [Uses muse_session_stats(action='overview') muse_session_stats(action='productivity') → muse_session_stats(action='trends')]
226
- ```
23
+ ## What's new in v2.14.0
227
24
 
228
- ### 7. Auto-tag and Organize Sessions
25
+ - **One registry, two entry points, zero drift.** `src/core/toolRegistry.ts` is the single source of truth — both `index.ts` (Streamable HTTP) and `stdio.ts` (bin) load the same 15 tools, 3 resources, and 3 prompts.
26
+ - **Migrated to high-level `McpServer` API** (SDK 1.25+). `McpServer.registerTool() / .resource() / .prompt()` instead of low-level `setRequestHandler(CallToolRequestSchema)`. Adding a tool is now a one-line `register()` call.
27
+ - **Streamable HTTP (MCP 2025-03-26), not SSE.** `POST /mcp` at `:3000`. The legacy `/sse` route returns HTTP 410 with a pointer.
28
+ - **3 new MCP Resources for `@-mention`.** `vibe-coding://sessions/list` (captured sessions), `vibe-coding://sessions/{id}` (one session in full), `vibe-coding://config` (current platform creds).
29
+ - **3 new MCP Prompts.** `daily-vibe-log` (roll today's sessions into one doc), `document-session` (one session → README/DESIGN/API/etc. → publish), `refactor-context` (session → PR description with decisions + AST analysis + git diff).
30
+ - **+34 tests** (149 → 183 passing) covering the registry, resources, prompts, and the McpServer factory.
229
31
 
230
- ```
231
- User: Analyze my sessions and suggest relevant tags.
32
+ ## 5-minute Quickstart
232
33
 
233
- Claude: [Uses muse_auto_tag(action='suggest') → muse_auto_tag(action='apply')]
34
+ ```bash
35
+ # 1. Install via Claude Code
36
+ claude mcp add vibe-coding-mcp -- npx -y vibe-coding-mcp
234
37
  ```
235
38
 
236
- ### 8. Generate Custom Report with Template
237
-
238
- ```
239
- User: Create a weekly report using the team report template.
39
+ 2. Wire it as a Claude Code hook so every session auto-captures. Add this to `~/.claude/settings.json`:
240
40
 
241
- Claude: [Uses muse_template(action='apply', templateId='weekly-report') → muse_publish_document]
41
+ ```jsonc
42
+ {
43
+ "mcpServers": {
44
+ "vibe-coding-mcp": {
45
+ "command": "npx",
46
+ "args": ["-y", "vibe-coding-mcp"]
47
+ }
48
+ },
49
+ "hooks": {
50
+ "PostToolUse": [
51
+ {
52
+ "matcher": "Edit|Write|NotebookEdit",
53
+ "hooks": [{
54
+ "type": "command",
55
+ "command": "claude mcp call vibe-coding-mcp muse_session_history '{\"action\":\"save\",\"title\":\"auto-capture\",\"summary\":\"PostToolUse\",\"tags\":[\"auto-capture\"]}' >/dev/null 2>&1 || true"
56
+ }]
57
+ }
58
+ ],
59
+ "Stop": [
60
+ {
61
+ "hooks": [{
62
+ "type": "command",
63
+ "command": "claude mcp call vibe-coding-mcp muse_create_session_log '{\"title\":\"Claude Code session\",\"summary\":\"Stop hook\",\"options\":{\"logType\":\"session\"}}' >/dev/null 2>&1 || true"
64
+ }]
65
+ }
66
+ ]
67
+ }
68
+ }
242
69
  ```
243
70
 
244
- ### 9. Batch Documentation Workflow
245
-
246
- ```
247
- User: Analyze this code, generate docs, and publish to Notion in one go.
71
+ 3. Restart Claude Code. The next time you edit a file in a session, capture starts.
72
+ 4. After a session, try this in Claude:
73
+
74
+ ```
75
+ 오늘 캡처된 세션들 합쳐서 daily vibe log 만들어줘. (use the /daily-vibe-log prompt)
76
+ ```
77
+
78
+ 5. Expected: Claude calls `muse_session_history(action='list', filterTags=['auto-capture'])` to gather today's sessions, then `muse_create_session_log` to compose, then offers to publish to Notion / Obsidian / GitHub Wiki. See [`docs/AUTO_CAPTURE.md`](./docs/AUTO_CAPTURE.md) for hook customization (e.g. piping `git diff --stat` into the capture payload).
79
+
80
+ ## Real use cases
81
+
82
+ ### 1. "I want today's coding session as a daily log without lifting a finger"
83
+ **Problem:** You'll never sit down at the end of the day and write a journal entry. Nobody does.
84
+ **With this MCP:** the `PostToolUse` + `Stop` hooks save sessions automatically into `~/.vibe-coding-mcp/sessions/`. Next morning, run the `/daily-vibe-log` prompt and Claude reads `vibe-coding://sessions/list` for today, compiles a Markdown log (problems, decisions, code blocks, blockers), and offers to publish to Notion.
85
+ **Why it's better than git log or Notion templates:** git log knows *what* you committed, not *why* you picked option B over option A. The session capture preserves the conversation context that the diff doesn't.
86
+
87
+ ### 2. "I need a PR description for a refactor that touched 11 files"
88
+ **Problem:** Writing a good PR description for a refactor takes 15 minutes of re-reading the diff. Most refactor PRs end up with a one-liner and reviewers hate it.
89
+ **With this MCP:** invoke the `/refactor-context` prompt against the session you just finished. The prompt chains `muse_session_history(get)` → `muse_summarize_design_decisions` → `muse_analyze_code` (AST + Mermaid diagram) → `muse_git(diff)` and outputs a structured PR description with: *Why* (decisions), *What changed* (file-by-file from AST), *Trade-offs* (decisions section), and *How to review* (diagram of new architecture).
90
+ **Why it's better than asking Claude to "write a PR description":** the prompt explicitly pulls the **design-decision summary** out of the session, not just the diff — reviewers get the why, not a paraphrased diff.
91
+
92
+ ### 3. "I want my Obsidian vault to fill itself with my design decisions"
93
+ **Problem:** You make architectural decisions during pair-programming and they evaporate. ADR templates require manual discipline you don't have.
94
+ **With this MCP:** call `muse_summarize_design_decisions` over your session, then `muse_publish_document({ platform: 'obsidian', vault: '~/MyVault/decisions' })`. The Obsidian platform writer adds YAML frontmatter (tags, date, session-id back-reference), so the new note shows up correctly in your vault graph view.
95
+ **Why it's better than a `Notes/ADR-template.md`:** the decision text is generated from the actual code+conversation, not from your tired post-session memory. And it works across **6 platforms** (Notion, GitHub Wiki, Obsidian, Confluence, Slack, Discord) with one tool call.
96
+
97
+ ## Tools / Resources / Prompts
98
+
99
+ | Name | Type | What it does |
100
+ |------|------|--------------|
101
+ | `muse_collect_code_context` | tool | Pull code blocks + conversation summary out of a chat into a structured session |
102
+ | `muse_summarize_design_decisions` | tool | Extract architectural / design decisions (problem → options → choice → trade-off) |
103
+ | `muse_analyze_code` | tool | AST analysis (TypeScript / Python / Go) + Mermaid diagrams (Class / Flow / Sequence / ER / Architecture) |
104
+ | `muse_generate_dev_document` | tool | README / DESIGN / TUTORIAL / CHANGELOG / API / ARCHITECTURE generator |
105
+ | `muse_normalize_for_platform` | tool | Markdown normalization for Notion / GitHub Wiki / Obsidian / Confluence / Slack / Discord quirks |
106
+ | `muse_publish_document` | tool | Publish to any of the 6 supported platforms |
107
+ | `muse_create_session_log` | tool | Daily or per-session log composition |
108
+ | `muse_session_history` | tool | `save / get / update / delete / list / search / stats` over `~/.vibe-coding-mcp/sessions/` |
109
+ | `muse_export_session` | tool | Export one session to Markdown / JSON / HTML |
110
+ | `muse_project_profile` | tool | Per-project settings (default platform, default tags, language) |
111
+ | `muse_git` | tool | `status / log / diff / branch / snapshot` + design-decision extraction from commit messages |
112
+ | `muse_session_stats` | tool | Productivity dashboard: sessions/day, decisions/session, language breakdown |
113
+ | `muse_auto_tag` | tool | AI tag suggestions for a session (Claude API, optional) |
114
+ | `muse_template` | tool | Custom doc templates (per project / per output type) |
115
+ | `muse_batch` | tool | Compose multiple tool calls sequentially or in parallel in one round-trip |
116
+ | `vibe-coding://sessions/list` | resource | List of captured sessions (`@-mention`-able) |
117
+ | `vibe-coding://sessions/{id}` | resource | One session's full body, code blocks, decisions, tags |
118
+ | `vibe-coding://config` | resource | Current platform configuration (which integrations are wired) |
119
+ | `prompt://vibe-coding/daily-vibe-log` | prompt | Roll today's captured sessions into one daily log |
120
+ | `prompt://vibe-coding/document-session` | prompt | One session → dev document → publish |
121
+ | `prompt://vibe-coding/refactor-context` | prompt | Session → PR description with decisions + AST + git diff |
122
+
123
+ ## How it works
124
+
125
+ ```
126
+ Claude (or any MCP client)
127
+
128
+ ┌────────────────────────┴────────────────────────┐
129
+ ▼ ▼
130
+ src/index.ts (Streamable HTTP, POST /mcp at :3000) src/stdio.ts (bin)
131
+ │ │
132
+ └────────────────────────┬─────────────────────────┘
133
+
134
+ src/core/mcpServerFactory.ts
135
+
136
+ ┌─────────────────┼─────────────────┐
137
+ ▼ ▼ ▼
138
+ toolRegistry.ts resources.ts prompts.ts
139
+ (15 muse_* tools) (3 resources) (3 prompts)
140
+
141
+
142
+ src/tools/*.ts (15 tool implementations)
143
+
144
+
145
+ src/core/sessionStorage.ts (~/.vibe-coding-mcp/sessions/)
146
+ src/platforms/*.ts (notion / github-wiki / obsidian / ...)
147
+ ```
148
+
149
+ Three design choices that matter:
150
+ 1. **Single registry, two transports.** HTTP and stdio both call `createMcpServer()` from `mcpServerFactory.ts`. There's no "stdio has feature X that HTTP doesn't" — the v2.13.0 drift is closed.
151
+ 2. **Sessions are local files.** `~/.vibe-coding-mcp/sessions/<id>.json` — no remote DB, no telemetry, you own the data. Trivial to back up, grep, or sync via Dropbox.
152
+ 3. **Publishing is per-platform, not one-size-fits-all.** Notion expects blocks, GitHub Wiki expects sidebar markdown, Obsidian expects frontmatter — `muse_normalize_for_platform` handles each one's quirks so `muse_publish_document` can stay a single tool.
153
+
154
+ ## Configuration
155
+
156
+ | Env var | Required for | Default | Purpose |
157
+ |---------|--------------|---------|---------|
158
+ | `ANTHROPIC_API_KEY` | `muse_auto_tag`, AI summarization | — | Optional. Enables Claude-API-powered analysis |
159
+ | `NOTION_API_KEY` + `NOTION_DATABASE_ID` | Notion publishing | — | Notion integration |
160
+ | `GITHUB_TOKEN` + `GITHUB_REPO` | GitHub Wiki publishing | — | Wiki push uses git over HTTPS |
161
+ | `CONFLUENCE_BASE_URL` + `CONFLUENCE_USERNAME` + `CONFLUENCE_API_TOKEN` | Confluence | — | Atlassian Cloud |
162
+ | `SLACK_WEBHOOK_URL` | Slack | — | Webhook URL |
163
+ | `DISCORD_WEBHOOK_URL` | Discord | — | Webhook URL |
164
+ | `PORT` | HTTP mode only | `3000` | Streamable HTTP bind port |
165
+
166
+ All env vars are optional. The MCP boots with zero env vars set — tools that require an integration return a structured `INTEGRATION_NOT_CONFIGURED` error instead of crashing.
167
+
168
+ ## Known limitations
169
+
170
+ - **Capture is hook-driven.** The MCP itself doesn't sniff your editor — it relies on Claude Code calling it (via the `PostToolUse` / `Stop` hooks shown in Quickstart). Without hooks, you have to call `muse_session_history` manually.
171
+ - **No shared session store yet.** Sessions are local. Two laptops = two session histories. Cross-device sync is on the roadmap.
172
+ - **AST analysis covers TS / Python / Go.** Rust, Swift, Kotlin, Ruby AST support is not in v2.x.
173
+ - **Publishing is one-way.** We can write to Notion / Wiki / Obsidian etc. but we don't pull updates back into the session store.
174
+
175
+ ## When NOT to use this
176
+
177
+ - If you want **automatic git commit messages**, use [aicommits](https://github.com/Nutlope/aicommits) or similar — vibe-coding-mcp generates *documents*, not commit messages.
178
+ - If you want **team-wide knowledge base search across everyone's sessions**, this MCP is single-user/local. Build a Notion DB on top and search there, or wait for the shared-store roadmap item.
179
+ - If you want a **manual journaling tool with rich editing**, use Obsidian / Notion directly — this MCP is for the auto-capture-then-publish flow, not for hand-writing notes.
180
+
181
+ ## Comparison
182
+
183
+ | | vibe-coding-mcp | Manual journaling | `git log` | Notion ADR template |
184
+ |---|---|---|---|---|
185
+ | Captures *why* (decisions), not just *what* | yes | yes (if you do it) | no | yes (if you do it) |
186
+ | Survives skipping a day | yes (hooks) | no | n/a | no |
187
+ | Code-block + AST analysis | yes | no | no | no |
188
+ | Auto-publishes to 6 platforms | yes | no | no | Notion only |
189
+ | Local-first session store | yes (`~/.vibe-coding-mcp/`) | varies | local | cloud |
190
+ | Per-platform Markdown quirks handled | yes | no | n/a | n/a |
191
+
192
+ ## Roadmap
193
+
194
+ - **Shared session store.** Opt-in cross-device sync (S3 / Git / WebDAV) and team mode where multiple users can search each other's captured sessions.
195
+ - **Auto-summary by topic.** Group sessions by topic across weeks ("everything I did on the auth refactor in Q2") instead of by day.
196
+ - **Git commit-message integration.** Surface `muse_summarize_design_decisions` output as a prepare-commit-msg suggestion.
197
+ - **Wider AST language support.** Rust + Swift + Kotlin AST + Mermaid diagrams.
198
+ - **Resource for cross-session search.** `vibe-coding://search?q=...` so the LLM can `@-mention` "all sessions about caching" in one go.
199
+
200
+ ## Contributing
201
+
202
+ PRs welcome. Adding a tool is now a single-file change in `src/tools/<name>.ts` + a one-line `register()` in `src/core/toolRegistry.ts`. CI runs `typecheck + build + test` on Node 20 against every PR.
203
+
204
+ Quick contributor loop:
248
205
 
249
- Claude: [Uses muse_batch(action='execute', operations=[
250
- {tool: 'muse_analyze_code', params: {...}},
251
- {tool: 'muse_generate_dev_document', params: {...}, dependsOn: ['op_0']},
252
- {tool: 'muse_publish_document', params: {...}, dependsOn: ['op_1']}
253
- ])]
206
+ ```bash
207
+ git clone https://github.com/MUSE-CODE-SPACE/vibe-coding-mcp
208
+ cd vibe-coding-mcp
209
+ npm install
210
+ npm run typecheck && npm test && npm run build
254
211
  ```
255
212
 
256
- ## Supported Platforms
213
+ ## Security
257
214
 
258
- - **Notion**: Full API integration with page creation
259
- - **GitHub Wiki**: Git-based wiki updates
260
- - **Obsidian**: Local vault file storage with frontmatter support
261
- - **Confluence**: Atlassian Confluence page publishing
262
- - **Slack**: Webhook-based message publishing
263
- - **Discord**: Webhook-based message publishing
215
+ This package validates paths, sanitizes filenames, enforces HTTPS-only + allowlisted hosts for webhook URLs, and wraps outbound HTTP with a timeout + exponential-backoff retry — see [`src/core/security.ts`](./src/core/security.ts). The threat model, supported versions, and vulnerability reporting process are in [`SECURITY.md`](./SECURITY.md). CodeQL with the `security-and-quality` query pack runs on every push and weekly.
264
216
 
265
- ## Project Structure
217
+ **Report vulnerabilities privately** via a GitHub Security Advisory: <https://github.com/MUSE-CODE-SPACE/vibe-coding-mcp/security/advisories/new>.
266
218
 
267
- ```
268
- src/
269
- ├── stdio.ts # MCP server entry point (stdio transport)
270
- ├── index.ts # HTTP/SSE server entry point
271
- ├── core/
272
- │ ├── schemas.ts # Zod validation schemas
273
- │ ├── errors.ts # Structured error classes
274
- │ ├── cache.ts # LRU cache & memoization
275
- │ ├── security.ts # Path traversal, SSRF, timeout utilities
276
- │ ├── logger.ts # Structured JSON logging
277
- │ └── config.ts # Platform configuration validation
278
- ├── tools/ # 15 MCP tools
279
- ├── platforms/ # Notion, GitHub Wiki, Obsidian, Confluence, Slack, Discord
280
- ├── types/ # TypeScript interfaces
281
- └── utils/
282
- ├── markdown.ts # Markdown processing
283
- ├── astParser.ts # AST parsing for TypeScript, Python, Go
284
- ├── diagramGenerator.ts # Mermaid diagram generation
285
- ├── gitExecutor.ts # Safe Git command execution
286
- └── gitParsers.ts # Git output parsing utilities
287
- ```
288
-
289
- ## Development
290
-
291
- ```bash
292
- # Watch mode
293
- npm run dev
294
-
295
- # Build
296
- npm run build
219
+ ## License
297
220
 
298
- # Start (HTTP/SSE mode)
299
- npm start
221
+ MIT SPDX identifier declared in [`package.json`](./package.json) (a top-level `LICENSE` file will be added in the next release).
300
222
 
301
- # Start (stdio mode for Claude Desktop)
302
- npm run stdio
223
+ ## Maintainer
303
224
 
304
- # Run tests
305
- npm test
225
+ [@yoon-k](https://github.com/MUSE-CODE-SPACE) (MUSE-CODE-SPACE). Issues + support: <https://github.com/MUSE-CODE-SPACE/vibe-coding-mcp/issues>.
306
226
 
307
- # Run tests with coverage
308
- npm run test:coverage
309
- ```
227
+ ---
310
228
 
311
- ## Dependencies
229
+ <a name="한국어"></a>
230
+ ## 한국어 요약
312
231
 
313
- | Package | Purpose |
314
- |---------|---------|
315
- | `@modelcontextprotocol/sdk` | MCP server SDK |
316
- | `@notionhq/client` | Notion API integration |
317
- | `zod` | Input validation |
318
- | `typescript` | TypeScript compiler |
232
+ vibe-coding-mcp는 Claude(또는 다른 MCP 클라이언트)와 함께 **AI 페어 코딩 세션을 자동으로 문서화**해 주는 MCP 서버입니다. Claude Code의 `PostToolUse` + `Stop` 훅에 연결하면 매 세션이 `~/.vibe-coding-mcp/sessions/` 에 자동 저장되고, **15개 도구**가 거기서 **README / DESIGN / API / ARCHITECTURE / CHANGELOG / TUTORIAL** 6종 문서를 생성한 뒤 **Notion / GitHub Wiki / Obsidian / Confluence / Slack / Discord** 6개 플랫폼에 발행합니다.
319
233
 
320
- ## License
234
+ v2.14.0(2026-05-20)에서 HTTP/stdio 두 진입점이 **단일 레지스트리** 를 공유하도록 통합되었고, `@-mention` 가능한 **MCP Resources 3개**(`sessions/list`, `sessions/{id}`, `config`)와 **Prompts 3개**(`daily-vibe-log`, `document-session`, `refactor-context`)가 추가되었습니다.
321
235
 
322
- MIT
236
+ 설치 + 자동 캡처 훅 설정은 [`docs/AUTO_CAPTURE.md`](./docs/AUTO_CAPTURE.md) 참고. 변경 이력은 [`CHANGELOG.md`](./CHANGELOG.md), 위협 모델은 [`SECURITY.md`](./SECURITY.md).