note-mcp-server 2.2.6 → 2.2.9

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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/index.js +48 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -110,6 +110,7 @@ socialite_id=eyJpdiI6I…
110
110
  | `create_note` | POST 新增,`content` 必填,`title` 可選 |
111
111
  | `update_note` | POST 修改,`c_id` 必填,支援 `content`、`title`、`append`、`prepend` |
112
112
  | `delete_note` | POST 刪除,`c_id` + `action=delete` |
113
+ | `tag` | GET 搜尋,根據標籤名稱找出筆記內容 |
113
114
  | `upload_image` | multipart,`image_base64`、可選 `filename` |
114
115
  | `send_push` | POST 推播,`message` 必填,`title` / `url` 可選 |
115
116
 
package/index.js CHANGED
@@ -76,7 +76,7 @@ const APP_NAME = firstEnv("app_name", "APP_NAME", "notes_app_name", "NOTES_APP_N
76
76
  const server = new Server(
77
77
  {
78
78
  name: `note-mcp-server (${APP_NAME})`,
79
- version: "2.2.4",
79
+ version: "2.2.8",
80
80
  },
81
81
  {
82
82
  capabilities: {
@@ -179,6 +179,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
179
179
  properties: {
180
180
  content: { type: "string", description: "HTML 或純文字內容" },
181
181
  title: { type: "string", description: "標題(可選)" },
182
+ tags: { type: "string", description: "標籤,多個標籤以逗號分隔(可選)" },
182
183
  },
183
184
  required: ["content"],
184
185
  },
@@ -194,6 +195,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
194
195
  c_id: { type: "number", description: "筆記 ID" },
195
196
  content: { type: "string", description: "新內容(可選,若未傳則使用現有內容作為基底)" },
196
197
  title: { type: "string", description: "新標題(可選)" },
198
+ tags: { type: "string", description: "新標籤,多個標籤以逗號分隔(可選)" },
197
199
  append: { type: "string", description: "追加在結尾的內容(可選)" },
198
200
  prepend: { type: "string", description: "追加在開頭的內容(可選)" },
199
201
  },
@@ -211,6 +213,19 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
211
213
  required: ["c_id"],
212
214
  },
213
215
  },
216
+ {
217
+ name: "tag",
218
+ description: withSecurityNotice(
219
+ "根據標籤搜尋筆記內容。例如:tag 待辨。"
220
+ ),
221
+ inputSchema: {
222
+ type: "object",
223
+ properties: {
224
+ name: { type: "string", description: "標籤名稱,例如:待辨" },
225
+ },
226
+ required: ["name"],
227
+ },
228
+ },
214
229
  {
215
230
  name: "upload_image",
216
231
  description: withSecurityNotice(
@@ -309,6 +324,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
309
324
  if (args.title !== undefined && args.title !== "") {
310
325
  payload.title = args.title;
311
326
  }
327
+ if (args.tags !== undefined && args.tags !== "") {
328
+ payload.tags = args.tags;
329
+ }
312
330
  const response = await axios.post(BASE_URL, payload, {
313
331
  headers: { "Content-Type": "application/json" },
314
332
  });
@@ -329,6 +347,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
329
347
  if (args.title !== undefined) {
330
348
  payload.title = args.title;
331
349
  }
350
+ if (args.tags !== undefined) {
351
+ payload.tags = args.tags;
352
+ }
332
353
  if (args.append !== undefined) {
333
354
  payload.append = args.append;
334
355
  }
@@ -357,6 +378,32 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
357
378
  ],
358
379
  };
359
380
  }
381
+ case "tag": {
382
+ const params = {
383
+ tag: args.name,
384
+ limit: args.limit || 10,
385
+ };
386
+ const response = await axios.get(BASE_URL, { params });
387
+ const payload =
388
+ response.data && typeof response.data === "object"
389
+ ? { ...response.data }
390
+ : response.data;
391
+
392
+ const notes = normalizeListPayload(payload);
393
+ if (Array.isArray(notes)) {
394
+ for (const note of notes) {
395
+ if (note && typeof note === "object" && note.c_id !== undefined) {
396
+ note.note_url = buildNoteUrl(note.c_id);
397
+ }
398
+ }
399
+ }
400
+
401
+ return {
402
+ content: [
403
+ { type: "text", text: JSON.stringify(payload, null, 2) },
404
+ ],
405
+ };
406
+ }
360
407
 
361
408
  case "upload_image": {
362
409
  let b64 = String(args.image_base64).replace(/\s/g, "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "note-mcp-server",
3
- "version": "2.2.6",
3
+ "version": "2.2.9",
4
4
  "description": "MCP (stdio) server for Notes API v2 — list/read/write notes, upload images, Web Push from Cursor and compatible clients.",
5
5
  "main": "index.js",
6
6
  "bin": {