@monnet/mcp 0.1.10 → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Grégoire Casoetto
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 CHANGED
@@ -1,67 +1,82 @@
1
- # @monnet/mcp
2
-
3
- Model Context Protocol (MCP) server for Monnet.
4
-
5
- Exposes motions, plans, and approvals to MCP-compatible clients (Claude Desktop, Cursor, etc.) so you can work with your Monnet workspace from your terminal without leaving your AI assistant.
6
-
7
- ## Install
8
-
9
- Add this to your MCP client config (e.g. `~/Library/Application Support/Claude/claude_desktop_config.json` for Claude Desktop):
10
-
11
- ```json
12
- {
13
- "mcpServers": {
14
- "monnet": {
15
- "command": "npx",
16
- "args": ["-y", "@monnet/mcp"],
17
- "env": {
18
- "MONNET_API_KEY": "mnk_..."
19
- }
20
- }
21
- }
22
- }
23
- ```
24
-
25
- Generate an API key from the Monnet web app: Settings → API Keys → Generate new key.
26
-
27
- ## Environment variables
28
-
29
- | Variable | Required | Default | Purpose |
30
- |---|---|---|---|
31
- | `MONNET_API_KEY` | yes | — | Bearer token (`mnk_*`), sent as `X-API-Key` header on every request |
32
- | `MONNET_API_URL` | no | `https://api.monnet.ai` | Override for self-hosted or local dev backends |
33
-
34
- ## Local development
35
-
36
- ```bash
37
- cd mcp-server
38
- npm install
39
- npm run build
40
- ```
41
-
42
- Point your MCP client at the local build:
43
-
44
- ```json
45
- {
46
- "mcpServers": {
47
- "monnet": {
48
- "command": "node",
49
- "args": ["/absolute/path/to/mcp-server/dist/index.js"],
50
- "env": {
51
- "MONNET_API_KEY": "mnk_...",
52
- "MONNET_API_URL": "http://localhost:8000"
53
- }
54
- }
55
- }
56
- }
57
- ```
58
-
59
- Restart Claude Desktop / Cursor after editing the config.
60
-
61
- ## Tools
62
-
63
- Current scaffold ships with one tool for end-to-end validation:
64
-
65
- - `monnet_whoami` — verifies the MCP connection and lists the API keys on your account.
66
-
67
- Additional tools (`get_motion`, `list_motions`, `create_motion`, `update_motion`, `comment`, `ask_monnet`, `get_inbox`, `approve`, `reject`) will follow as Phase 4 and 5 of the implementation plan.
1
+ # @monnet/mcp
2
+
3
+ Model Context Protocol (MCP) server for [Monnet](https://monnet.ai).
4
+
5
+ Exposes motions, plans, and approvals to MCP-compatible clients (Claude Desktop, Cursor, etc.) so you can work with your Monnet workspace from your terminal without leaving your AI assistant.
6
+
7
+ ## Install
8
+
9
+ Add this to your MCP client config (e.g. `~/Library/Application Support/Claude/claude_desktop_config.json` for Claude Desktop):
10
+
11
+ ```json
12
+ {
13
+ "mcpServers": {
14
+ "monnet": {
15
+ "command": "npx",
16
+ "args": ["-y", "@monnet/mcp"],
17
+ "env": {
18
+ "MONNET_API_KEY": "mnk_..."
19
+ }
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ Generate an API key from the Monnet web app: **Settings → API Keys → Generate new key**.
26
+
27
+ ## Environment variables
28
+
29
+ | Variable | Required | Default | Purpose |
30
+ |---|---|---|---|
31
+ | `MONNET_API_KEY` | yes | — | API key (`mnk_*`), sent as the `X-API-Key` header on every request |
32
+ | `MONNET_API_URL` | no | `https://api.monnet.ai` | Override for self-hosted or local dev backends |
33
+
34
+ ## Tools
35
+
36
+ | Tool | Purpose |
37
+ |---|---|
38
+ | `monnet_whoami` | Verify the connection and list the API keys on your account |
39
+ | `list_workspaces` | List the workspaces you belong to |
40
+ | `get_inbox` | Fetch your inbox |
41
+ | `list_motions` | List motions in a workspace |
42
+ | `get_motion` | Read a motion summary, body, plan, members, comments |
43
+ | `create_motion` | Create a new draft motion from a free-form prompt |
44
+ | `update_motion` | Update a motion's summary, body, priority, or plan |
45
+ | `comment` | Post a comment on a motion (approval-gated, see below) |
46
+ | `approve` | Approve a plan step |
47
+ | `reject` | Reject a plan step (with an optional reason) |
48
+ | `ask_monnet` | Ask Monnet a question on a motion |
49
+
50
+ ## Approval gate on send actions
51
+
52
+ Tools that send a message under your identity (e.g. `comment`) never dispatch automatically. Before the message leaves the MCP server, your client shows a confirmation dialog (MCP elicitation) with a preview; nothing is sent unless you explicitly approve. If your MCP client does not support elicitation, the send is aborted — the gate fails closed.
53
+
54
+ ## Local development
55
+
56
+ ```bash
57
+ npm install
58
+ npm run build
59
+ ```
60
+
61
+ Point your MCP client at the local build:
62
+
63
+ ```json
64
+ {
65
+ "mcpServers": {
66
+ "monnet": {
67
+ "command": "node",
68
+ "args": ["/absolute/path/to/monnet-mcp/dist/index.js"],
69
+ "env": {
70
+ "MONNET_API_KEY": "mnk_...",
71
+ "MONNET_API_URL": "http://localhost:8000"
72
+ }
73
+ }
74
+ }
75
+ }
76
+ ```
77
+
78
+ Restart your MCP client after editing the config.
79
+
80
+ ## License
81
+
82
+ [MIT](./LICENSE)
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Approval gate for MCP tools that send messages under the user's identity.
3
+ *
4
+ * No send-type tool call may reach the Monnet backend without the user's
5
+ * explicit go-ahead. The gate uses MCP elicitation: the client (Claude
6
+ * Desktop, Cursor, …) renders a native confirmation dialog to the human user,
7
+ * out of band of the model. If the client does not support elicitation, the
8
+ * gate fails closed — the message is aborted, never sent.
9
+ */
10
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
11
+ export declare function requiresSendApproval(toolName: string): boolean;
12
+ export interface ApprovalVerdict {
13
+ approved: boolean;
14
+ /** Tool result text explaining why nothing was sent. Empty when approved. */
15
+ deniedReason: string;
16
+ }
17
+ /**
18
+ * Ask the human user (via client-side elicitation) to approve an outbound
19
+ * message. Anything other than an explicit accept-with-confirm is a denial.
20
+ */
21
+ export declare function requestSendApproval(server: Server, toolName: string, args: Record<string, unknown>): Promise<ApprovalVerdict>;
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Approval gate for MCP tools that send messages under the user's identity.
3
+ *
4
+ * No send-type tool call may reach the Monnet backend without the user's
5
+ * explicit go-ahead. The gate uses MCP elicitation: the client (Claude
6
+ * Desktop, Cursor, …) renders a native confirmation dialog to the human user,
7
+ * out of band of the model. If the client does not support elicitation, the
8
+ * gate fails closed — the message is aborted, never sent.
9
+ */
10
+ /**
11
+ * Send-type tools that require human approval, mapped to a preview builder.
12
+ *
13
+ * The preview is rendered defensively from the raw (not yet validated)
14
+ * arguments so a malformed call still produces a readable prompt; full
15
+ * validation happens in the tool handler after approval.
16
+ *
17
+ * Gating a new send-type tool = one entry here. Read/fetch tools and
18
+ * `ask_monnet` (a private query visible only to the user and Monnet) are
19
+ * intentionally not gated.
20
+ */
21
+ const SEND_TOOL_PREVIEWS = {
22
+ comment: (args) => `Post a PUBLIC comment as you on motion ${str(args.motion_short_id)} ` +
23
+ `in workspace "${str(args.workspace_slug)}":\n\n${str(args.content)}`,
24
+ };
25
+ function str(value) {
26
+ return typeof value === "string" ? value : JSON.stringify(value ?? "(missing)");
27
+ }
28
+ export function requiresSendApproval(toolName) {
29
+ return toolName in SEND_TOOL_PREVIEWS;
30
+ }
31
+ const NOT_SENT_PREFIX = "Message NOT sent — ";
32
+ const DO_NOT_RETRY = " Do not retry this call unless the user explicitly asks you to send it again.";
33
+ // Humans read and decide; give them more than the SDK's 60s default.
34
+ const APPROVAL_TIMEOUT_MS = 5 * 60_000;
35
+ /**
36
+ * Ask the human user (via client-side elicitation) to approve an outbound
37
+ * message. Anything other than an explicit accept-with-confirm is a denial.
38
+ */
39
+ export async function requestSendApproval(server, toolName, args) {
40
+ if (!server.getClientCapabilities()?.elicitation) {
41
+ return {
42
+ approved: false,
43
+ deniedReason: NOT_SENT_PREFIX +
44
+ "this MCP client does not support elicitation, so Monnet cannot ask " +
45
+ "the user for approval. Sending messages on the user's behalf " +
46
+ "requires their explicit confirmation. Ask the user to post the " +
47
+ "message themselves in the Monnet web app." +
48
+ DO_NOT_RETRY,
49
+ };
50
+ }
51
+ let result;
52
+ try {
53
+ result = await server.elicitInput({
54
+ message: "Monnet MCP is about to send a message on your behalf.\n\n" +
55
+ SEND_TOOL_PREVIEWS[toolName](args) +
56
+ "\n\nApprove sending this message?",
57
+ requestedSchema: {
58
+ type: "object",
59
+ properties: {
60
+ confirm: {
61
+ type: "boolean",
62
+ title: "Send this message",
63
+ description: "Check to approve sending the message under your identity.",
64
+ },
65
+ },
66
+ required: ["confirm"],
67
+ },
68
+ }, { timeout: APPROVAL_TIMEOUT_MS });
69
+ }
70
+ catch (err) {
71
+ const message = err instanceof Error ? err.message : String(err);
72
+ return {
73
+ approved: false,
74
+ deniedReason: NOT_SENT_PREFIX + `the approval prompt failed (${message}).` + DO_NOT_RETRY,
75
+ };
76
+ }
77
+ if (result.action === "accept" && result.content?.confirm === true) {
78
+ return { approved: true, deniedReason: "" };
79
+ }
80
+ return {
81
+ approved: false,
82
+ deniedReason: NOT_SENT_PREFIX +
83
+ (result.action === "decline"
84
+ ? "the user declined the approval prompt."
85
+ : result.action === "cancel"
86
+ ? "the user dismissed the approval prompt without answering."
87
+ : "the user did not confirm sending.") +
88
+ DO_NOT_RETRY,
89
+ };
90
+ }
91
+ //# sourceMappingURL=approval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval.js","sourceRoot":"","sources":["../src/approval.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;;;;;;;GAUG;AACH,MAAM,kBAAkB,GAA8D;IACpF,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,0CAA0C,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG;QACtE,iBAAiB,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;CACxE,CAAC;AAEF,SAAS,GAAG,CAAC,KAAc;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,WAAW,CAAC,CAAC;AAClF,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,QAAgB;IACnD,OAAO,QAAQ,IAAI,kBAAkB,CAAC;AACxC,CAAC;AAQD,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAC9C,MAAM,YAAY,GAChB,+EAA+E,CAAC;AAElF,qEAAqE;AACrE,MAAM,mBAAmB,GAAG,CAAC,GAAG,MAAM,CAAC;AAEvC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAc,EACd,QAAgB,EAChB,IAA6B;IAE7B,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,WAAW,EAAE,CAAC;QACjD,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,YAAY,EACV,eAAe;gBACf,qEAAqE;gBACrE,+DAA+D;gBAC/D,iEAAiE;gBACjE,2CAA2C;gBAC3C,YAAY;SACf,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,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/approve.js";
20
20
  import { handleReject, REJECT_TOOL_DEFINITION } from "./tools/reject.js";
21
21
  import { handleAskMonnet, ASK_MONNET_TOOL_DEFINITION } from "./tools/ask-monnet.js";
22
22
  import { handleListWorkspaces, LIST_WORKSPACES_TOOL_DEFINITION } from "./tools/list-workspaces.js";
23
+ import { requiresSendApproval, requestSendApproval } from "./approval.js";
23
24
  const TOOLS = [
24
25
  WHOAMI_TOOL_DEFINITION,
25
26
  LIST_WORKSPACES_TOOL_DEFINITION,
@@ -61,6 +62,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
61
62
  };
62
63
  }
