damir-manapov/hands-on-mcp-server
If you are the rightful owner of hands-on-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A creative Model Context Protocol (MCP) server with an in-memory database for task management.
Task Manager MCP Server
A creative Model Context Protocol (MCP) server with an in-memory database for task management. This server provides tools, resources, and prompts for managing users, projects, tasks, tags, and comments.
Features
- 🗄️ In-Memory Database: Fast, lightweight data storage using JavaScript objects
- 🛠️ Rich Tool Set: 20+ tools for CRUD operations, search, and analytics
- 📚 Resources: Access to users, projects, tasks, tags, and statistics
- 💬 Prompts: Pre-built templates for common operations
- 🧪 Fully Tested: Comprehensive test suite with Vitest
- 📝 Type-Safe: Full TypeScript support with strict typing
Tech Stack
- TypeScript - Type-safe development
- pnpm - Fast, efficient package manager
- ESLint - Code linting
- Prettier - Code formatting
- Vitest - Testing framework
- tsx - TypeScript execution
- @modelcontextprotocol/sdk - MCP SDK
Installation
# Install dependencies
pnpm install
# Build the project
pnpm build
# Run in development mode
pnpm dev
# Run tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Format code
pnpm format
# Lint code
pnpm lint
Data Models
User
id: Unique identifiername: Full nameemail: Email addressrole: admin | user | viewercreatedAt,updatedAt: Timestamps
Project
id: Unique identifiername: Project namedescription: Project descriptionownerId: Owner user IDstatus: active | archived | completedcreatedAt,updatedAt: Timestamps
Task
id: Unique identifiertitle: Task titledescription: Task descriptionprojectId: Associated project IDassigneeId: Assigned user ID (nullable)status: todo | in-progress | review | donepriority: low | medium | high | urgentdueDate: Due date (nullable)tags: Array of tag IDscreatedAt,updatedAt: Timestamps
Tag
id: Unique identifiername: Tag namecolor: Hex color codecreatedAt: Timestamp
Comment
id: Unique identifiertaskId: Associated task IDuserId: Comment author IDcontent: Comment textcreatedAt,updatedAt: Timestamps
Tools
User Management
create_user- Create a new userget_user- Get user by IDlist_users- List all users
Project Management
create_project- Create a new projectget_project- Get project by IDlist_projects- List all projects (optionally filtered by owner)
Task Management
create_task- Create a new taskget_task- Get task by IDlist_tasks- List tasks with filters (project, assignee, status, tag)update_task- Update task propertiesdelete_task- Delete a tasksearch_tasks- Search tasks by title/description
Tag Management
create_tag- Create a new taglist_tags- List all tags
Comments
add_comment- Add a comment to a taskget_task_comments- Get all comments for a task
Analytics
get_task_statistics- Get overall task statisticsget_project_statistics- Get statistics for a specific project
Resources
Access data through MCP resources:
task-manager://users- All userstask-manager://projects- All projectstask-manager://tasks- All taskstask-manager://tags- All tagstask-manager://statistics- Task statistics
Prompts
Pre-built prompts for common operations:
- create_task_template - Template for creating tasks with best practices
- task_status_update - Template for updating task status with validation
- project_summary - Generate comprehensive project summary
- user_workload - Analyze user workload and task distribution
- urgent_tasks_report - Generate report of urgent and overdue tasks
Usage Example
The server comes pre-populated with sample data:
- 2 users (Alice and Bob)
- 1 project (Web Application)
- 2 tasks (Design UI, Fix login bug)
- 3 tags (frontend, backend, bug)
- 1 comment
You can interact with the server using any MCP-compatible client.
Development
Project Structure
src/
├── index.ts # Main MCP server implementation
├── database.ts # In-memory database with all operations
├── types.ts # TypeScript type definitions
└── database.test.ts # Test suite
Adding New Features
- Add types to
src/types.tsif needed - Add database operations to
src/database.ts - Add tools/resources/prompts to
src/index.ts - Add tests to
src/database.test.ts
Testing
Unit Tests
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run with coverage
pnpm test:coverage
Testing with MCP Inspector
You can test the MCP server interactively using the MCP Inspector tool:
pnpm build && npx @modelcontextprotocol/inspector node dist/index.js
Note: When using the inspector, always use the built server (node dist/index.js) rather than pnpm dev, as pnpm's output can interfere with JSON-RPC communication over stdio.
The inspector will open a web interface where you can:
- Browse all available tools
- Test tools with different parameters
- View resources
- Try prompts
- See request/response details
License
MIT