MCP server by akkki007
MCP Task Management Server
A Model Context Protocol (MCP) server for task management with Google Calendar integration, powered by OpenRouter's MiMo-V2-Flash model.
Features
- Task extraction and management from natural language messages
- Google Calendar integration for automatic event creation
- Task status management (create, update, complete, cancel)
- Similarity-based task matching using embeddings
- Background workers for automatic message processing
Prerequisites
- Node.js 18+ installed
- npm or yarn package manager
- Access to the following services:
- Supabase (database)
- Cohere (embeddings)
- OpenRouter (LLM via MiMo-V2-Flash)
- Google Calendar API (for calendar integration)
Setup Instructions
1. Install Dependencies
npm install
2. Configure Environment Variables
Create a .env file in the root directory by copying the example:
cp .env.example .env
Then edit .env and fill in your API keys and credentials:
# Supabase Configuration
SUPABASE_URL=your_supabase_project_url
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Cohere API Key (for embeddings)
COHERE_API_KEY=your_cohere_api_key
# OpenRouter API Key (for MiMo-V2-Flash model)
OPENROUTER_API_KEY=your_openrouter_api_key
# Google Calendar OAuth Configuration
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI=http://localhost:3000/auth/callback
# Optional: OpenRouter headers for tracking
OPENROUTER_REFERER_URL=https://github.com
OPENROUTER_APP_NAME=MCP Task Management Server
3. Get API Keys
Supabase
- Go to supabase.com
- Create a new project or use an existing one
- Get your project URL and service role key from Project Settings > API
Cohere
- Go to cohere.com
- Sign up/login and create an API key
- Copy your API key
OpenRouter
- Go to openrouter.ai
- Sign up/login and create an API key
- Copy your API key
Google Calendar
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google Calendar API
- Create OAuth 2.0 credentials
- Set authorized redirect URIs
- Copy Client ID and Client Secret
Running the Server
Development Mode (Recommended)
Run the server directly with TypeScript:
npm start
This uses ts-node to run the TypeScript file directly without compilation.
Production Mode
- Build the TypeScript code:
npm run build
This compiles TypeScript to JavaScript in the dist/ directory (or root if no outDir is specified).
- Run the compiled JavaScript:
node index.js
Or if you have an outDir configured:
node dist/index.js
Using with Claude for Desktop
To use this MCP server with Claude for Desktop:
-
Find the absolute path to your server file:
# Windows (PowerShell) (Get-Location).Path # macOS/Linux pwd -
Edit Claude Desktop config:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add your server configuration:
{ "mcpServers": { "task-management": { "command": "node", "args": ["C:\\Users\\aksha\\OneDrive\\Desktop\\mcp-server\\index.js"] } } }For development (using ts-node):
{ "mcpServers": { "task-management": { "command": "npx", "args": ["ts-node", "C:\\Users\\aksha\\OneDrive\\Desktop\\mcp-server\\index.ts"] } } } -
Restart Claude Desktop (fully quit and reopen)
Available Tools
The server exposes the following MCP tools:
process_task_message- Process messages to extract and manage tasksget_tasks- Retrieve tasks for specific userssync_calendar_auth- Store Google Calendar authentication tokenscheck_calendar_eligibility- Check if a user has valid Google Calendar auth
Troubleshooting
Server won't start
- Check that all environment variables are set in
.env - Verify Node.js version:
node --version(should be 18+) - Check that all dependencies are installed:
npm install
Module not found errors
- Run
npm installagain - Delete
node_modulesandpackage-lock.json, thennpm install - Check that you're running from the correct directory
TypeScript errors
- Verify
ts-nodeis installed:npm install -D ts-node typescript - Check
tsconfig.jsonconfiguration - Try building first:
npm run build
Connection issues with MCP clients
- Ensure the server is running before connecting
- Check logs for errors (MCP servers use stderr for logging)
- Verify the path in Claude Desktop config is absolute and correct
- On Windows, use forward slashes
/or double backslashes\\in paths
Development
Project Structure
index.ts- Main server file with all tool implementationspackage.json- Dependencies and scriptstsconfig.json- TypeScript configuration.env- Environment variables (not in git)
Testing
Test your server locally before connecting to Claude Desktop:
# Start the server
npm start
# The server will listen on stdin/stdout for MCP protocol messages
License
MIT