agentation-vue-mcp 0.0.2

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 ADDED
@@ -0,0 +1,27 @@
1
+ PolyForm Shield License 1.0.0
2
+
3
+ Copyright (c) 2026 Benji Taylor
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 use,
7
+ copy, modify, and distribute the Software, subject to the following conditions:
8
+
9
+ 1. You may not use the Software to provide a product or service that competes
10
+ with the Software or any product or service offered by the Licensor that
11
+ includes the Software.
12
+
13
+ 2. You may not remove or obscure any licensing, copyright, or other notices
14
+ included in the Software.
15
+
16
+ 3. If you distribute the Software or any derivative works, you must include a
17
+ copy of this license.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ For more information, see https://polyformproject.org/licenses/shield/1.0.0
package/README.md ADDED
@@ -0,0 +1,171 @@
1
+ # Agentation MCP
2
+
3
+ MCP (Model Context Protocol) server for Agentation - visual feedback for AI coding agents.
4
+
5
+ This package provides an MCP server that allows AI coding agents (like Claude Code) to receive and respond to web page annotations created with the Agentation toolbar.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install agentation-vue-mcp
11
+ # or
12
+ pnpm add agentation-vue-mcp
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ### 1. Add to your agent
18
+
19
+ The fastest way to configure Agentation across any supported agent:
20
+
21
+ ```bash
22
+ npx add-mcp "npx -y agentation-vue-mcp server"
23
+ ```
24
+
25
+ Uses [add-mcp](https://github.com/neondatabase/add-mcp) to auto-detect installed agents (Claude Code, Cursor, Codex, Windsurf, and more).
26
+
27
+ Or for Claude Code specifically:
28
+
29
+ ```bash
30
+ claude mcp add agentation -- npx agentation-vue-mcp server
31
+ ```
32
+
33
+
34
+ ### 2. Start the server
35
+
36
+ ```bash
37
+ agentation-vue-mcp server
38
+ ```
39
+
40
+ This starts both:
41
+ - **HTTP server** (port 4747) - receives annotations from the browser toolbar
42
+ - **MCP server** (stdio) - exposes tools for Claude Code
43
+
44
+ ### 3. Verify your setup
45
+
46
+ ```bash
47
+ agentation-vue-mcp doctor
48
+ ```
49
+
50
+ ## CLI Commands
51
+
52
+ ```bash
53
+ agentation-vue-mcp init # Setup wizard (registers via claude mcp add)
54
+ agentation-vue-mcp server [options] # Start the annotation server
55
+ agentation-vue-mcp doctor # Check your setup
56
+ agentation-vue-mcp help # Show help
57
+ ```
58
+
59
+ ### Server Options
60
+
61
+ ```bash
62
+ --port <port> # HTTP server port (default: 4747)
63
+ --mcp-only # Skip HTTP server, only run MCP on stdio
64
+ --http-url <url> # HTTP server URL for MCP to fetch from
65
+ ```
66
+
67
+ ## MCP Tools
68
+
69
+ The MCP server exposes these tools to AI agents:
70
+
71
+ | Tool | Description |
72
+ |------|-------------|
73
+ | `agentation_list_sessions` | List all active annotation sessions |
74
+ | `agentation_get_session` | Get a session with all its annotations |
75
+ | `agentation_get_pending` | Get pending annotations for a session |
76
+ | `agentation_get_all_pending` | Get pending annotations across all sessions |
77
+ | `agentation_acknowledge` | Mark an annotation as acknowledged |
78
+ | `agentation_resolve` | Mark an annotation as resolved |
79
+ | `agentation_dismiss` | Dismiss an annotation with a reason |
80
+ | `agentation_reply` | Add a reply to an annotation thread |
81
+ | `agentation_watch_annotations` | Block until new annotations appear, then return batch |
82
+
83
+ ## HTTP API
84
+
85
+ The HTTP server provides a REST API for the browser toolbar:
86
+
87
+ ### Sessions
88
+ - `POST /sessions` - Create a new session
89
+ - `GET /sessions` - List all sessions
90
+ - `GET /sessions/:id` - Get session with annotations
91
+
92
+ ### Annotations
93
+ - `POST /sessions/:id/annotations` - Add annotation
94
+ - `GET /annotations/:id` - Get annotation
95
+ - `PATCH /annotations/:id` - Update annotation
96
+ - `DELETE /annotations/:id` - Delete annotation
97
+ - `GET /sessions/:id/pending` - Get pending annotations
98
+ - `GET /pending` - Get all pending annotations
99
+
100
+ ### Events (SSE)
101
+ - `GET /sessions/:id/events` - Session event stream
102
+ - `GET /events` - Global event stream (optionally filter with `?domain=...`)
103
+
104
+ ### Health
105
+ - `GET /health` - Health check
106
+ - `GET /status` - Server status
107
+
108
+ ## Hands-Free Mode
109
+
110
+ Use `agentation_watch_annotations` in a loop for automatic feedback processing -- the agent picks up new annotations as they're created:
111
+
112
+ 1. Agent calls `agentation_watch_annotations` (blocks until annotations appear)
113
+ 2. Annotations arrive -- agent receives batch after collection window
114
+ 3. Agent processes each annotation:
115
+ - `agentation_acknowledge` -- mark as seen
116
+ - Make code changes
117
+ - `agentation_resolve` -- mark as done with summary
118
+ 4. Agent calls `agentation_watch_annotations` again (loop)
119
+
120
+ Example CLAUDE.md instructions:
121
+
122
+ ```markdown
123
+ When I say "watch mode", call agentation_watch_annotations in a loop.
124
+ For each annotation: acknowledge it, make the fix, then resolve it with a summary.
125
+ Continue watching until I say stop or timeout is reached.
126
+ ```
127
+
128
+ ## Webhooks
129
+
130
+ Configure webhooks to receive notifications when users request agent action:
131
+
132
+ ```bash
133
+ # Single webhook
134
+ export AGENTATION_WEBHOOK_URL=https://your-server.com/webhook
135
+
136
+ # Multiple webhooks (comma-separated)
137
+ export AGENTATION_WEBHOOKS=https://server1.com/hook,https://server2.com/hook
138
+ ```
139
+
140
+ ## Environment Variables
141
+
142
+ | Variable | Description | Default |
143
+ |----------|-------------|---------|
144
+ | `AGENTATION_STORE` | Storage backend (`memory` or `sqlite`) | `sqlite` |
145
+ | `AGENTATION_WEBHOOK_URL` | Single webhook URL | - |
146
+ | `AGENTATION_WEBHOOKS` | Comma-separated webhook URLs | - |
147
+ | `AGENTATION_EVENT_RETENTION_DAYS` | Days to keep events | `7` |
148
+
149
+ ## Programmatic Usage
150
+
151
+ ```typescript
152
+ import { startHttpServer, startMcpServer } from 'agentation-vue-mcp';
153
+
154
+ // Start HTTP server on port 4747
155
+ startHttpServer(4747);
156
+
157
+ // Start MCP server (connects via stdio)
158
+ await startMcpServer('http://localhost:4747');
159
+ ```
160
+
161
+ ## Storage
162
+
163
+ By default, data is persisted to SQLite at `~/.agentation/store.db`. To use in-memory storage:
164
+
165
+ ```bash
166
+ AGENTATION_STORE=memory agentation-vue-mcp server
167
+ ```
168
+
169
+ ## License
170
+
171
+ PolyForm Shield 1.0.0