Files
Momento/mcp-server/N8N-CONFIG.md
Antigravity 0ebf10344d
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 55s
feat(mcp): add all 4 note types, translate N8N docs to English, add N8N workflow examples
- tools.js: expose type enum ['text','markdown','richtext','checklist'] in create_note & update_note
  - default changed from 'text' to 'richtext' (matches Prisma schema)
  - isMarkdown marked as deprecated in favour of type='markdown'
- N8N-CONFIG.md: full French → English translation
- N8N-WORKFLOWS.md: full French → English translation
- N8N-EXAMPLES.md: new comprehensive examples for all 22 MCP tools + workflow patterns
- n8n-workflow-mcp-reminder-bot.json: cron → get_due_reminders → Telegram → mark done
- n8n-workflow-mcp-email-to-note.json: IMAP → create_note → urgent Slack alert
- n8n-workflow-mcp-daily-digest.json: 8AM cron → notes + reminders digest → save + Slack
- n8n-workflow-mcp-webhook-to-note.json: universal webhook → create_note → respond
- notebooks-list.tsx: fix truncated notebook names (pe-24→pe-14), replace hover overlay with Tooltip
2026-05-03 20:49:11 +00:00

132 lines
3.4 KiB
Markdown

# N8N Configuration — Memento MCP Server
## MCP Client Setup in N8N
The MCP server uses **Streamable HTTP** transport (replaces the legacy SSE transport).
### 1. Generate an API Key
In Memento: **Settings > MCP > Generate a key**
The key has the format `mcp_sk_...` and is scoped to your user account. Only your notes will be accessible.
### 2. Configure the MCP Client Node in N8N
1. Add an **MCP Client** node to your workflow
2. **Server Transport**: `Streamable HTTP`
3. **MCP Endpoint URL**: `http://memento-mcp:3001/mcp` (Docker) or `http://YOUR_IP:3001/mcp`
4. **Authentication**: Header Auth
- Header Name: `x-api-key`
- Header Value: your API key (`mcp_sk_...`)
### Alternative: curl
```bash
# Health check
curl -H "x-api-key: mcp_sk_yourkey" http://localhost:3001/
# List available tools
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-H "x-api-key: mcp_sk_yourkey" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'
# Create a note
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-H "x-api-key: mcp_sk_yourkey" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "create_note",
"arguments": {
"title": "My note",
"content": "Note content here"
}
}
}'
```
## Available Tools (22)
### Notes (11)
| Tool | Description |
|------|-------------|
| `create_note` | Create a note |
| `get_notes` | List notes |
| `get_note` | Get a note by ID |
| `update_note` | Update a note |
| `delete_note` | Delete a note |
| `search_notes` | Search by keyword |
| `move_note` | Move to a notebook |
| `toggle_pin` | Pin / unpin |
| `toggle_archive` | Archive / unarchive |
| `export_notes` | Export as JSON |
| `import_notes` | Import from JSON |
#### Note Types
| `type` value | Description |
|--------------|-------------|
| `richtext` | Rich text editor — **default** |
| `markdown` | Markdown rendered (use instead of `isMarkdown`) |
| `text` | Plain text |
| `checklist` | Interactive checklist with `checkItems` |
### Notebooks (6)
| Tool | Description |
|------|-------------|
| `create_notebook` | Create a notebook |
| `get_notebooks` | List all notebooks |
| `get_notebook` | Get notebook details |
| `update_notebook` | Update a notebook |
| `delete_notebook` | Delete a notebook |
| `reorder_notebooks` | Reorder notebooks |
### Labels (4)
| Tool | Description |
|------|-------------|
| `create_label` | Create a label |
| `get_labels` | List labels |
| `update_label` | Update a label |
| `delete_label` | Delete a label |
### Reminders (1)
| Tool | Description |
|------|-------------|
| `get_due_reminders` | Get due reminders |
## HTTP Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/` | GET | Health check |
| `/mcp` | GET/POST | Main MCP endpoint |
| `/sse` | GET/POST | Legacy (redirects to `/mcp`) |
| `/sessions` | GET | Active sessions |
## Security
- **Authentication required** in production (`MCP_REQUIRE_AUTH=true` in Docker)
- API keys are managed from **Settings > MCP** in Memento
- Each key is scoped to a single user: only their notes are accessible
- Keys are hashed in the database (SHA256); the raw key is only shown once at creation
## Ports
| Service | Port | URL |
|---------|------|-----|
| Memento UI | 3000 | http://localhost:3000 |
| MCP Server | 3001 | http://localhost:3001/mcp |