fix: align MCP server schema with memento-note + per-request user isolation
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 12s

- Remove `embedding` column from MCP Note model (dropped by migration 20260425120000)
- Add missing columns: trashedAt, dismissedFromRecent, contentUpdatedAt, cardSizeMode
- Add NoteEmbedding model and Label.notebook relation
- Use AsyncLocalStorage to pass authenticated userId from API key to tool handlers
- Enable SSE mode and auth in docker-compose for N8N integration

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 14:44:01 +02:00
parent 9779dd7a79
commit 2f1837560b
5 changed files with 63 additions and 18 deletions

View File

@@ -0,0 +1,7 @@
import { AsyncLocalStorage } from 'async_hooks';
/**
* Per-request context storage for passing authenticated userId
* from Express middleware to MCP tool handlers.
*/
export const requestContext = new AsyncLocalStorage();