refactor: remove dangerous, AI proxy, and API key tools from MCP server

- Remove delete_all_notes, 11 AI proxy tools, 3 API key management tools
- Clean up unused imports (auth helpers, resolveUser, clearAuthCaches)
- Remove fetchWithTimeout helper and appBaseUrl option (no longer needed)
- Update tool counts in health endpoint and startup banner (37 → 22 tools)
- Keep only CRUD notes/notebooks/labels + reminders + search/export/import

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 16:15:50 +02:00
parent 4b6f0f9526
commit 49e076a4bb
2 changed files with 9 additions and 448 deletions

View File

@@ -232,9 +232,7 @@ const server = new Server(
},
);
registerTools(server, prisma, {
appBaseUrl,
});
registerTools(server, prisma);
// ── HTTP Endpoints ──────────────────────────────────────────────────────────
@@ -252,13 +250,11 @@ app.get('/', (req, res) => {
method: 'x-api-key or x-user-id header',
},
tools: {
notes: 12,
notes: 11,
notebooks: 6,
labels: 4,
ai: 11,
reminders: 1,
apiKeys: 3,
total: 37,
total: 22,
},
performance: {
optimizations: [
@@ -358,11 +354,11 @@ Performance Optimizations:
✅ Request timeout handling
✅ Session cleanup
Tools (37 total):
Notes (12):
Tools (22 total):
Notes (11):
create_note, get_notes, get_note, update_note, delete_note,
delete_all_notes, search_notes, move_note, toggle_pin,
toggle_archive, export_notes, import_notes
search_notes, move_note, toggle_pin, toggle_archive,
export_notes, import_notes
Notebooks (6):
create_notebook, get_notebooks, get_notebook, update_notebook,
@@ -371,18 +367,9 @@ Tools (37 total):
Labels (4):
create_label, get_labels, update_label, delete_label
AI (11):
generate_title_suggestions, reformulate_text, generate_tags,
suggest_notebook, get_notebook_summary, get_memory_echo,
get_note_connections, dismiss_connection, fuse_notes,
batch_organize, suggest_auto_labels
Reminders (1):
get_due_reminders
API Key Management (3):
generate_api_key, list_api_keys, revoke_api_key
N8N config: SSE endpoint http://YOUR_IP:${PORT}/mcp
Headers: x-api-key or x-user-id
`);