Task Guardian MCP

Task Guardian MCP

A Model Context Protocol server for intelligent task management in AI-powered development environments, providing file-based storage, dependency management with cycle detection, and an interactive CLI.

Category
Visit Server

README

Task Guardian MCP

A Model Context Protocol (MCP) server for intelligent task management in AI-powered development environments like Cursor.

Features

  • šŸ“ File-based storage - Tasks stored as JSON files in .task/ directory
  • šŸ”¢ Sequential IDs - Simple, incremental task numbering
  • šŸ”— Typed dependencies - Model relationships between tasks (blocks, requires, related-to)
  • šŸ”„ Cycle detection - Prevents circular dependencies at creation time
  • šŸ“ Rich descriptions - Full markdown support with code blocks and checklists
  • šŸŽÆ Task types - Support for user stories, tasks, and bugs
  • šŸ” Advanced querying - Filter, sort, and search tasks
  • ⚔ Batch operations - Create or update multiple tasks at once
  • šŸ“¦ Custom metadata - Store project-specific attributes on tasks
  • šŸ–„ļø Interactive CLI - Beautiful terminal UI for viewing tasks with Ink and React

Installation

From npm (recommended)

npx task-guardian-mcp

From source

pnpm install

Usage

Running the Server

Start the MCP server:

pnpm start

For development with auto-reload:

pnpm dev

CLI Tool

View tasks in your project using an interactive terminal UI:

pnpm cli

The CLI reads from the .task directory in your current working directory and displays tasks in a beautiful, color-coded table with interactive navigation.

Features:

  • šŸŽÆ Navigate through tasks with arrow keys
  • šŸ‘ļø View detailed information for any task
  • šŸŽØ Color-coded status, priority, and type indicators
  • šŸ” Filter tasks by status, priority, or type
  • āŒØļø Full keyboard navigation

Options:

  • --status <status> - Filter by status (pending|in_progress|completed|blocked|cancelled)
  • --priority <priority> - Filter by priority (low|medium|high|critical)
  • --type <type> - Filter by type (user_story|task|bug)
  • --help - Show help message

Examples:

# List all tasks
pnpm cli

# List in-progress tasks only
pnpm cli --status in_progress

# List high priority tasks
pnpm cli --priority high

# Combine filters
pnpm cli --status pending --priority critical

Keyboard shortcuts:

In List View:

  • ↑/↓ or j/k - Navigate through tasks (vim-style supported)
  • Enter - View selected task details
  • q - Quit the application
  • Ctrl+C - Exit

In Detail View:

  • Use your terminal's native scrolling (mouse wheel, trackpad, or terminal scroll commands)
  • Esc or b - Back to list
  • q - Quit the application

Cursor Integration

Add Task Guardian to your Cursor MCP configuration:

Location: ~/.cursor/config/mcp_settings.json

Using npx (recommended)

{
  "mcpServers": {
    "task-guardian": {
      "command": "npx",
      "args": ["-y", "task-guardian-mcp"]
    }
  }
}

From source

{
  "mcpServers": {
    "task-guardian": {
      "command": "node",
      "args": ["/absolute/path/to/task-guardian-mcp/dist/index.mjs"]
    }
  }
}

Replace /absolute/path/to/task-guardian-mcp with the actual path to this repository on your machine.

Task Schema

Tasks are stored in .task/task-{id}.json with the following structure:

{
  id: number;              // Sequential ID (1, 2, 3, ...)
  title: string;           // Task title (1-200 chars)
  description: string;     // Markdown-formatted description
  status: 'pending' | 'in_progress' | 'completed' | 'blocked' | 'cancelled';
  priority: 'low' | 'medium' | 'high' | 'critical';
  type: 'user_story' | 'task' | 'bug';
  dependencies: Array<{
    taskId: number;
    type: 'blocks' | 'requires' | 'related-to';
    description?: string;
  }>;
  createdAt: string;       // ISO8601 timestamp
  updatedAt: string;       // ISO8601 timestamp
  [key: string]: any;      // Custom metadata fields
}

Available Tools

Core Operations

  • create_task - Create a new task
  • get_task - Retrieve a task by ID
  • update_task - Update task fields
  • delete_task - Delete a task (with dependency check)
  • list_tasks - List tasks with optional filtering
  • query_tasks - Advanced search with sorting and pagination

Dependency Management

  • add_dependency - Add a typed dependency (with cycle detection)
  • remove_dependency - Remove a dependency link

Batch Operations

  • create_tasks - Create multiple tasks at once
  • update_tasks - Update multiple tasks at once

Examples

Creating a Task

{
  "title": "Implement OAuth2 authentication",
  "description": "## Overview\n\nAdd OAuth2 support using Google identity provider.\n\n## Acceptance Criteria\n\n- [ ] User can login with Google\n- [ ] JWT tokens generated\n- [ ] Token refresh works",
  "priority": "high",
  "type": "task"
}

Adding Dependencies

{
  "fromTaskId": 5,
  "toTaskId": 3,
  "type": "blocks",
  "description": "OAuth requires database setup first"
}

Querying Tasks

{
  "filters": {
    "status": ["in_progress", "blocked"],
    "priority": ["high", "critical"],
    "titleContains": "auth"
  },
  "sort": {
    "field": "priority",
    "order": "desc"
  },
  "limit": 10
}

Architecture

  • Types (src/types/) - Type definitions and constants using as const pattern
  • Schemas (src/schemas/) - Zod validation schemas with type inference
  • Services (src/services/) - Business logic for tasks and dependencies
  • Tools (src/tools/) - MCP tool implementations
  • Index (src/index.ts) - MCP server entry point

Development

Type checking:

pnpm typecheck

Build:

pnpm build

File Structure

.task/
ā”œā”€ā”€ .meta.json           # Stores last task ID
ā”œā”€ā”€ task-1.json          # Individual task files
ā”œā”€ā”€ task-2.json
└── archive/             # Archived completed tasks
    └── task-old.json

TypeScript Best Practices

This project follows modern TypeScript patterns:

  • āœ… as const objects instead of enums
  • āœ… Zod schema inference for single source of truth
  • āœ… Result types for error handling
  • āœ… readonly modifiers for immutability
  • āœ… type over interface for data shapes
  • āœ… Permissive validation with .passthrough()

License

MIT

Related

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured