comment-kit-mcp 1.0.0 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1
4
+
5
+ - Reads `COMMENTKIT_TOKEN`, `COMMENTKIT_PROJECT_ID` and `COMMENTKIT_ENDPOINT`, the same names as the CLI; the `COMMENT_KIT_*` names still work.
6
+ - Clearer tool descriptions: what `assignee`, `status`, `page_url`, `environment` and `request_id` accept.
7
+ - The README starts with the hosted server (`https://commentkit.dev/mcp`), which needs no install or token.
8
+
3
9
  ## 1.0.0
4
10
 
5
11
  - Works with the v1 agent API: website feedback and dashboard tasks.
package/README.md CHANGED
@@ -4,7 +4,17 @@ Give your AI coding agent (Claude Code, Cursor, Windsurf, Codex…) the feedback
4
4
 
5
5
  ## Setup
6
6
 
7
- 1. In the CommentKit dashboard open **Project → Installation → AI agents** and create an agent token. Choose whether the agent may also **reply** and **mark feedback ready for review**. Copy the token (shown once) and the project ID.
7
+ **Easiest: no install, no token.** Add the hosted server and sign in when your agent asks:
8
+
9
+ ```bash
10
+ claude mcp add --transport http commentkit https://commentkit.dev/mcp
11
+ ```
12
+
13
+ In Cursor or VS Code, add `https://commentkit.dev/mcp` as a remote (HTTP) MCP server. You choose the project and what the agent may do in the browser.
14
+
15
+ **Or run it locally** with an agent token (for CI or offline setups):
16
+
17
+ 1. In the CommentKit dashboard open **Project → Developers → Connect your coding agent** and create an agent token. Choose whether the agent may also **reply** and **mark feedback ready for review**. Copy the token (shown once) and the project ID.
8
18
  2. Add the server to your agent:
9
19
 
10
20
  ```json
@@ -14,17 +24,17 @@ Give your AI coding agent (Claude Code, Cursor, Windsurf, Codex…) the feedback
14
24
  "command": "npx",
15
25
  "args": ["-y", "comment-kit-mcp"],
16
26
  "env": {
17
- "COMMENT_KIT_PROJECT_ID": "123",
18
- "COMMENT_KIT_ACCESS_TOKEN": "your-agent-token"
27
+ "COMMENTKIT_PROJECT_ID": "123",
28
+ "COMMENTKIT_TOKEN": "your-agent-token"
19
29
  }
20
30
  }
21
31
  }
22
32
  }
23
33
  ```
24
34
 
25
- Claude Code: `claude mcp add commentkit -e COMMENT_KIT_PROJECT_ID=123 -e COMMENT_KIT_ACCESS_TOKEN=… -- npx -y comment-kit-mcp`
35
+ Claude Code: `claude mcp add commentkit -e COMMENTKIT_PROJECT_ID=123 -e COMMENTKIT_TOKEN=… -- npx -y comment-kit-mcp`
26
36
 
27
- Optional `COMMENT_KIT_BASE_URL` points at another CommentKit server (HTTPS, or HTTP on localhost).
37
+ Optional `COMMENTKIT_ENDPOINT` points at another CommentKit server (HTTPS, or HTTP on localhost). These are the same variable names the CLI uses; the older `COMMENT_KIT_PROJECT_ID`, `COMMENT_KIT_ACCESS_TOKEN` and `COMMENT_KIT_BASE_URL` still work.
28
38
 
29
39
  ## Tools
30
40
 
@@ -1,16 +1,17 @@
1
1
  #!/usr/bin/env node
2
- // CLI entry: a project ID and dedicated read-only agent token are required.
2
+ // CLI entry: a project ID and a project agent token are required.
3
3
 
4
4
  import { readFileSync } from "node:fs";
5
5
  import { run, validateAccessToken, validateBaseUrl } from "../dist/index.js";
6
6
 
7
- const projectId = process.env.COMMENT_KIT_PROJECT_ID;
8
- const accessToken = process.env.COMMENT_KIT_ACCESS_TOKEN;
9
- const baseUrl = process.env.COMMENT_KIT_BASE_URL;
7
+ // COMMENTKIT_* match the CLI and build plugin; COMMENT_KIT_* keep working.
8
+ const projectId = process.env.COMMENTKIT_PROJECT_ID ?? process.env.COMMENT_KIT_PROJECT_ID;
9
+ const accessToken = process.env.COMMENTKIT_TOKEN ?? process.env.COMMENT_KIT_ACCESS_TOKEN;
10
+ const baseUrl = process.env.COMMENTKIT_ENDPOINT ?? process.env.COMMENT_KIT_BASE_URL;
10
11
 
11
12
  if (!accessToken || !projectId) {
12
13
  process.stderr.write(
13
- "comment-kit-mcp: missing COMMENT_KIT_ACCESS_TOKEN and/or COMMENT_KIT_PROJECT_ID.\n" +
14
+ "comment-kit-mcp: missing COMMENTKIT_TOKEN and/or COMMENTKIT_PROJECT_ID (COMMENT_KIT_ACCESS_TOKEN / COMMENT_KIT_PROJECT_ID also work).\n" +
14
15
  "Create an agent token in Project → Developers. Project keys (pk_…) are not agent credentials.\n" +
15
16
  "See https://github.com/commentkit/comment-kit/tree/main/mcp\n",
16
17
  );
package/dist/server.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { McpServer } from "@modelcontextprotocol/server";
2
2
  export interface ServerConfig {
3
3
  projectId: string;
4
- /** Project agent token from Project → Installation → AI agents. */
4
+ /** Project agent token from Project → Developers → Connect your coding agent. */
5
5
  accessToken: string;
6
6
  baseUrl?: string;
7
7
  /** @deprecated ignored; kept so old configurations keep starting. */
package/dist/server.js CHANGED
@@ -11,13 +11,13 @@ const id = z
11
11
  .regex(/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|(CK-)?[0-9]{1,9})$/i, "Use the id from a list, or a reference like CK-12")
12
12
  .describe("Id (UUID) from a list, or the reference such as CK-12");
13
13
  const listSchema = z.strictObject({
14
- status: z.enum(STATUS).optional().describe("Default active (open, in progress, ready for review)"),
15
- page_url: z.string().trim().max(2000).optional().describe("Exact page URL"),
16
- branch: z.string().trim().max(255).optional(),
17
- environment: z.enum(ENVIRONMENT).optional(),
18
- assignee: z.string().trim().max(20).optional().describe("User id, 'none' or omit"),
19
- sort: z.enum(["recent", "oldest", "priority"]).optional(),
20
- limit: z.number().int().min(1).max(100).optional(),
14
+ status: z.enum(STATUS).optional().describe("in_review means Ready for review; active (default) = open, in progress and ready for review"),
15
+ page_url: z.string().trim().max(2000).optional().describe("Page URL as shown in list results; path and query must match"),
16
+ branch: z.string().trim().max(255).optional().describe("Git branch the feedback was left on"),
17
+ environment: z.enum(ENVIRONMENT).optional().describe("Where it was left: development (localhost), preview, staging or production"),
18
+ assignee: z.string().trim().max(20).optional().describe("'me' (whoever connected the agent), 'none' (unassigned), or a numeric user id"),
19
+ sort: z.enum(["recent", "oldest", "priority"]).optional().describe("Default recent (latest activity first)"),
20
+ limit: z.number().int().min(1).max(100).optional().describe("How many to return (default 50)"),
21
21
  cursor: z.string().trim().min(1).max(2048).optional().describe("Cursor from the previous result"),
22
22
  });
23
23
  const tasksSchema = listSchema.extend({
@@ -61,13 +61,13 @@ export function createServer(config) {
61
61
  }
62
62
  }
63
63
  server.registerTool("list_tasks", {
64
- description: "List the project's tasks: website feedback and tasks made in the CommentKit dashboard, with status, priority and assignee. Filter by kind, status and assignee.",
64
+ description: "List the project's tasks: website feedback and tasks made in the CommentKit dashboard, with status, priority and assignee. Filter by kind, status, page, branch, environment and assignee.",
65
65
  annotations: read,
66
66
  inputSchema: tasksSchema,
67
67
  }, guard(listTasks));
68
68
  for (const tool of ["search_feedback", "search_comments"]) {
69
69
  server.registerTool(tool, {
70
- description: `${tool === "search_comments" ? "(Alias of search_feedback.) " : ""}Full-text search across feedback and replies, or find one by reference (CK-12).`,
70
+ description: `${tool === "search_comments" ? "(Alias of search_feedback.) " : ""}Full-text search across feedback, tasks and replies, or find one by reference (CK-12).`,
71
71
  annotations: read,
72
72
  inputSchema: searchSchema,
73
73
  }, guard(search));
@@ -90,7 +90,7 @@ export function createServer(config) {
90
90
  server.registerTool("reply_to_feedback", {
91
91
  description: "Reply in the conversation, for example to explain a fix or ask a question. Appears as '<your name> (AI agent)' and the reviewer is emailed. Most projects ask a person to approve agent replies first; then this answers 'waiting for approval'. Needs a token with the reply permission.",
92
92
  annotations: write,
93
- inputSchema: z.strictObject({ id, body: z.string().trim().min(1).max(10000) }),
93
+ inputSchema: z.strictObject({ id, body: z.string().trim().min(1).max(10000).describe("Plain text or Markdown shown to the reviewer") }),
94
94
  }, guard(async ({ id: threadId, body }) => {
95
95
  const result = await api.reply(threadId, body);
96
96
  return text(result.pending ? formatRequest(result.pending) : `Replied as ${result.done.author.name}.`);
@@ -121,7 +121,7 @@ export function createServer(config) {
121
121
  server.registerTool("check_request", {
122
122
  description: "Check a write that was waiting for approval (the request id from reply_to_feedback, mark_ready_for_review or link_commit): approved, declined (with the reason) or expired.",
123
123
  annotations: read,
124
- inputSchema: z.strictObject({ request_id: z.string().trim().uuid() }),
124
+ inputSchema: z.strictObject({ request_id: z.string().trim().uuid().describe("The id from a 'waiting for approval' answer") }),
125
125
  }, guard(async ({ request_id }) => text(formatRequest(await api.request(request_id)))));
126
126
  return server;
127
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comment-kit-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Model Context Protocol server for CommentKit — expose stakeholder comments to your coding agent.",
5
5
  "keywords": [
6
6
  "agent",