Implemented 8 new session management tools: - session_start: Initialize session with metadata tracking - session_update: Update session metrics during execution - session_end: Close session with summary and embedding - session_list: List sessions with filtering - session_search: Semantic search across sessions - session_context: Get complete session context (tasks, commits, builds, memories) - build_record: Link builds to sessions and versions - session_commit_link: Link commits to sessions Enhanced existing tools: - memory_add: Added session_id and task_id parameters - Updated all memory queries to use 'memories' table (renamed from session_memories) Implementation: - Created src/tools/sessions.ts with all session operations - Updated src/tools/memories.ts for new schema - Added 8 session tool definitions to src/tools/index.ts - Registered all session tools in src/index.ts switch statement - TypeScript compilation successful Related: CF-167 (Fix shared session-summary.md file conflict)
60 lines
1.6 KiB
Markdown
60 lines
1.6 KiB
Markdown
# 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`:
|
|
|
|
```json
|
|
{
|
|
"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
|
|
|
|
```bash
|
|
npm install
|
|
npm run build
|
|
```
|
|
|
|
## Development
|
|
|
|
```bash
|
|
npm run dev # Run with tsx (no build)
|
|
```
|