Christian Gick fe2b1a0423 fix: Remove redundant session_id validation in memoryAdd (CF-195)
Problem: session_id validation added extra SELECT query before each
memory insertion, causing session-start delays.

Root cause: Foreign key constraint already enforces referential
integrity (migrations/011_memories.sql:16-19). Validation was redundant.

Solution: Remove validation (lines 50-59 in memories.ts). Let database
handle referential integrity with proper error messages.

Benefits:
- Faster memoryAdd calls (one less query)
- Proper error messages from PostgreSQL on constraint violations
- No silent NULL conversion for invalid session_ids

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 10:37:50 +02:00

Task MCP Server

Exposes task management tools via Model Context Protocol. Uses PostgreSQL with pgvector for semantic search.

Requirements

  • SSH tunnel to services: ssh -L 5432:localhost:5432 services -N &
  • PostgreSQL with pgvector on services (CI stack postgres container)
  • CI postgres must be running: ssh services "cd /opt/docker/ci && docker compose up -d postgres"

Configuration

Add to ~/.claude/settings.json under mcpServers:

{
  "task-mcp": {
    "command": "node",
    "args": ["/path/to/task-mcp/dist/index.js"],
    "env": {
      "DB_HOST": "localhost",
      "DB_PORT": "5432",
      "DB_NAME": "agiliton",
      "DB_USER": "agiliton",
      "DB_PASSWORD": "<from /opt/docker/ci/.env>",
      "LLM_API_URL": "https://llm.agiliton.cloud",
      "LLM_API_KEY": "sk-master-..."
    }
  }
}

Tools

Tool Description
task_add Create task with auto-generated ID and embedding
task_list List tasks with filters (project, status, type, priority)
task_show Show task details including checklist and dependencies
task_close Mark task as completed
task_update Update task fields
task_similar Find semantically similar tasks using pgvector
task_context Get related tasks for current work context
task_link Create dependency between tasks
task_checklist_add Add checklist item to task
task_checklist_toggle Toggle checklist item

Build

npm install
npm run build

Development

npm run dev  # Run with tsx (no build)
Description
Session management MCP server
Readme 522 KiB
Languages
TypeScript 73.8%
JavaScript 19.5%
PLpgSQL 6.3%
Shell 0.3%