gosnap-mcp 0.1.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/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/chunk-RKG74QMB.js +586 -0
- package/dist/chunk-RKG74QMB.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +147 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +689 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
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
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# gosnap-mcp
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for UI feedback processing by AI agents.
|
|
4
|
+
|
|
5
|
+
Receives UI annotations/feedback via HTTP API and exposes them to AI agents (Claude Code, Cursor, Copilot, Windsurf, Codex, etc.) through MCP tools.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx gosnap-mcp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This starts both:
|
|
14
|
+
- **MCP server** on stdio (for AI agent communication)
|
|
15
|
+
- **HTTP API** on `http://127.0.0.1:4747` (for receiving feedback)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g gosnap-mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Agent Configuration
|
|
24
|
+
|
|
25
|
+
All MCP-compatible agents use a similar JSON config:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"gosnap": {
|
|
31
|
+
"command": "npx",
|
|
32
|
+
"args": ["gosnap-mcp"]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Auto-setup
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx gosnap-mcp init
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Detects installed agents and writes config automatically.
|
|
45
|
+
|
|
46
|
+
### Config locations
|
|
47
|
+
|
|
48
|
+
| Agent | Config File |
|
|
49
|
+
|-------|------------|
|
|
50
|
+
| Claude Code | `~/.claude/mcp.json` |
|
|
51
|
+
| Cursor | `.cursor/mcp.json` |
|
|
52
|
+
| VS Code / Copilot | `.vscode/mcp.json` |
|
|
53
|
+
| Windsurf | `.codeium/windsurf/mcp_config.json` |
|
|
54
|
+
|
|
55
|
+
## MCP Tools
|
|
56
|
+
|
|
57
|
+
| Tool | Description |
|
|
58
|
+
|------|-------------|
|
|
59
|
+
| `list_sessions` | List all active feedback sessions |
|
|
60
|
+
| `get_pending_feedback` | Get unresolved feedback (optionally by session) |
|
|
61
|
+
| `acknowledge_feedback` | Mark feedback as seen |
|
|
62
|
+
| `resolve_feedback` | Mark as resolved with summary |
|
|
63
|
+
| `dismiss_feedback` | Reject with reasoning |
|
|
64
|
+
|
|
65
|
+
## HTTP API
|
|
66
|
+
|
|
67
|
+
| Method | Endpoint | Description |
|
|
68
|
+
|--------|----------|-------------|
|
|
69
|
+
| `POST` | `/api/feedback` | Submit new feedback |
|
|
70
|
+
| `POST` | `/api/webhook` | Widget sync (SyncPayload) |
|
|
71
|
+
| `GET` | `/api/sessions` | List all sessions |
|
|
72
|
+
| `GET` | `/api/sessions/:id` | Get session with feedbacks |
|
|
73
|
+
| `GET` | `/api/health` | Health check |
|
|
74
|
+
|
|
75
|
+
### Submit feedback
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
curl -X POST http://127.0.0.1:4747/api/feedback \
|
|
79
|
+
-H 'Content-Type: application/json' \
|
|
80
|
+
-d '{
|
|
81
|
+
"comment": "Fix the button color",
|
|
82
|
+
"pageUrl": "https://example.com/page",
|
|
83
|
+
"intent": "fix",
|
|
84
|
+
"severity": "important"
|
|
85
|
+
}'
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## CLI Commands
|
|
89
|
+
|
|
90
|
+
| Command | Description |
|
|
91
|
+
|---------|-------------|
|
|
92
|
+
| `npx gosnap-mcp` | Start servers (default) |
|
|
93
|
+
| `npx gosnap-mcp server` | Start servers |
|
|
94
|
+
| `npx gosnap-mcp server --port 8080` | Custom HTTP port |
|
|
95
|
+
| `npx gosnap-mcp server --mcp-only` | MCP only, no HTTP |
|
|
96
|
+
| `npx gosnap-mcp init` | Auto-configure agents |
|
|
97
|
+
| `npx gosnap-mcp doctor` | Verify setup |
|
|
98
|
+
|
|
99
|
+
## Programmatic Usage
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
import { startServer } from 'gosnap-mcp';
|
|
103
|
+
|
|
104
|
+
await startServer({ port: 4747, mcpOnly: false });
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
MIT
|