MCP Task Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Task Servershow me my pending tasks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Task Server
A practical Model Context Protocol (MCP) server built with TypeScript, the MCP SDK, Prisma, and PostgreSQL.
This project demonstrates the core MCP server concepts through a simple task management system:
Tools — execute operations such as creating, updating, deleting, and listing tasks.
Resources — expose task data and server information through MCP resource URIs.
Resource Templates — expose individual tasks through dynamic URIs such as task://{id}.
Prompts — provide reusable prompt templates for task review workflows.
MCP Client — a small client used to connect to and test the MCP server.
The project is primarily a hands-on learning project for understanding how MCP works internally and how an MCP server can be connected to a real database.
Tech Stack
TypeScript
Node.js
Model Context Protocol SDK 1.30.0
Prisma 7.10.0
PostgreSQL
Zod
tsx
Related MCP server: Personal Task Manager MCP
Project Structure
src/
├── client/
│ ├── create-task.ts
│ ├── list-tasks.ts
│ ├── get-task.ts
│ ├── update-task.ts
│ ├── delete-task.ts
│ ├── read-server-info.ts
│ └── read-tasks.ts
│
├── db/
│ └── prisma.ts
│
├── generated/
│ └── prisma/
│
├── prompts/
│ └── review-task.ts
│
├── resources/
│ ├── server-info.ts
│ ├── tasks.ts
│ └── task.ts
│
├── services/
│ └── task-service.ts
│
├── tools/
│ ├── create-task.ts
│ ├── list-tasks.ts
│ ├── get-task.ts
│ ├── update-task.ts
│ └── delete-task.ts
│
├── client.ts
└── server.tsMCP Concepts
Tools
Tools are callable operations exposed by the MCP server.
The client can request an operation and receive its result.
Implemented tools:
createTask
listTasks
getTask
updateTask
deleteTaskFor example:
Client
↓
callTool("createTask")
↓
MCP Server
↓
Task Service
↓
PostgreSQL
↓
ResultTools can perform both read and write operations. They are not limited to database mutations.
Resources
Resources expose read-only data through MCP resource URIs.
This project contains:
server://info
tasks://all
task://{id}Examples:
server://inforeturns information about the MCP server.
tasks://allreturns the current tasks.
task://{id}returns a specific task.
Resource Templates
task://{id} is implemented as a resource template.
The {id} part is dynamic:
task://cda5d771-1adb-4d0c-a9bb-0d55c3c2e6f9The server also implements the template list callback, allowing clients to discover concrete task resources.
Prompts
Prompts are reusable prompt templates for specific workflows.
This project includes:
review-taskThe prompt accepts a task ID, loads the task from PostgreSQL, and generates a structured review prompt.
For example:
Review this task:
Title: Learn MCP
Please analyze the task and suggest improvements.Prompts are optional; they are useful when an MCP server wants to provide standardized workflows or instructions rather than only data and operations.
Database
The project uses PostgreSQL with Prisma.
The database contains a simple Task model:
model Task {
id String @id @default(uuid())
title String
completed Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}Environment Variables
Create a .env file:
DATABASE_URL="postgresql://USER:PASSWORD@HOST:5432/DATABASE"Do not commit .env to the repository.
Installation
Clone the repository and install dependencies:
npm installGenerate the Prisma client:
npx prisma generateRun migrations:
npx prisma migrate devRunning the MCP Server
The server uses the MCP stdio transport.
Start it with:
npx tsx src/server.tsThe server communicates through standard input/output, so normal application logs are written to stderr.
Running the Test Client
The project includes a small MCP client for testing the server.
Run:
npx tsx src/client.tsThe client connects to the server through StdioClientTransport and demonstrates:
connecting to the MCP server
listing tools
calling tools
listing resources
reading resources
listing prompts
retrieving prompts
MCP Architecture
The overall architecture looks like this:
┌──────────────────┐
│ MCP Client │
└────────┬─────────┘
│
│ stdio
▼
┌──────────────────┐
│ MCP Server │
├──────────────────┤
│ Tools │
│ Resources │
│ Prompts │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Task Service │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ PostgreSQL │
└──────────────────┘What This Project Demonstrates
The goal of this repository is not to build a full production task management application.
The goal is to understand the MCP protocol and its main server primitives by implementing them against a real database.
The project covers:
MCP server initialization
MCP client initialization
stdio transport
MCP tools
tool arguments with Zod
MCP resources
dynamic resources
resource templates
resource template listing
MCP prompts
prompt arguments
database integration
Prisma
PostgreSQL
client/server communication
License
This project is for learning and demonstration purposes.
This server cannot be deployed
Maintenance
Related MCP Connectors
Local-first task manager: create, edit, and complete tasks, projects, and checklists via MCP.
- DazbenchOAuthapp.dazbench
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Project management MCP for AI agents with safe task reads and writes.
Related MCP Servers
- AlicenseBqualityCmaintenance🧠 A high-performance PostgreSQL-backed MCP server acting as a super memory, task tracker, and dynamic database manager for AI agents. Features built-in connection pooling, a professional tasks schema, and a unique shared multi-agent coordination hub to prevent coding conflicts in real-time.123MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage tasks with full lifecycle support including due dates, priorities, tags, subtasks, and project lists via 19 SQLite-backed MCP tools.4-
- FlicenseAqualityDmaintenanceEnables task management (create, list, update tasks with priority and status) using SQLite storage via MCP tools.3-
- FlicenseNot gradedqualityDmaintenanceA task manager MCP server that demonstrates all three MCP primitives (tools, resources, prompts). Enables users to manage tasks, read task summaries and details, and run structured planning/review prompts through natural language.-