63
64
  try {
65
+ if (requiresSendApproval(toolName)) {
66
+ const verdict = await requestSendApproval(server, toolName, args);
67
+ if (!verdict.approved) {
68
+ return { content: [{ type: "text", text: verdict.deniedReason }] };
69
+ }
70
+ }
64
71
  const text = await handler(args);
65
72
  return { content: [{ type: "text", text }] };
66
73
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,6BAA6B,EAA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AAC;QACD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC/C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC;YACtD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -19,8 +19,10 @@ export async function handleComment(args) {
19
19
  export const COMMENT_TOOL_DEFINITION = {
20
20
  name: "comment",
21
21
  description: "Post a public comment on a motion, either top-level or as a reply within " +
22
- "an existing comment thread (pass parent_id). Monnet may respond if it " +
23
- "does, the response is included in the return value.",
22
+ "an existing comment thread (pass parent_id). The user is asked to approve " +
23
+ "the message before it is sent nothing is posted without their explicit " +
24
+ "confirmation. Monnet may respond — if it does, the response is included " +
25
+ "in the return value.",
24
26
  inputSchema: {
25
27
  type: "object",
26
28
  properties: {
@@ -1 +1 @@
1
- {"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/tools/comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElE,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE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{
2
- "name": "@monnet/mcp",
3
- "version": "0.1.10",
4
- "description": "Model Context Protocol server for Monnet — exposes motions, plans, and approvals to MCP-compatible clients like Claude Desktop and Cursor.",
5
- "type": "module",
6
- "bin": {
7
- "monnet-mcp": "dist/index.js"
8
- },
9
- "files": [
10
- "dist",
11
- "README.md"
12
- ],
13
- "scripts": {
14
- "build": "tsc -p .",
15
- "dev": "tsc -p . --watch",
16
- "start": "node dist/index.js",
17
- "prepublishOnly": "npm run build"
18
- },
19
- "dependencies": {
20
- "@modelcontextprotocol/sdk": "^1.0.0",
21
- "zod": "^3.23.0"
22
- },
23
- "devDependencies": {
24
- "@types/node": "^20.0.0",
25
- "typescript": "^5.6.0"
26
- },
27
- "engines": {
28
- "node": ">=18"
29
- },
30
- "publishConfig": {
31
- "access": "public"
32
- }
33
- }
1
+ {
2
+ "name": "@monnet/mcp",
3
+ "version": "0.2.1",
4
+ "mcpName": "ai.monnet/mcp",
5
+ "description": "Model Context Protocol server for Monnet — exposes motions, plans, and approvals to MCP-compatible clients like Claude Desktop and Cursor.",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/GregoireCasoetto/monnet-mcp.git"
10
+ },
11
+ "type": "module",
12
+ "bin": {
13
+ "monnet-mcp": "dist/index.js"
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc -p .",
21
+ "dev": "tsc -p . --watch",
22
+ "start": "node dist/index.js",
23
+ "prepublishOnly": "npm run build"
24
+ },
25
+ "dependencies": {
26
+ "@modelcontextprotocol/sdk": "^1.13.0",
27
+ "zod": "^3.23.0"
28
+ },
29
+ "devDependencies": {
30
+ "@types/node": "^20.0.0",
31
+ "typescript": "^5.6.0"
32
+ },
33
+ "engines": {
34
+ "node": ">=18"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ }
39
+ }