note-mcp-server 2.2.6 → 2.2.8

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 +40 -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: {
@@ -211,6 +211,19 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
211
211
  required: ["c_id"],
212
212
  },
213
213
  },
214
+ {
215
+ name: "tag",
216
+ description: withSecurityNotice(
217
+ "根據標籤搜尋筆記內容。例如:tag 待辨。"
218
+ ),
219
+ inputSchema: {
220
+ type: "object",
221
+ properties: {
222
+ name: { type: "string", description: "標籤名稱,例如:待辨" },
223
+ },
224
+ required: ["name"],
225
+ },
226
+ },
214
227
  {
215
228
  name: "upload_image",
216
229
  description: withSecurityNotice(
@@ -357,6 +370,32 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
357
370
  ],
358
371
  };
359
372
  }
373
+ case "tag": {
374
+ const params = {
375
+ tag: args.name,
376
+ limit: args.limit || 10,
377
+ };
378
+ const response = await axios.get(BASE_URL, { params });
379
+ const payload =
380
+ response.data && typeof response.data === "object"
381
+ ? { ...response.data }
382
+ : response.data;
383
+
384
+ const notes = normalizeListPayload(payload);
385
+ if (Array.isArray(notes)) {
386
+ for (const note of notes) {
387
+ if (note && typeof note === "object" && note.c_id !== undefined) {
388
+ note.note_url = buildNoteUrl(note.c_id);
389
+ }
390
+ }
391
+ }
392
+
393
+ return {
394
+ content: [
395
+ { type: "text", text: JSON.stringify(payload, null, 2) },
396
+ ],
397
+ };
398
+ }
360
399
 
361
400
  case "upload_image": {
362
401
  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.8",
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": {