@ainote/mcp 1.2.0 → 1.3.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.
Files changed (2) hide show
  1. package/README.md +115 -2
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -58,6 +58,10 @@ All transports expose the same tool catalog. Choose the option that matches your
58
58
  - 🔄 **Claude Environment Sync**: Push/pull `~/.claude/` skills, agents, commands, hooks across machines (macOS/WSL/Linux)
59
59
  - 🔐 **End-to-End Encryption**: `mcp` category (mcpServers + API keys) auto-encrypted client-side with age; server never sees plaintext
60
60
  - 🪪 **OS Keychain Integration**: Per-machine age identity stored in macOS Keychain / libsecret / Credential Manager (file fallback supported)
61
+ - 🤝 **Session Handoffs**: `handoff_save` / `handoff_list` / `handoff_get` with optional `time: HHMM` for same-day disambiguation — saved under the primary vault, auto-purged after 7 days
62
+ - 📦 **Multi-Device File Sync**: `sync_push` / `sync_pull` / `sync_list` push markdown notes into the user's git-backed primary vault — works across macOS, Linux, iOS shortcuts
63
+ - 🏛️ **GitHub-Backed Vaults**: `vault_create` / `vault_clone` / `vault_sync` provision a private GitHub repo per vault; ainote indexes contents but never proxies git traffic
64
+ - 🛡️ **MCP Tool Annotations**: Every tool advertises `readOnlyHint` / `destructiveHint` / `idempotentHint` / `openWorldHint` so autonomous agent runtimes can gate destructive calls
61
65
  - 🏷️ **Category Support**: Organize tasks with categories
62
66
  - 🔍 **Advanced Filtering**: 18+ filter options including date ranges, location, overdue tasks
63
67
  - ⭐ **Priority Management**: Mark tasks as important
@@ -166,7 +170,7 @@ The fallback file is only used when no system keychain is available (e.g. headle
166
170
 
167
171
  ### Environment overrides
168
172
 
169
- - `AINOTE_API_URL` — backend URL (default `https://ainote-5muq.onrender.com`)
173
+ - `AINOTE_API_URL` — backend URL (default `https://api.ainote.dev`)
170
174
  - `AINOTE_API_KEY` — pre-provisioned MCP key. When set, the login flow is bypassed entirely and this key is used as-is.
171
175
 
172
176
  ### Headless / CI usage
@@ -410,7 +414,7 @@ By default the server listens on `http://localhost:3030` and exposes two endpoin
410
414
  Environment variable | Description | Default
411
415
  ---|---|---
412
416
  `AINOTE_API_KEY` | API key used for MCP key authentication | **required**
413
- `AINOTE_API_URL` | Target AI Note API base URL | `https://ainote-5muq.onrender.com`
417
+ `AINOTE_API_URL` | Target AI Note API base URL | `https://api.ainote.dev`
414
418
  `AINOTE_MCP_HTTP_PORT` | Local port for the SSE server | `3030`
415
419
  `AINOTE_MCP_ALLOWED_ORIGINS` | Comma-separated list of allowed browser origins | _any_
416
420
  `AINOTE_MCP_ALLOWED_HOSTS` | Comma-separated list of allowed `Host` headers | _any_
@@ -553,6 +557,115 @@ Claude: I'll list all documents under dev/...
553
557
  → list_dev_docs()
554
558
  ```
555
559
 
560
+ ### Session Handoffs (cross-session / cross-device continuation)
561
+
562
+ Save a self-contained handoff note when the context window fills up or when you need to continue on another machine. Stored in the user's primary vault under `handoffs/`, auto-purged after 7 days.
563
+
564
+ | Tool | Purpose |
565
+ |------|---------|
566
+ | `handoff_save` | Write a handoff (`project`, `topic`, `content`, optional `date`, optional `time` HHMM for same-day disambiguation) |
567
+ | `handoff_list` | Most-recent-first list, optionally filtered by project. ⚠️ Triggers the 7-day stale purge as a side effect |
568
+ | `handoff_get` | Fetch by `project` + `topic` (+ optional `date`/`time`). Returns latest if `date` omitted. Same purge side effect |
569
+
570
+ ```text
571
+ You: "Save a handoff for the logi-phase4 work I'm wrapping up"
572
+ Claude: → handoff_save({project: "logi", topic: "phase4", time: "1555", content: "..."})
573
+ Stored at handoffs/logi-phase4-1555-2026-05-14.txt
574
+
575
+ (later, on the laptop):
576
+ You: "Pick up the logi-phase4 handoff"
577
+ Claude: → handoff_get({project: "logi", topic: "phase4"})
578
+ ```
579
+
580
+ ### Multi-Device File Sync (`sync_*` / `vault_sync`)
581
+
582
+ `sync_push` / `sync_pull` / `sync_list` operate on the user's git-backed primary vault. `vault_sync` is the unified entrypoint that accepts an `action: list|pull|push` argument.
583
+
584
+ | Tool | Purpose |
585
+ |------|---------|
586
+ | `sync_push` | Push a markdown note (path + content) into the vault repo |
587
+ | `sync_pull` | Read a markdown note from the vault by path |
588
+ | `sync_list` | Enumerate vault paths (optionally filtered) |
589
+ | `vault_sync` | Unified wrapper around the above three |
590
+
591
+ ### GitHub-Backed Vaults
592
+
593
+ | Tool | Purpose |
594
+ |------|---------|
595
+ | `vault_list` | List the user's vaults + sync status + indexed file counts |
596
+ | `vault_create` | Create a new private vault as a GitHub repo (requires the ainote GitHub App install) |
597
+ | `vault_clone` | Return the git clone URL for an existing vault. ainote does **not** proxy git traffic — use your usual GitHub credentials |
598
+ | `vault_connect_status` | Check whether the ainote GitHub App is installed for this user; returns an install URL otherwise |
599
+
600
+ ---
601
+
602
+ ## Annotations Reference
603
+
604
+ Every tool advertises four MCP-spec annotations on `tools/list` so autonomous agent runtimes can reason about safety:
605
+
606
+ | Hint | Meaning | Agent action |
607
+ |------|---------|--------------|
608
+ | `readOnlyHint: true` | Tool does not mutate any server state | Safe to call without consent gates |
609
+ | `destructiveHint: true` | Tool deletes / overwrites / purges state | Require explicit user consent or transaction boundary |
610
+ | `idempotentHint: true` | Repeating the call with same args ends in the same state | Safe to retry on timeout / network error |
611
+ | `openWorldHint: true` | Tool reaches an external system (GitHub, SMTP, third-party) | Outcomes may be non-deterministic; cache cautiously |
612
+
613
+ **Notable annotations:**
614
+
615
+ - `handoff_list` / `handoff_get` are marked `destructiveHint: true` because they run a 7-day stale-handoff purge on every call.
616
+ - `login_and_get_key` is marked `readOnlyHint: false` because it creates a default MCP key when the user has none.
617
+ - `vault_sync` is conservatively `destructiveHint: true` because `action=push` with empty content can delete an indexed file.
618
+
619
+ See the source-of-truth mapping at [`docs/todo/MCP_TOOL_ANNOTATIONS_MAPPING.md`](https://github.com/seunghan91/ainote/blob/main/docs/todo/MCP_TOOL_ANNOTATIONS_MAPPING.md) in the ainote repo.
620
+
621
+ ---
622
+
623
+ ## Agent Compatibility
624
+
625
+ ainote MCP works with any client that speaks Model Context Protocol over stdio or HTTP. Tested setups:
626
+
627
+ ### Claude Desktop / Claude Code (stdio via this npm package)
628
+
629
+ ```json
630
+ {
631
+ "mcpServers": {
632
+ "ainote": {
633
+ "command": "npx",
634
+ "args": ["-y", "@ainote/mcp"],
635
+ "env": { "AINOTE_API_KEY": "..." }
636
+ }
637
+ }
638
+ }
639
+ ```
640
+
641
+ ### Claude Code (direct HTTP — recommended for full feature set)
642
+
643
+ ```json
644
+ {
645
+ "mcpServers": {
646
+ "ainote": {
647
+ "type": "http",
648
+ "url": "https://api.ainote.dev/api/mcp",
649
+ "headers": { "Authorization": "McpKey <YOUR_MCP_KEY>" }
650
+ }
651
+ }
652
+ }
653
+ ```
654
+
655
+ > The `type: "http"` field is required — without it, Claude Code's user-level MCP loader silently rejects the entire `mcpServers` block.
656
+
657
+ ### Cursor / Windsurf (stdio)
658
+
659
+ Same as Claude Desktop config — both editors accept the `command + args + env` shape.
660
+
661
+ ### ChatGPT / OpenAI Custom GPTs
662
+
663
+ Use the hosted HTTP endpoint via OpenAI Connectors or Custom GPT Actions. The MCP JSON-RPC body works as a regular HTTPS POST. An OpenAPI 3.1 mirror of the tool surface is planned (see `docs/todo/AGENT_INTEROP_ROADMAP_2026.md` Phase 1.4).
664
+
665
+ ### LangChain / LangGraph
666
+
667
+ Wrap the HTTP endpoint as a remote tool. Pass `Authorization: McpKey <YOUR_MCP_KEY>` and POST JSON-RPC requests. Tool definitions can be discovered via `tools/list`.
668
+
556
669
  ---
557
670
 
558
671
  ## API Reference
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@ainote/mcp",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
+ "mcpName": "io.github.seunghan91/ainote",
4
5
  "description": "MCP server for AI Note - Tasks, Dev Docs, and multi-device file sync (CLAUDE.md, memory files, Cursor rules, Windsurf rules)",
5
6
  "main": "index.js",
6
7
  "type": "module",