Commit Graph

3 Commits

Author SHA1 Message Date
Test
cc08055e0a feat: MCP server foundation with full tool surface and auto-registration
- 14 MCP tools: vault CRUD, search, list, context, link, frontmatter edit, and 4 UI actions
- Auto-registers Laputa in ~/.claude/mcp.json and ~/.cursor/mcp.json on startup
- WebSocket bridge spawned on app start (port 9710 tools, 9711 UI actions)
- Frontend useMcpRegistration hook for vault-aware registration
- Comprehensive tests: 26 vault.js tests covering all 9 exported functions
- Added gray-matter dependency for frontmatter parsing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 20:18:21 +01:00
lucaronin
7d235d723f feat(ai-chat): WebSocket bridge for MCP vault ops
Add WebSocket bridge connecting MCP server tools to the frontend:
- mcp-server/ws-bridge.js: WebSocket server exposing vault tools
  (read_note, create_note, search_notes, append_to_note)
- src/hooks/useMcpBridge.ts: React hook for typed tool invocations
  with lazy connection, request/response correlation, timeouts
- Vite MCP bridge info endpoint (/api/mcp/info)

Protocol: client sends {id, tool, args}, server responds {id, result}
Default port: 9710 (configurable via WS_PORT env var)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 22:59:00 +01:00
lucaronin
b61d29edd1 feat(mcp-server): vault operation tools
Add Node.js MCP server with 5 vault tools:
- open_note / read_note: read markdown file content
- create_note: create new note with frontmatter and title
- search_notes: search by title or content substring
- append_to_note: append text to existing note

Uses @modelcontextprotocol/sdk with stdio transport.
VAULT_PATH env var configures the vault directory.
10 passing tests covering all operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 22:57:39 +01:00