@vibecheckai/cli 3.9.1 → 4.0.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.
- package/README.md +1 -1
- package/bin/runners/context/generators/cursor-enhanced.js +99 -13
- package/mcp-server/.eslintrc.json +24 -0
- package/mcp-server/README.md +425 -135
- package/mcp-server/SPEC.md +583 -0
- package/mcp-server/configs/README.md +172 -0
- package/mcp-server/configs/claude-desktop-pro.json +31 -0
- package/mcp-server/configs/claude-desktop-with-workspace.json +25 -0
- package/mcp-server/configs/claude-desktop.json +19 -0
- package/mcp-server/configs/cursor-mcp.json +21 -0
- package/mcp-server/configs/windsurf-mcp.json +17 -0
- package/mcp-server/mcp-config.example.json +9 -0
- package/mcp-server/package.json +49 -34
- package/mcp-server/src/cli.ts +185 -0
- package/mcp-server/src/index.ts +85 -0
- package/mcp-server/src/server.ts +1933 -0
- package/mcp-server/src/services/cache-service.ts +466 -0
- package/mcp-server/src/services/cli-service.ts +345 -0
- package/mcp-server/src/services/context-manager.ts +717 -0
- package/mcp-server/src/services/firewall-service.ts +662 -0
- package/mcp-server/src/services/git-service.ts +671 -0
- package/mcp-server/src/services/index.ts +52 -0
- package/mcp-server/src/services/prompt-builder-service.ts +1031 -0
- package/mcp-server/src/services/session-service.ts +550 -0
- package/mcp-server/src/services/tier-service.ts +470 -0
- package/mcp-server/src/types.ts +351 -0
- package/mcp-server/tsconfig.json +16 -27
- package/package.json +6 -6
- package/mcp-server/.guardrail/audit/audit.log.jsonl +0 -2
- package/mcp-server/.specs/architecture.mdc +0 -90
- package/mcp-server/.specs/security.mdc +0 -30
- package/mcp-server/HARDENING_SUMMARY.md +0 -299
- package/mcp-server/agent-checkpoint.js +0 -364
- package/mcp-server/agent-firewall-interceptor.js +0 -500
- package/mcp-server/architect-tools.js +0 -707
- package/mcp-server/audit-mcp.js +0 -206
- package/mcp-server/authority-tools.js +0 -569
- package/mcp-server/codebase-architect-tools.js +0 -838
- package/mcp-server/conductor/conflict-resolver.js +0 -588
- package/mcp-server/conductor/execution-planner.js +0 -544
- package/mcp-server/conductor/index.js +0 -377
- package/mcp-server/conductor/lock-manager.js +0 -615
- package/mcp-server/conductor/request-queue.js +0 -550
- package/mcp-server/conductor/session-manager.js +0 -500
- package/mcp-server/conductor/tools.js +0 -510
- package/mcp-server/consolidated-tools.js +0 -1170
- package/mcp-server/deprecation-middleware.js +0 -282
- package/mcp-server/handlers/index.ts +0 -15
- package/mcp-server/handlers/tool-handler.ts +0 -593
- package/mcp-server/hygiene-tools.js +0 -428
- package/mcp-server/index-v1.js +0 -698
- package/mcp-server/index.js +0 -2940
- package/mcp-server/intelligence-tools.js +0 -664
- package/mcp-server/intent-drift-tools.js +0 -873
- package/mcp-server/intent-firewall-interceptor.js +0 -529
- package/mcp-server/lib/api-client.cjs +0 -13
- package/mcp-server/lib/cache-wrapper.cjs +0 -383
- package/mcp-server/lib/error-envelope.js +0 -138
- package/mcp-server/lib/executor.ts +0 -499
- package/mcp-server/lib/index.ts +0 -29
- package/mcp-server/lib/logger.cjs +0 -30
- package/mcp-server/lib/rate-limiter.js +0 -166
- package/mcp-server/lib/sandbox.test.ts +0 -519
- package/mcp-server/lib/sandbox.ts +0 -395
- package/mcp-server/lib/types.ts +0 -267
- package/mcp-server/logger.js +0 -173
- package/mcp-server/manifest.json +0 -473
- package/mcp-server/mdc-generator.js +0 -298
- package/mcp-server/premium-tools.js +0 -1275
- package/mcp-server/proof-tools.js +0 -571
- package/mcp-server/registry/tool-registry.js +0 -586
- package/mcp-server/registry/tools.json +0 -619
- package/mcp-server/registry.test.ts +0 -340
- package/mcp-server/test-mcp.js +0 -108
- package/mcp-server/test-tools.js +0 -36
- package/mcp-server/tests/tier-gating.test.js +0 -297
- package/mcp-server/tier-auth.js +0 -767
- package/mcp-server/tools/index.js +0 -72
- package/mcp-server/tools-reorganized.ts +0 -244
- package/mcp-server/tools-v3.js +0 -1004
- package/mcp-server/truth-context.js +0 -622
- package/mcp-server/truth-firewall-tools.js +0 -2183
- package/mcp-server/vibecheck-2.0-tools.js +0 -761
- package/mcp-server/vibecheck-mcp-server-3.2.0.tgz +0 -0
- package/mcp-server/vibecheck-tools.js +0 -1075
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# VibeCheck MCP Standard Configuration Templates
|
|
2
|
+
|
|
3
|
+
Ready-to-use configuration files for integrating VibeCheck MCP Standard with your AI IDE.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
### Automatic Setup (Recommended)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Install VibeCheck CLI
|
|
11
|
+
npm install -g @vibecheckai/cli
|
|
12
|
+
|
|
13
|
+
# Auto-configure for your IDE
|
|
14
|
+
vibecheck mcp install
|
|
15
|
+
|
|
16
|
+
# Or configure specifically for Cursor
|
|
17
|
+
vibecheck mcp cursor
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Manual Setup
|
|
21
|
+
|
|
22
|
+
Copy the appropriate configuration file to your IDE's config directory.
|
|
23
|
+
|
|
24
|
+
## Configuration Files
|
|
25
|
+
|
|
26
|
+
### Claude Desktop
|
|
27
|
+
|
|
28
|
+
| File | Description |
|
|
29
|
+
|------|-------------|
|
|
30
|
+
| `claude-desktop.json` | Basic configuration |
|
|
31
|
+
| `claude-desktop-with-workspace.json` | With specific project path |
|
|
32
|
+
| `claude-desktop-pro.json` | PRO features with API key |
|
|
33
|
+
|
|
34
|
+
**Config Location:**
|
|
35
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
36
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
37
|
+
- Linux: `~/.config/claude/claude_desktop_config.json`
|
|
38
|
+
|
|
39
|
+
### Cursor IDE
|
|
40
|
+
|
|
41
|
+
| File | Description |
|
|
42
|
+
|------|-------------|
|
|
43
|
+
| `cursor-mcp.json` | Standard configuration |
|
|
44
|
+
|
|
45
|
+
**Config Locations:**
|
|
46
|
+
- Project-level: `.cursor/mcp.json` (in your project root)
|
|
47
|
+
- Global (macOS): `~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/mcp.json`
|
|
48
|
+
- Global (Windows): `%APPDATA%\Cursor\User\globalStorage\cursor.mcp\mcp.json`
|
|
49
|
+
|
|
50
|
+
### Windsurf
|
|
51
|
+
|
|
52
|
+
| File | Description |
|
|
53
|
+
|------|-------------|
|
|
54
|
+
| `windsurf-mcp.json` | Standard configuration |
|
|
55
|
+
|
|
56
|
+
**Config Location:**
|
|
57
|
+
- macOS: `~/Library/Application Support/Windsurf/mcp.json`
|
|
58
|
+
- Windows: `%APPDATA%\Windsurf\mcp.json`
|
|
59
|
+
|
|
60
|
+
## Configuration Options
|
|
61
|
+
|
|
62
|
+
### Basic Configuration
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"mcpServers": {
|
|
67
|
+
"vibecheck": {
|
|
68
|
+
"command": "npx",
|
|
69
|
+
"args": ["-y", "@vibecheck/mcp-standard"]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### With Workspace Path
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"mcpServers": {
|
|
80
|
+
"vibecheck": {
|
|
81
|
+
"command": "npx",
|
|
82
|
+
"args": [
|
|
83
|
+
"-y",
|
|
84
|
+
"@vibecheck/mcp-standard",
|
|
85
|
+
"--workspace",
|
|
86
|
+
"/path/to/project"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### With Firewall Mode
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"mcpServers": {
|
|
98
|
+
"vibecheck": {
|
|
99
|
+
"command": "npx",
|
|
100
|
+
"args": [
|
|
101
|
+
"-y",
|
|
102
|
+
"@vibecheck/mcp-standard",
|
|
103
|
+
"--firewall-mode",
|
|
104
|
+
"enforce"
|
|
105
|
+
],
|
|
106
|
+
"env": {
|
|
107
|
+
"VIBECHECK_API_KEY": "vck_..."
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Firewall Modes
|
|
115
|
+
|
|
116
|
+
| Mode | Tier | Description |
|
|
117
|
+
|------|------|-------------|
|
|
118
|
+
| `off` | FREE | No enforcement |
|
|
119
|
+
| `observe` | FREE | Log actions, warn on violations |
|
|
120
|
+
| `enforce` | PRO | Block actions that violate intent |
|
|
121
|
+
|
|
122
|
+
## Environment Variables
|
|
123
|
+
|
|
124
|
+
| Variable | Description |
|
|
125
|
+
|----------|-------------|
|
|
126
|
+
| `VIBECHECK_API_KEY` | Your VibeCheck API key |
|
|
127
|
+
| `VIBECHECK_WORKSPACE` | Override workspace path |
|
|
128
|
+
| `VIBECHECK_LOG_LEVEL` | Log level (debug, info, warn, error) |
|
|
129
|
+
|
|
130
|
+
## Verification
|
|
131
|
+
|
|
132
|
+
After configuration, verify the setup:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Check MCP status
|
|
136
|
+
vibecheck mcp status
|
|
137
|
+
|
|
138
|
+
# Test MCP connection
|
|
139
|
+
vibecheck mcp test
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Troubleshooting
|
|
143
|
+
|
|
144
|
+
### MCP not showing in IDE
|
|
145
|
+
|
|
146
|
+
1. Restart your IDE after configuration
|
|
147
|
+
2. Check that npx is in your PATH
|
|
148
|
+
3. Verify the config file location
|
|
149
|
+
|
|
150
|
+
### Permission errors
|
|
151
|
+
|
|
152
|
+
Ensure the config directory exists:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# macOS/Linux
|
|
156
|
+
mkdir -p ~/.config/claude
|
|
157
|
+
|
|
158
|
+
# Windows (PowerShell)
|
|
159
|
+
mkdir -Force "$env:APPDATA\Claude"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### API key issues
|
|
163
|
+
|
|
164
|
+
1. Get your API key from https://vibecheckai.dev/settings/api-keys
|
|
165
|
+
2. Add it to the `env` section of your config
|
|
166
|
+
3. Never commit API keys to version control
|
|
167
|
+
|
|
168
|
+
## Support
|
|
169
|
+
|
|
170
|
+
- Documentation: https://vibecheckai.dev/docs/mcp
|
|
171
|
+
- Issues: https://github.com/guardiavault-oss/VIBEYCHECK/issues
|
|
172
|
+
- Discord: https://discord.gg/vibecheck
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/anthropics/claude-desktop/main/config-schema.json",
|
|
3
|
+
"_comment": "Claude Desktop MCP Configuration for VibeCheck PRO",
|
|
4
|
+
"_instructions": [
|
|
5
|
+
"This configuration enables VibeCheck PRO features including:",
|
|
6
|
+
" - Agent Firewall in enforce mode",
|
|
7
|
+
" - Intent verification",
|
|
8
|
+
" - Claim verification",
|
|
9
|
+
" - Ship checks",
|
|
10
|
+
"",
|
|
11
|
+
"Replace YOUR_API_KEY with your VibeCheck API key.",
|
|
12
|
+
"Get your API key at: https://vibecheckai.dev/settings/api-keys",
|
|
13
|
+
"",
|
|
14
|
+
"Copy to your Claude Desktop config directory:",
|
|
15
|
+
" macOS: ~/Library/Application Support/Claude/claude_desktop_config.json"
|
|
16
|
+
],
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"vibecheck": {
|
|
19
|
+
"command": "npx",
|
|
20
|
+
"args": [
|
|
21
|
+
"-y",
|
|
22
|
+
"@vibecheck/mcp-standard",
|
|
23
|
+
"--firewall-mode",
|
|
24
|
+
"enforce"
|
|
25
|
+
],
|
|
26
|
+
"env": {
|
|
27
|
+
"VIBECHECK_API_KEY": "YOUR_API_KEY"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/anthropics/claude-desktop/main/config-schema.json",
|
|
3
|
+
"_comment": "Claude Desktop MCP Configuration with workspace path",
|
|
4
|
+
"_instructions": [
|
|
5
|
+
"Use this template when you want to configure VibeCheck for a specific project.",
|
|
6
|
+
"Replace /path/to/your/project with your actual project path.",
|
|
7
|
+
"",
|
|
8
|
+
"Copy to your Claude Desktop config directory:",
|
|
9
|
+
" macOS: ~/Library/Application Support/Claude/claude_desktop_config.json",
|
|
10
|
+
" Windows: %APPDATA%\\Claude\\claude_desktop_config.json",
|
|
11
|
+
" Linux: ~/.config/claude/claude_desktop_config.json"
|
|
12
|
+
],
|
|
13
|
+
"mcpServers": {
|
|
14
|
+
"vibecheck": {
|
|
15
|
+
"command": "npx",
|
|
16
|
+
"args": [
|
|
17
|
+
"-y",
|
|
18
|
+
"@vibecheck/mcp-standard",
|
|
19
|
+
"--workspace",
|
|
20
|
+
"/path/to/your/project"
|
|
21
|
+
],
|
|
22
|
+
"env": {}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/anthropics/claude-desktop/main/config-schema.json",
|
|
3
|
+
"_comment": "Claude Desktop MCP Configuration for VibeCheck MCP Standard",
|
|
4
|
+
"_instructions": [
|
|
5
|
+
"Copy this file to your Claude Desktop config directory:",
|
|
6
|
+
" macOS: ~/Library/Application Support/Claude/claude_desktop_config.json",
|
|
7
|
+
" Windows: %APPDATA%\\Claude\\claude_desktop_config.json",
|
|
8
|
+
" Linux: ~/.config/claude/claude_desktop_config.json",
|
|
9
|
+
"",
|
|
10
|
+
"Or merge the mcpServers section with your existing config."
|
|
11
|
+
],
|
|
12
|
+
"mcpServers": {
|
|
13
|
+
"vibecheck": {
|
|
14
|
+
"command": "npx",
|
|
15
|
+
"args": ["-y", "@vibecheck/mcp-standard"],
|
|
16
|
+
"env": {}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Cursor IDE MCP Configuration for VibeCheck MCP Standard",
|
|
3
|
+
"_instructions": [
|
|
4
|
+
"For project-level configuration:",
|
|
5
|
+
" Copy to: .cursor/mcp.json in your project root",
|
|
6
|
+
"",
|
|
7
|
+
"For global configuration:",
|
|
8
|
+
" macOS: ~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/mcp.json",
|
|
9
|
+
" Windows: %APPDATA%\\Cursor\\User\\globalStorage\\cursor.mcp\\mcp.json",
|
|
10
|
+
" Linux: ~/.config/Cursor/User/globalStorage/cursor.mcp/mcp.json",
|
|
11
|
+
"",
|
|
12
|
+
"Or run: vibecheck mcp cursor"
|
|
13
|
+
],
|
|
14
|
+
"mcpServers": {
|
|
15
|
+
"vibecheck": {
|
|
16
|
+
"command": "npx",
|
|
17
|
+
"args": ["-y", "@vibecheck/mcp-standard"],
|
|
18
|
+
"env": {}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Windsurf MCP Configuration for VibeCheck MCP Standard",
|
|
3
|
+
"_instructions": [
|
|
4
|
+
"Copy to your Windsurf config directory:",
|
|
5
|
+
" macOS: ~/Library/Application Support/Windsurf/mcp.json",
|
|
6
|
+
" Windows: %APPDATA%\\Windsurf\\mcp.json",
|
|
7
|
+
" Linux: ~/.config/Windsurf/mcp.json"
|
|
8
|
+
],
|
|
9
|
+
"servers": [
|
|
10
|
+
{
|
|
11
|
+
"name": "vibecheck",
|
|
12
|
+
"command": "npx",
|
|
13
|
+
"args": ["-y", "@vibecheck/mcp-standard"],
|
|
14
|
+
"env": {}
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
package/mcp-server/package.json
CHANGED
|
@@ -1,56 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "vibecheck
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
2
|
+
"name": "@vibecheck/mcp-standard",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "VibeCheck MCP Standard - The official Model Context Protocol implementation for AI agent security, firewall enforcement, and intent-based development",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
|
-
"vibecheck-mcp": "
|
|
8
|
+
"vibecheck-mcp": "dist/cli.js",
|
|
9
|
+
"mcp-standard": "dist/cli.js"
|
|
9
10
|
},
|
|
10
11
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
-
"dev": "
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"dev": "tsc --watch",
|
|
14
|
+
"start": "node dist/cli.js",
|
|
15
|
+
"lint": "eslint src --ext .ts",
|
|
16
|
+
"clean": "rimraf dist",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
16
18
|
},
|
|
17
19
|
"keywords": [
|
|
18
20
|
"mcp",
|
|
19
|
-
"
|
|
20
|
-
"vibechecks",
|
|
21
|
+
"model-context-protocol",
|
|
21
22
|
"vibecheck",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
23
|
+
"ai-security",
|
|
24
|
+
"agent-firewall",
|
|
25
|
+
"ai-safety",
|
|
26
|
+
"prompt-builder",
|
|
27
|
+
"cursor",
|
|
28
|
+
"claude",
|
|
29
|
+
"windsurf",
|
|
30
|
+
"ai-agent",
|
|
31
|
+
"llm-security",
|
|
32
|
+
"hallucination-detection",
|
|
33
|
+
"intent-verification",
|
|
34
|
+
"ci-cd",
|
|
35
|
+
"github-actions",
|
|
36
|
+
"security-scanning"
|
|
25
37
|
],
|
|
38
|
+
"author": "VibeCheck <team@vibecheckai.dev>",
|
|
39
|
+
"license": "MIT",
|
|
26
40
|
"dependencies": {
|
|
27
41
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
28
|
-
"
|
|
42
|
+
"zod": "^3.25.76"
|
|
29
43
|
},
|
|
30
44
|
"devDependencies": {
|
|
31
|
-
"@types/node": "^20.
|
|
32
|
-
"typescript": "^5.
|
|
33
|
-
"
|
|
45
|
+
"@types/node": "^20.14.0",
|
|
46
|
+
"typescript": "^5.5.0",
|
|
47
|
+
"rimraf": "^5.0.5"
|
|
34
48
|
},
|
|
35
49
|
"engines": {
|
|
36
|
-
"node": ">=
|
|
37
|
-
},
|
|
38
|
-
"author": "vibecheck",
|
|
39
|
-
"license": "MIT",
|
|
40
|
-
"publishConfig": {
|
|
41
|
-
"access": "public"
|
|
50
|
+
"node": ">=18.0.0"
|
|
42
51
|
},
|
|
43
|
-
"files": [
|
|
44
|
-
"*.js",
|
|
45
|
-
"README.md"
|
|
46
|
-
],
|
|
47
52
|
"repository": {
|
|
48
53
|
"type": "git",
|
|
49
|
-
"url": "https://github.com/
|
|
54
|
+
"url": "git+https://github.com/guardiavault-oss/VIBEYCHECK.git",
|
|
55
|
+
"directory": "mcp-server"
|
|
50
56
|
},
|
|
57
|
+
"homepage": "https://github.com/guardiavault-oss/VIBEYCHECK/tree/main/mcp-server",
|
|
51
58
|
"bugs": {
|
|
52
|
-
"url": "https://github.com/
|
|
59
|
+
"url": "https://github.com/guardiavault-oss/VIBEYCHECK/issues"
|
|
53
60
|
},
|
|
54
|
-
"
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
},
|
|
64
|
+
"files": [
|
|
65
|
+
"dist/**/*",
|
|
66
|
+
"configs/**/*",
|
|
67
|
+
"SPEC.md",
|
|
68
|
+
"README.md",
|
|
69
|
+
"LICENSE"
|
|
70
|
+
]
|
|
55
71
|
}
|
|
56
|
-
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* VibeCheck MCP Server CLI Entry Point
|
|
4
|
+
* Run with: vibecheck-mcp or npx @vibecheck/mcp-server
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { VibecheckMcpServer } from './server.js';
|
|
8
|
+
import type { McpServerConfig, FirewallMode } from './types.js';
|
|
9
|
+
|
|
10
|
+
// Parse command line arguments
|
|
11
|
+
function parseArgs(): McpServerConfig {
|
|
12
|
+
const args = process.argv.slice(2);
|
|
13
|
+
const config: McpServerConfig = {};
|
|
14
|
+
|
|
15
|
+
for (let i = 0; i < args.length; i++) {
|
|
16
|
+
const arg = args[i];
|
|
17
|
+
|
|
18
|
+
switch (arg) {
|
|
19
|
+
case '--workspace':
|
|
20
|
+
case '-w':
|
|
21
|
+
config.workspacePath = args[++i];
|
|
22
|
+
break;
|
|
23
|
+
|
|
24
|
+
case '--cli-path':
|
|
25
|
+
config.cliPath = args[++i];
|
|
26
|
+
break;
|
|
27
|
+
|
|
28
|
+
case '--firewall-mode':
|
|
29
|
+
case '-m':
|
|
30
|
+
const mode = args[++i];
|
|
31
|
+
if (mode === 'off' || mode === 'observe' || mode === 'enforce') {
|
|
32
|
+
config.defaultFirewallMode = mode as FirewallMode;
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
|
|
36
|
+
case '--auto-enforce-intent':
|
|
37
|
+
config.autoEnforceIntent = true;
|
|
38
|
+
break;
|
|
39
|
+
|
|
40
|
+
case '--log-level':
|
|
41
|
+
case '-l':
|
|
42
|
+
const level = args[++i];
|
|
43
|
+
if (level === 'debug' || level === 'info' || level === 'warn' || level === 'error') {
|
|
44
|
+
config.logLevel = level;
|
|
45
|
+
}
|
|
46
|
+
break;
|
|
47
|
+
|
|
48
|
+
case '--help':
|
|
49
|
+
case '-h':
|
|
50
|
+
printHelp();
|
|
51
|
+
process.exit(0);
|
|
52
|
+
|
|
53
|
+
case '--version':
|
|
54
|
+
case '-v':
|
|
55
|
+
console.log('1.0.0');
|
|
56
|
+
process.exit(0);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return config;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function printHelp(): void {
|
|
64
|
+
console.log(`
|
|
65
|
+
VibeCheck MCP Server - Agent Firewall, Prompt Builder & CLI Integration
|
|
66
|
+
|
|
67
|
+
Usage: vibecheck-mcp [options]
|
|
68
|
+
|
|
69
|
+
Options:
|
|
70
|
+
-w, --workspace <path> Set workspace path (default: current directory)
|
|
71
|
+
--cli-path <path> Path to vibecheck CLI executable
|
|
72
|
+
-m, --firewall-mode <mode> Initial firewall mode: off, observe, enforce (default: off)
|
|
73
|
+
--auto-enforce-intent Auto-enable enforce mode when intent is set
|
|
74
|
+
-l, --log-level <level> Log level: debug, info, warn, error (default: info)
|
|
75
|
+
-h, --help Show this help message
|
|
76
|
+
-v, --version Show version number
|
|
77
|
+
|
|
78
|
+
MCP Server Configuration:
|
|
79
|
+
This server communicates over stdio using the Model Context Protocol.
|
|
80
|
+
Add it to your MCP client configuration:
|
|
81
|
+
|
|
82
|
+
{
|
|
83
|
+
"mcpServers": {
|
|
84
|
+
"vibecheck": {
|
|
85
|
+
"command": "npx",
|
|
86
|
+
"args": ["@vibecheck/mcp-server"],
|
|
87
|
+
"env": {}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
Available Tools:
|
|
93
|
+
|
|
94
|
+
CLI Tools:
|
|
95
|
+
- vibecheck_doctor Health check
|
|
96
|
+
- vibecheck_audit Security audit
|
|
97
|
+
- vibecheck_ship Ship readiness
|
|
98
|
+
- vibecheck_forge Generate AI rules
|
|
99
|
+
- vibecheck_fix Plan/apply fixes
|
|
100
|
+
- vibecheck_checkpoint Snapshot management
|
|
101
|
+
- vibecheck_packs Report bundles
|
|
102
|
+
- vibecheck_reality Browser testing
|
|
103
|
+
|
|
104
|
+
Firewall Tools:
|
|
105
|
+
- firewall_status Get firewall status
|
|
106
|
+
- firewall_set_mode Set firewall mode
|
|
107
|
+
- firewall_set_intent Set current intent
|
|
108
|
+
- firewall_get_intent Get current intent
|
|
109
|
+
- firewall_clear_intent Clear intent
|
|
110
|
+
- firewall_check Shield check
|
|
111
|
+
- firewall_verify_claim Verify AI claim
|
|
112
|
+
- firewall_gate_action Check action permission
|
|
113
|
+
- firewall_get_templates Get intent templates
|
|
114
|
+
|
|
115
|
+
Prompt Builder Tools:
|
|
116
|
+
- prompt_get_templates Get prompt templates
|
|
117
|
+
- prompt_get_categories Get categories
|
|
118
|
+
- prompt_detect_template Detect template from input
|
|
119
|
+
- prompt_build Build enhanced prompt
|
|
120
|
+
- prompt_get_context Get workspace context
|
|
121
|
+
- prompt_get_suggestions Get smart suggestions
|
|
122
|
+
|
|
123
|
+
Resources:
|
|
124
|
+
- vibecheck://status Server status
|
|
125
|
+
- vibecheck://firewall/stats Firewall statistics
|
|
126
|
+
- vibecheck://firewall/log Action log
|
|
127
|
+
- vibecheck://context Workspace context
|
|
128
|
+
|
|
129
|
+
Examples:
|
|
130
|
+
# Run with default settings
|
|
131
|
+
vibecheck-mcp
|
|
132
|
+
|
|
133
|
+
# Run with specific workspace
|
|
134
|
+
vibecheck-mcp --workspace /path/to/project
|
|
135
|
+
|
|
136
|
+
# Run with enforce mode enabled
|
|
137
|
+
vibecheck-mcp --firewall-mode enforce
|
|
138
|
+
|
|
139
|
+
# Run with custom CLI path
|
|
140
|
+
vibecheck-mcp --cli-path /usr/local/bin/vibecheck
|
|
141
|
+
`);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Main entry point
|
|
145
|
+
async function main(): Promise<void> {
|
|
146
|
+
const config = parseArgs();
|
|
147
|
+
|
|
148
|
+
// Default to current working directory if not specified
|
|
149
|
+
if (!config.workspacePath) {
|
|
150
|
+
config.workspacePath = process.cwd();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const server = new VibecheckMcpServer(config);
|
|
154
|
+
|
|
155
|
+
// Handle graceful shutdown
|
|
156
|
+
process.on('SIGINT', () => {
|
|
157
|
+
console.error('\nShutting down...');
|
|
158
|
+
process.exit(0);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
process.on('SIGTERM', () => {
|
|
162
|
+
console.error('\nShutting down...');
|
|
163
|
+
process.exit(0);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// Handle uncaught errors
|
|
167
|
+
process.on('uncaughtException', (error) => {
|
|
168
|
+
console.error('Uncaught exception:', error);
|
|
169
|
+
process.exit(1);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
process.on('unhandledRejection', (reason) => {
|
|
173
|
+
console.error('Unhandled rejection:', reason);
|
|
174
|
+
process.exit(1);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
try {
|
|
178
|
+
await server.run();
|
|
179
|
+
} catch (error) {
|
|
180
|
+
console.error('Server error:', error);
|
|
181
|
+
process.exit(1);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
main();
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VibeCheck MCP Server
|
|
3
|
+
*
|
|
4
|
+
* This package provides an MCP (Model Context Protocol) server for VibeCheck,
|
|
5
|
+
* enabling AI agents to interact with:
|
|
6
|
+
* - Agent Firewall (intent-based code change control)
|
|
7
|
+
* - Prompt Builder (intelligent prompt templates)
|
|
8
|
+
* - CLI Commands (audit, ship, forge, etc.)
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { VibecheckMcpServer } from '@vibecheck/mcp-server';
|
|
13
|
+
*
|
|
14
|
+
* const server = new VibecheckMcpServer({
|
|
15
|
+
* workspacePath: '/path/to/project',
|
|
16
|
+
* defaultFirewallMode: 'observe',
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* await server.run();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
// Export main server class
|
|
24
|
+
export { VibecheckMcpServer } from './server.js';
|
|
25
|
+
|
|
26
|
+
// Export services for direct use
|
|
27
|
+
export { CliService } from './services/cli-service.js';
|
|
28
|
+
export { FirewallService } from './services/firewall-service.js';
|
|
29
|
+
export { PromptBuilderService } from './services/prompt-builder-service.js';
|
|
30
|
+
export { TierService, getTierService, FREE_COMMANDS, PRO_COMMANDS } from './services/tier-service.js';
|
|
31
|
+
|
|
32
|
+
// Export types
|
|
33
|
+
export type {
|
|
34
|
+
// CLI Types
|
|
35
|
+
CliResult,
|
|
36
|
+
AuditResult,
|
|
37
|
+
AuditFinding,
|
|
38
|
+
DoctorResult,
|
|
39
|
+
DoctorCheck,
|
|
40
|
+
ShipResult,
|
|
41
|
+
ForgeResult,
|
|
42
|
+
FixResult,
|
|
43
|
+
FixDetail,
|
|
44
|
+
CheckpointResult,
|
|
45
|
+
CheckpointInfo,
|
|
46
|
+
PacksResult,
|
|
47
|
+
RealityResult,
|
|
48
|
+
RealityFinding,
|
|
49
|
+
|
|
50
|
+
// Firewall Types
|
|
51
|
+
FirewallMode,
|
|
52
|
+
FirewallStatus,
|
|
53
|
+
FirewallVerdict,
|
|
54
|
+
FirewallViolation,
|
|
55
|
+
UnblockPlan,
|
|
56
|
+
UnblockStep,
|
|
57
|
+
ShieldCheckResult,
|
|
58
|
+
ShieldFinding,
|
|
59
|
+
Intent,
|
|
60
|
+
IntentTemplate,
|
|
61
|
+
ClaimVerificationRequest,
|
|
62
|
+
ClaimVerificationResult,
|
|
63
|
+
ClaimEvidence,
|
|
64
|
+
|
|
65
|
+
// Prompt Builder Types
|
|
66
|
+
PromptCategory,
|
|
67
|
+
PromptTemplate,
|
|
68
|
+
ContextQuestion,
|
|
69
|
+
WorkspaceContext,
|
|
70
|
+
BuiltPrompt,
|
|
71
|
+
PromptQuality,
|
|
72
|
+
SmartSuggestion,
|
|
73
|
+
|
|
74
|
+
// Server Types
|
|
75
|
+
McpServerConfig,
|
|
76
|
+
McpServerState,
|
|
77
|
+
} from './types.js';
|
|
78
|
+
|
|
79
|
+
// Export tier types
|
|
80
|
+
export type {
|
|
81
|
+
Tier,
|
|
82
|
+
TierLimits,
|
|
83
|
+
UserEntitlements,
|
|
84
|
+
TierCheckResult,
|
|
85
|
+
} from './services/tier-service.js';
|