Christian Gick 00de7f1299 Add database migrations for session context system
Phase 1: Database Schema Implementation
- Migration 010: Sessions table with bulletproof auto-incrementing
  - Unique session IDs across all projects
  - Per-project session numbers (1, 2, 3, ...)
  - Atomic sequence generation (no race conditions)
  - Session-task and session-commit linking
  - Semantic search with pgvector HNSW indexes

- Migration 011: Memories table with enhanced schema
  - Migrated existing session_memories to memories
  - Added session_id and task_id foreign keys
  - Renamed columns for consistency
  - HNSW indexing for semantic search

- Migration 012: Builds table for CI/CD tracking
  - Links builds to sessions and versions
  - Tracks build status, timing, and metadata

All migrations tested and verified on agiliton database.

Related: CF-167 (Fix shared session-summary.md file conflict)
2026-01-17 07:41:03 +02:00

Task MCP Server

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

Requirements

  • SSH tunnel to docker-host: ssh -L 5432:localhost:5432 docker-host -N &
  • PostgreSQL with pgvector on docker-host (CI stack postgres container)
  • CI postgres must be running: ssh docker-host "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%