annot-mcp 0.1.0 → 0.1.1

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/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW,CAAC,CAAC,GAAG,OAAO;IAC/B,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,OAAO,CAAC,CAAC,GAAG,OAAO,EACvC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACnC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CA2BzB"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAEA,UAAU,WAAW,CAAC,CAAC,GAAG,OAAO;IAC/B,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,OAAO,CAAC,CAAC,GAAG,OAAO,EACvC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACnC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CA8BzB"}
package/dist/api.js CHANGED
@@ -1,4 +1,4 @@
1
- const DEFAULT_API_URL = 'https://ckzawbmwlqtoniftecyc.supabase.co/functions/v1';
1
+ const DEFAULT_API_URL = 'https://kjncgciveiyjgpgohped.supabase.co/functions/v1';
2
2
  export async function callApi(action, params = {}) {
3
3
  const apiKey = process.env.ANNOT_API_KEY;
4
4
  if (!apiKey) {
@@ -10,13 +10,13 @@ export async function callApi(action, params = {}) {
10
10
  const response = await fetch(url, {
11
11
  method: 'POST',
12
12
  headers: {
13
- 'Authorization': `Bearer ${apiKey}`,
13
+ Authorization: `Bearer ${apiKey}`,
14
14
  'Content-Type': 'application/json',
15
15
  },
16
16
  body: JSON.stringify({ action, ...params }),
17
17
  });
18
18
  if (!response.ok) {
19
- const body = await response.json().catch(() => ({ error: response.statusText }));
19
+ const body = (await response.json().catch(() => ({ error: response.statusText })));
20
20
  throw new Error(body.error || `API request failed: ${response.status}`);
21
21
  }
22
22
  return response.json();
package/dist/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,uDAAuD,CAAC;AAOhF,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,MAAc,EACd,SAAkC,EAAE;IAEpC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IACzC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,iDAAiD;YACjD,sFAAsF,CACvF,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,eAAe,CAAC;IAC5D,MAAM,GAAG,GAAG,GAAG,MAAM,UAAU,CAAC;IAEhC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAChC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,eAAe,EAAE,UAAU,MAAM,EAAE;YACnC,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;KAC5C,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAA2B,CAAC;QAC3G,MAAM,IAAI,KAAK,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C,IAAI,EAA6B,CAAC;AACpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA6CpE,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmJrD"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA6CpE,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiJrD"}
package/dist/tools.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AA2CnC,MAAM,UAAU,aAAa,CAAC,MAAiB;IAC7C,MAAM,CAAC,IAAI,CACT,sBAAsB,EACtB,oIAAoI,EACpI,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,EACtE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QACvB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAiB,cAAc,EAAE;YAC3D,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACtC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7C,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC,EAAE,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AAgG,EAChG,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,MAAM,GAAG,MAAM,OAAO,CAAgB,eAAe,CAAC,CAAC;QAE7D,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7C,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC,EAAE,CAAC;QAC9E,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAEtF,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,mBAAmB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;iBACnE;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,31 +1,14 @@
1
1
  {
2
2
  "name": "annot-mcp",
3
- "version": "0.1.0",
4
- "description": "Annot MCP server – receive and apply website feedback changes from Annot",
3
+ "version": "0.1.1",
5
4
  "type": "module",
6
5
  "bin": {
7
6
  "annot-mcp": "./dist/index.js"
8
7
  },
9
- "files": [
10
- "dist"
11
- ],
12
8
  "scripts": {
13
9
  "build": "tsc",
14
- "prepublishOnly": "npm run build"
10
+ "dev": "tsc --watch"
15
11
  },
16
- "keywords": [
17
- "mcp",
18
- "model-context-protocol",
19
- "annot",
20
- "feedback",
21
- "code-changes"
22
- ],
23
- "license": "MIT",
24
- "repository": {
25
- "type": "git",
26
- "url": "https://github.com/pkk-dev/annot-mcp.git"
27
- },
28
- "homepage": "https://github.com/pkk-dev/annot-mcp",
29
12
  "dependencies": {
30
13
  "@modelcontextprotocol/sdk": "^1.12.1"
31
14
  },
package/src/api.ts ADDED
@@ -0,0 +1,41 @@
1
+ const DEFAULT_API_URL = 'https://kjncgciveiyjgpgohped.supabase.co/functions/v1';
2
+
3
+ interface ApiResponse<T = unknown> {
4
+ data?: T;
5
+ error?: string;
6
+ }
7
+
8
+ export async function callApi<T = unknown>(
9
+ action: string,
10
+ params: Record<string, unknown> = {}
11
+ ): Promise<ApiResponse<T>> {
12
+ const apiKey = process.env.ANNOT_API_KEY;
13
+ if (!apiKey) {
14
+ throw new Error(
15
+ 'ANNOT_API_KEY environment variable is not set. ' +
16
+ 'Generate a key at your Annot account settings and set it as an environment variable.'
17
+ );
18
+ }
19
+
20
+ const apiUrl = process.env.ANNOT_API_URL || DEFAULT_API_URL;
21
+ const url = `${apiUrl}/mcp-api`;
22
+
23
+ const response = await fetch(url, {
24
+ method: 'POST',
25
+ headers: {
26
+ Authorization: `Bearer ${apiKey}`,
27
+ 'Content-Type': 'application/json',
28
+ },
29
+ body: JSON.stringify({ action, ...params }),
30
+ });
31
+
32
+ if (!response.ok) {
33
+ const body = (await response.json().catch(() => ({ error: response.statusText }))) as Record<
34
+ string,
35
+ string
36
+ >;
37
+ throw new Error(body.error || `API request failed: ${response.status}`);
38
+ }
39
+
40
+ return response.json() as Promise<ApiResponse<T>>;
41
+ }
package/src/index.ts ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
+ import { registerTools } from './tools.js';
5
+
6
+ const server = new McpServer({
7
+ name: 'annot',
8
+ version: '0.1.0',
9
+ });
10
+
11
+ registerTools(server);
12
+
13
+ const transport = new StdioServerTransport();
14
+ await server.connect(transport);
package/src/tools.ts ADDED
@@ -0,0 +1,191 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { z } from 'zod';
3
+ import { callApi } from './api.js';
4
+
5
+ interface BriefSummary {
6
+ brief_id: string;
7
+ intent: string;
8
+ scope: string;
9
+ status: string;
10
+ instruction: string | null;
11
+ created_at: string;
12
+ comment_id: string;
13
+ comment_snippet: string;
14
+ page_url: string;
15
+ page_title: string | null;
16
+ element_selector: string | null;
17
+ project_id: string;
18
+ project_name: string;
19
+ }
20
+
21
+ interface BriefDetail {
22
+ brief_id: string;
23
+ generated_prompt: string;
24
+ intent: string;
25
+ scope: string;
26
+ instruction: string | null;
27
+ reference_url: string | null;
28
+ status: string;
29
+ error_message: string | null;
30
+ comment: Record<string, unknown>;
31
+ project: Record<string, unknown>;
32
+ }
33
+
34
+ interface ProjectInfo {
35
+ id: string;
36
+ name: string;
37
+ website_url: string;
38
+ }
39
+
40
+ interface StatusUpdate {
41
+ id: string;
42
+ status: string;
43
+ updated_at: string;
44
+ }
45
+
46
+ export function registerTools(server: McpServer): void {
47
+ server.tool(
48
+ 'list_pending_changes',
49
+ 'List all pending feedback changes ready to be applied. Returns brief summaries with comment snippets, page URLs, and project info.',
50
+ { project_id: z.string().optional().describe('Filter by project ID') },
51
+ async ({ project_id }) => {
52
+ const result = await callApi<BriefSummary[]>('list_changes', {
53
+ ...(project_id ? { project_id } : {}),
54
+ });
55
+
56
+ if (!result.data || result.data.length === 0) {
57
+ return { content: [{ type: 'text' as const, text: 'No pending changes found.' }] };
58
+ }
59
+
60
+ const lines = result.data.map((b) =>
61
+ [
62
+ `- **${b.project_name}** | ${b.page_url}`,
63
+ ` Brief: ${b.brief_id} | Intent: ${b.intent} | Scope: ${b.scope}`,
64
+ ` Feedback: "${b.comment_snippet}"`,
65
+ b.element_selector ? ` Element: \`${b.element_selector}\`` : null,
66
+ b.instruction ? ` Instructions: ${b.instruction}` : null,
67
+ ]
68
+ .filter(Boolean)
69
+ .join('\n')
70
+ );
71
+
72
+ return {
73
+ content: [
74
+ {
75
+ type: 'text' as const,
76
+ text: `Found ${result.data.length} pending change(s):\n\n${lines.join('\n\n')}`,
77
+ },
78
+ ],
79
+ };
80
+ }
81
+ );
82
+
83
+ server.tool(
84
+ 'get_change_details',
85
+ 'Get the full generated prompt and all metadata for a specific change brief. The returned prompt contains everything needed to execute the change.',
86
+ { brief_id: z.string().describe('The brief ID to retrieve') },
87
+ async ({ brief_id }) => {
88
+ const result = await callApi<BriefDetail>('get_change', { brief_id });
89
+
90
+ if (!result.data) {
91
+ return { content: [{ type: 'text' as const, text: 'Brief not found.' }] };
92
+ }
93
+
94
+ return {
95
+ content: [
96
+ {
97
+ type: 'text' as const,
98
+ text: result.data.generated_prompt,
99
+ },
100
+ ],
101
+ };
102
+ }
103
+ );
104
+
105
+ server.tool(
106
+ 'start_change',
107
+ 'Mark a change brief as "processing" to prevent duplicate execution. Call this before starting work on a change.',
108
+ { brief_id: z.string().describe('The brief ID to start processing') },
109
+ async ({ brief_id }) => {
110
+ await callApi<StatusUpdate>('start_change', { brief_id });
111
+ return {
112
+ content: [
113
+ {
114
+ type: 'text' as const,
115
+ text: `Brief ${brief_id} marked as processing.`,
116
+ },
117
+ ],
118
+ };
119
+ }
120
+ );
121
+
122
+ server.tool(
123
+ 'complete_change',
124
+ 'Mark a change brief as successfully applied. Call this after the change has been executed.',
125
+ {
126
+ brief_id: z.string().describe('The brief ID to mark as complete'),
127
+ notes: z.string().optional().describe('Optional notes about what was done'),
128
+ },
129
+ async ({ brief_id, notes }) => {
130
+ await callApi<StatusUpdate>('complete_change', {
131
+ brief_id,
132
+ ...(notes ? { notes } : {}),
133
+ });
134
+ return {
135
+ content: [
136
+ {
137
+ type: 'text' as const,
138
+ text: `Brief ${brief_id} marked as applied.`,
139
+ },
140
+ ],
141
+ };
142
+ }
143
+ );
144
+
145
+ server.tool(
146
+ 'fail_change',
147
+ 'Mark a change brief as failed with an error message. Call this if the change could not be applied.',
148
+ {
149
+ brief_id: z.string().describe('The brief ID to mark as failed'),
150
+ error_message: z.string().describe('Description of what went wrong'),
151
+ },
152
+ async ({ brief_id, error_message }) => {
153
+ await callApi<StatusUpdate>('fail_change', {
154
+ brief_id,
155
+ error_message,
156
+ });
157
+ return {
158
+ content: [
159
+ {
160
+ type: 'text' as const,
161
+ text: `Brief ${brief_id} marked as failed: ${error_message}`,
162
+ },
163
+ ],
164
+ };
165
+ }
166
+ );
167
+
168
+ server.tool(
169
+ 'list_projects',
170
+ 'List all projects accessible to this API key. Useful for filtering pending changes by project.',
171
+ {},
172
+ async () => {
173
+ const result = await callApi<ProjectInfo[]>('list_projects');
174
+
175
+ if (!result.data || result.data.length === 0) {
176
+ return { content: [{ type: 'text' as const, text: 'No projects found.' }] };
177
+ }
178
+
179
+ const lines = result.data.map((p) => `- **${p.name}** (${p.id})\n ${p.website_url}`);
180
+
181
+ return {
182
+ content: [
183
+ {
184
+ type: 'text' as const,
185
+ text: `${result.data.length} project(s):\n\n${lines.join('\n\n')}`,
186
+ },
187
+ ],
188
+ };
189
+ }
190
+ );
191
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "Node16",
5
+ "moduleResolution": "Node16",
6
+ "lib": ["ES2022"],
7
+ "outDir": "./dist",
8
+ "rootDir": "./src",
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "skipLibCheck": true,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "resolveJsonModule": true,
14
+ "declaration": true,
15
+ "declarationMap": true,
16
+ "sourceMap": true
17
+ },
18
+ "include": ["src/**/*.ts"]
19
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Annot
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 DELETED
@@ -1,81 +0,0 @@
1
- # annot-mcp
2
-
3
- An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server for [Annot](https://annot.dev) — receive website feedback and apply changes directly from your IDE.
4
-
5
- ## What it does
6
-
7
- Annot lets stakeholders leave visual feedback on live websites. This MCP server connects your AI coding assistant (Cursor, Windsurf, Claude Desktop, etc.) to Annot so you can:
8
-
9
- - **List pending changes** — see all feedback ready to be applied
10
- - **Get change details** — retrieve the full generated prompt with context (element selectors, styles, screenshots)
11
- - **Track progress** — mark changes as processing, applied, or failed
12
-
13
- ## Setup
14
-
15
- ### 1. Get an API key
16
-
17
- Generate an API key from your Annot account settings page.
18
-
19
- ### 2. Configure your MCP client
20
-
21
- Add the following to your MCP client configuration.
22
-
23
- **Cursor** (`.cursor/mcp.json`):
24
-
25
- ```json
26
- {
27
- "mcpServers": {
28
- "annot": {
29
- "command": "npx",
30
- "args": ["-y", "annot-mcp"],
31
- "env": {
32
- "ANNOT_API_KEY": "ak_your_api_key_here"
33
- }
34
- }
35
- }
36
- }
37
- ```
38
-
39
- **Claude Desktop** (`claude_desktop_config.json`):
40
-
41
- ```json
42
- {
43
- "mcpServers": {
44
- "annot": {
45
- "command": "npx",
46
- "args": ["-y", "annot-mcp"],
47
- "env": {
48
- "ANNOT_API_KEY": "ak_your_api_key_here"
49
- }
50
- }
51
- }
52
- }
53
- ```
54
-
55
- ### 3. Start using it
56
-
57
- Ask your AI assistant to check for pending changes:
58
-
59
- > "Check Annot for any pending feedback changes"
60
-
61
- ## Available tools
62
-
63
- | Tool | Description |
64
- |---|---|
65
- | `list_pending_changes` | List all pending feedback changes ready to be applied |
66
- | `get_change_details` | Get the full generated prompt and metadata for a specific change |
67
- | `start_change` | Mark a change as "processing" to prevent duplicate execution |
68
- | `complete_change` | Mark a change as successfully applied |
69
- | `fail_change` | Mark a change as failed with an error message |
70
- | `list_projects` | List all projects accessible to your API key |
71
-
72
- ## Environment variables
73
-
74
- | Variable | Required | Description |
75
- |---|---|---|
76
- | `ANNOT_API_KEY` | Yes | Your Annot API key (starts with `ak_`) |
77
- | `ANNOT_API_URL` | No | Override the API endpoint (defaults to Annot production) |
78
-
79
- ## License
80
-
81
- MIT