Agent Task Manager MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Agent Task Manager MCP
Enterprise-grade MCP server for managing long-running AI agent tasks across context windows and memory boundaries.
npm install -g agent-task-manager-mcpTable of Contents
Related MCP server: Waymark
The Problem
Context Window Limitation
AI agents operate within a fixed context window (e.g., 100K–200K tokens). Long-running tasks—building a full-stack app, migrating a codebase, implementing 50+ features—exceed this limit. When the context fills up:
┌─────────────────────────────────────────────────────────────────────────┐
│ AGENT CONTEXT WINDOW (e.g., 128K tokens) │
├─────────────────────────────────────────────────────────────────────────┤
│ [System Prompt] [Task Spec] [Code] [History] [Current Work] ... │
│ │
│ ═══════════════════════════════════════════► CONTEXT FULL │
│ │ │
│ ▼ │
│ Agent "forgets" earlier work │
│ No persistent state │
│ Duplicate effort │
│ Inconsistent handoffs │
└─────────────────────────────────────────────────────────────────────────┘Consequences
Issue | Impact |
No persistence | Agent state is lost when context resets |
No handoff | New agent instance has no idea what was done |
Duplicate work | Same features implemented multiple times |
No coordination | Multiple agents can pick the same task |
No audit trail | No record of sessions, progress, or decisions |
The Solution
Agent Task Manager MCP provides a persistent task orchestration layer that lets agents:
Create and decompose large tasks into atomic subtasks
Track progress across sessions with evidence-based verification
Hand off cleanly via structured progress notes and checkpoints
Coordinate via task locking to prevent duplicate work
Recover from failures using named checkpoints
┌──────────────────────────────────────────────────────────────────────────────────┐
│ AGENT TASK MANAGER MCP │
├──────────────────────────────────────────────────────────────────────────────────┤
│ │
│ Agent Session 1 Agent Session 2 Agent Session 3 │
│ (Context Full) (Fresh Context) (Fresh Context) │
│ │ │ │ │
│ │ task_lock │ session_start │ subtask_get_next │
│ │ session_start │ lastProgressNote ◄─────┼── Continuity! │
│ │ subtask_get_next │ subtask_get_next │ │
│ │ [do work] │ [do work] │ │
│ │ subtask_update_status │ checkpoint_save │ │
│ │ session_end │ session_end │ │
│ │ task_unlock │ task_unlock │ │
│ │ │ │ │
│ └─────────────────────────┴─────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌───────────────────────────────┐ │
│ │ Storage (MongoDB/SQLite/JSON) │ │
│ │ Tasks • Subtasks • Sessions │ │
│ │ Checkpoints • Progress │ │
│ └───────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────────────────────┘Architecture Overview
System Diagram
flowchart TB
subgraph Client["AI Client (Claude, Cursor, etc.)"]
Agent[AI Agent]
end
subgraph MCP["agent-task-manager-mcp"]
Server[MCP Server]
Tools[14 Tools]
Server --> Tools
end
subgraph Storage["Persistence"]
DB[(MongoDB / SQLite / JSON)]
end
Agent <-->|stdio or HTTP| Server
Server <-->|Storage Adapter| DB
subgraph ToolsDetail["Tool Categories"]
T1[task_*]
T2[subtask_*]
T3[session_*]
T4[checkpoint_*]
end
Tools --> ToolsDetailComponent Flow
flowchart LR
subgraph Init["Init Phase"]
A1[task_create]
A2[task_lock]
A3[session_start]
A4[subtask_create_bulk]
A5[task_update]
A6[session_end]
A7[task_unlock]
end
subgraph Exec["Execution Phase"]
B1[task_lock]
B2[session_start]
B3[subtask_get_next]
B4[subtask_update_status]
B5[checkpoint_save]
B6[session_end]
B7[task_unlock]
end
Init --> ExecHow It Works
Two-Phase Workflow
Phase | Purpose | When |
Init | Analyze spec, create subtask list, set up context | First session only |
Execution | Work on subtasks incrementally, verify, hand off | Every subsequent session |
Session Lifecycle (Visual)
┌─────────────────────────────────────────────────────────┐
│ SESSION START │
└─────────────────────────────────────────────────────────┘
│
┌─────────────────────────┼─────────────────────────┐
│ ▼ │
│ task_lock(agentId) │
│ │ │
│ ▼ │
│ session_start(phase) │
│ │ │
│ ▼ │
│ ┌─── Read lastProgressNote ───┐ │
│ │ Run initScript if present │ │
│ └─────────────────────────────┘ │
│ │ │
│ ▼ │
│ subtask_get_next() │
│ │ │
│ ┌──────────┴─────────┐ │
│ │ │ │
│ null (done) subtask │
│ │ │ │
│ ▼ ▼ │
│ task_update(completed) [DO THE WORK] │
│ │ │ │
│ │ ▼ │
│ │ subtask_update_status │
│ │ (passed/failed + evidence) │
│ │ │ │
│ │ ▼ │
│ │ checkpoint_save (optional) │
│ │ │ │
│ │ └──► loop │
│ │ back │
│ │ │
└──────────────┼────────────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────┐
│ SESSION END │
│ session_end(progressNote, gitCommit, ...) │
│ task_unlock(agentId) │
└──────────────────────────────────────────────────┘Problem → Solution Mapping
Problem | Solution |
Context overflow |
|
Lost state |
|
Duplicate work |
|
Unclear what's done |
|
Dependency ordering |
|
No continuity |
|
Features
14 MCP tools for full task lifecycle
MongoDB, SQLite, or JSON file storage (configurable)
Zod validation on all tool inputs
Task locking for multi-agent coordination
Evidence-based verification (no passing without proof)
Checkpoint/restore for risky operations
Session handoff with structured progress notes
Quick Start
Prerequisites
Node.js 18+
Storage backend (choose one): MongoDB 6+, PostgreSQL 12+, SQLite (file-based), or JSON file
MCP-compatible client (Claude Desktop, Cursor, ChatGPT Desktop, etc.)
Installation
git clone <repository-url>
cd agent-task-manager-mcp
npm installEnvironment Setup
cp .env.example .env
# Edit .env and set STORAGE (mongodb | postgres | sqlite | json) and the corresponding backend configRun
# Production (compiled)
npm run build
# Stdio mode (default) — for Claude Desktop, Cursor
npm start
node dist/index.js
# HTTP mode (default 8000; auto-finds free port if busy)
npm run start:http
node dist/index.js --http
# HTTPS mode (default 8443; auto-finds free port if busy)
npm run start:https
node dist/index.js --https
# Custom port (node directly — npm eats --port)
node dist/index.js --http --port=3000
# HTTPS with user-provided cert and key (separate files)
agent-task-manager-mcp --https --cert=./certs/cert.pem --key=./certs/key.pem
# HTTPS with combined cert+key file (mkcert, or single PEM with both blocks)
agent-task-manager-mcp --https --cert-key=./certs/localhost.pem
agent-task-manager-mcp --https --cert=./certs/combined.pemConfiguration
Storage Backends
| Use when | Config |
| Production, multi-agent, document store |
|
| Enterprise, high concurrency, swarm of agents |
|
| Local dev, no server, single-file |
|
| Quick testing, single agent |
|
Choosing a Backend
Scenario | Recommended |
Swarm of agents, production |
|
Single agent, local dev |
|
Quick test, no DB setup |
|
Existing MongoDB/Postgres infra | Use matching backend |
Swarm / Multi-Agent
For multiple agents working on tasks concurrently: use PostgreSQL or MongoDB. Both support task locking and concurrent writes. SQLite and JSON are single-writer; fine for one agent but may conflict with multiple.
Environment Variables
Variable | Required when | Description | Example |
| No | Backend: |
|
|
| MongoDB connection string |
|
|
| PostgreSQL connection string |
|
|
| SQLite database file path |
|
|
| JSON file path |
|
| No | Comma-separated hosts for HTTP/HTTPS (ngrok, etc) |
|
MongoDB URI Examples
# Local
MONGODB_URI=mongodb://localhost:27017/agent-tasks
# Remote IP (agent on IP1, MongoDB on IP2)
MONGODB_URI=mongodb://user:password@IP2:27017/agent-tasks?authSource=admin
# MongoDB Atlas (cloud)
MONGODB_URI=mongodb+srv://user:password@cluster.mongodb.net/agent-tasks?retryWrites=true&w=majorityPostgreSQL URI Examples
# Local
POSTGRES_URL=postgresql://user:password@localhost:5432/agent_tasks
# Supabase, Neon, Railway, etc.
DATABASE_URL=postgresql://user:password@host:5432/dbname?sslmode=requireNote: URL-encode special characters in passwords (e.g.,
@→%40).
Integration
Option 1: Global install (recommended)
After npm install -g agent-task-manager-mcp, use the binary name. No path or npx needed.
Claude Desktop — add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"agent-task-manager-mcp": {
"command": "agent-task-manager-mcp",
"args": [],
"env": {
"STORAGE": "mongodb",
"MONGODB_URI": "mongodb://localhost:27017/agent-tasks"
}
}
}
}Cursor — add to MCP settings or .cursor/mcp.json:
{
"mcpServers": {
"agent-task-manager-mcp": {
"command": "agent-task-manager-mcp",
"args": [],
"env": {
"STORAGE": "sqlite",
"SQLITE_PATH": "./data/agent-tasks.db"
}
}
}
}PostgreSQL (swarm of agents, production):
{
"mcpServers": {
"agent-task-manager-mcp": {
"command": "agent-task-manager-mcp",
"args": [],
"env": {
"STORAGE": "postgres",
"POSTGRES_URL": "postgresql://user:password@localhost:5432/agent_tasks"
}
}
}
}No DB server? Use SQLite or JSON:
{
"mcpServers": {
"agent-task-manager-mcp": {
"command": "agent-task-manager-mcp",
"args": [],
"env": {
"STORAGE": "json",
"JSON_STORAGE_PATH": "./data/agent-tasks.json"
}
}
}
}See docs/STORAGE.md for per-backend setup, migration, and troubleshooting.
Option 2: From path
Production (compiled) — run npm run build first, then use node:
{
"mcpServers": {
"agent-task-manager-mcp": {
"command": "node",
"args": ["C:/path/to/agent-task-manager-mcp/dist/index.js"],
"env": {
"STORAGE": "mongodb",
"MONGODB_URI": "mongodb://localhost:27017/agent-tasks"
}
}
}
}Development (source) — no build; uses tsx to run TypeScript directly:
{
"mcpServers": {
"agent-task-manager-mcp": {
"command": "npx",
"args": ["tsx", "C:/path/to/agent-task-manager-mcp/src/index.ts"],
"env": {
"STORAGE": "mongodb",
"MONGODB_URI": "mongodb://localhost:27017/agent-tasks"
}
}
}
}Option 3: HTTP/HTTPS mode (ChatGPT Desktop, ngrok)
MCP Server URL requires an HTTP(S) endpoint. Supports HTTP, HTTPS, self-signed, mkcert, and user-provided certs.
HTTP (with ngrok):
agent-task-manager-mcp --http
ngrok http 8000
# Connector URL: https://<subdomain>.ngrok.app/mcpHTTPS (local, no ngrok):
# Auto-generated self-signed cert
agent-task-manager-mcp --https
# Connector URL: https://localhost:8443/mcp
# With mkcert (locally trusted)
mkcert -install && mkcert localhost 127.0.0.1
agent-task-manager-mcp --https --cert-key=./localhost+1.pem
# With your own cert and key
agent-task-manager-mcp --https --cert=./cert.pem --key=./key.pemHost validation: localhost, 127.0.0.1, ngrok domains (*.ngrok-free.app, *.ngrok.app), and MCP_ALLOWED_HOSTS (comma-separated env var).
ChatGPT Desktop — Settings → Apps & Connectors → Create:
Connector URL:
https://localhost:8443/mcp(HTTPS) orhttps://<ngrok-subdomain>.ngrok.app/mcp(HTTP + ngrok)Authentication: None
Tool Reference
Task Tools (7)
Tool | Description |
| Create top-level task; returns ID for all subsequent ops |
| Get task by ID with subtask summary (total, passed, failed, pending) |
| List tasks with filters (status, phase, tags, pagination) |
| Update status, phase, context, metadata |
| Permanently delete task and all related data |
| Claim exclusive ownership for agentId |
| Release ownership |
Subtask Tools (3)
Tool | Description |
| Create full subtask list in one call; supports |
| Get next pending subtask (deps satisfied, highest priority) |
| Mark passed/failed/blocked; |
Session Tools (2)
Tool | Description |
| Begin session; returns task, lastProgressNote, sessionId |
| Close session with progressNote, gitCommit, status |
Checkpoint Tools (2)
Tool | Description |
| Save named snapshot before risky operations |
| Restore most recent checkpoint by label |
Data Model
Task
├── title, description, status, phase, priority, tags
├── agentId, lockedAt (locking)
├── context: { workingDirectory, initScript, repoUrl, environmentVars }
├── metadata, deadline, completedAt
└── 1:N → Subtask, Session
Subtask
├── taskId, title, description, category, steps
├── status, priority, dependsOn[], agentId
├── attempts, lastError, evidence
└── category: functional | ui | performance | security | test
Session
├── taskId, agentId, phase
├── startedAt, endedAt, status
├── subtasksAttempted[], subtasksCompleted[]
├── progressNote, gitCommit, tokenCount
└── status: active | completed | crashed | timed_out
Checkpoint
├── taskId, sessionId, label
└── snapshot (JSON)Security
Consideration | Recommendation |
MongoDB credentials | Use env vars; never commit |
Network | Use TLS for remote MongoDB; allow only trusted IPs in firewall |
Task locking | Use unique |
Sensitive data | Avoid storing secrets in |
Troubleshooting
Issue | Check |
| When |
| Use |
Connection refused | MongoDB running? Correct host/port? |
Auth failed | Verify username/password; URL-encode special chars |
Tool returns | Inspect |
Task already locked | Another agent holds lock; wait or use |
Project Structure
agent-task-manager-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── db.ts # MongoDB connection (when STORAGE=mongodb)
│ ├── storage/ # Storage abstraction (MongoDB, SQLite, JSON)
│ ├── models/
│ │ ├── Task.ts
│ │ ├── Subtask.ts
│ │ ├── Session.ts
│ │ └── Checkpoint.ts
│ ├── tools/
│ │ ├── task.tools.ts
│ │ ├── subtask.tools.ts
│ │ ├── session.tools.ts
│ │ └── checkpoint.tools.ts
│ └── schemas/
│ └── zod.schemas.ts
├── package.json
├── tsconfig.json
├── .env.example
└── README.mdLicense
Custom Please read the License.md
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared task layer for AI agents: tasks, handoffs and decisions that persist across tools.
Durable agent-to-agent handoffs and shared scratchpad for multi-agent workflows.
Project management for AI agents: tasks, docs, decisions and time in one shared team context.
Durable background job execution, async task scheduling, and state persistence for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables persistent task and goal management with AI-powered decomposition, cross-session continuity, and fault-tolerant multi-agent pipelines.1-
- AlicenseAqualityCmaintenanceShared memory and handoff hub for AI agents, enabling seamless context transfer between sessions with token-budgeted resumes and automatic handoffs.102 npmMIT
- AlicenseAqualityBmaintenanceSelf-hosted task tracker and MCP server for AI coding agents. Append-only case files preserve decisions, failed attempts, questions, and check results across sessions. A live web board lets people track progress and answer agents. Runs locally in Docker and connects to Claude Code, Codex, Cursor, and other Streamable HTTP MCP clients. MIT licensed.306MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to decompose a goal into a dependency-aware task tree, atomically claim and update tasks across parallel subagents in dependency waves, and coordinate through a shared progress board with paged notes and crash-safe, lock-protected persistence.MIT