Task Scheduler MCP 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., "@Task Scheduler MCP Servercreate a daily backup task at 2am"
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.
Task Scheduler MCP Server
A cross-platform stdio MCP server that provides AI agents a controlled interface to OS-native task schedulers. Supports Windows (Task Scheduler), Linux (crontab), and macOS (launchd).
Supported Platforms
Platform | Scheduler | Trigger Support |
Windows | Task Scheduler |
|
Linux | crontab |
|
macOS | launchd |
|
Note: on_event trigger is Windows-only. On Linux/macOS, use file watching or polling instead.
Related MCP server: cron-mcp
Architecture
The server uses a platform abstraction layer with independent implementations per OS:
src/
├── index.ts # MCP server (OS-agnostic)
├── types.ts # Shared type definitions
├── xml-builder.ts # Windows XML generation
└── platform/
├── interface.ts # PlatformScheduler interface
├── factory.ts # OS detection + factory
├── paths.ts # Centralized path management
├── logger.ts # Shared JSON-lines logger
├── lock.ts # File locking utilities
├── triggers.ts # Trigger normalization
├── windows/
│ ├── scheduler.ts # Windows Task Scheduler
│ └── credentials.ts # Windows Credential Manager
├── linux/
│ └── scheduler.ts # crontab implementation
└── macos/
└── scheduler.ts # launchd implementationDirectory Structure
All data is stored in ~/.agentic_tasks/ (or ~\.agentic_tasks\ on Windows):
~/.agentic_tasks/
├── tasks/ # Task definitions (JSON files)
├── logs/ # JSON-lines logs
│ ├── agentic_tasks.log # Full log
│ └── {task_name}.log # Per-task logs
├── config/ # Configuration
│ └── credentials.json # Credentials (Linux/macOS)
└── dist/ # Compiled TypeScriptPrerequisites
All Platforms
Node.js 18+
Windows
PowerShell 5.1+
Administrator privileges (for setup)
Linux
crontabcommandatcommand (foroncetrigger)
macOS
launchctlcommand (standard on macOS)
Setup
Windows
Run the setup script as Administrator:
powershell -ExecutionPolicy Bypass -File setup.ps1The setup script will:
Create the
agentic_workerlocal userEnable WinRM for PowerShell remoting
Create the
\agentic_tasksTask Scheduler folderSet folder permissions
Store credentials in Windows Credential Manager
Build the MCP server
Linux
chmod +x setup-linux.sh
./setup-linux.shmacOS
chmod +x setup-macos.sh
./setup-macos.shMCP Server Configuration
Add this to your opencode.json:
Windows
{
"mcpServers": {
"task-scheduler": {
"command": "node",
"args": ["C:\\Users\\<username>\\.agentic_tasks\\dist\\index.js"]
}
}
}Linux/macOS
{
"mcpServers": {
"task-scheduler": {
"command": "node",
"args": ["/home/<username>/.agentic_tasks/dist/index.js"]
}
}
}Available Tools
create_task
Create a new scheduled task.
Parameters:
name(required): Task name (no path separators or invalid characters)description(optional): Task descriptioncommand(required): Command to executearguments(optional): Command argumentsworking_directory(optional): Working directory for the commandtriggers(required): Array of trigger definitions (see below)conditions(optional): Task conditions (idle,ac_power)settings(optional): Task settingsenabled(optional): Whether the task is enabled (default: true)
Trigger Types:
{ "type": "once", "datetime": "2024-12-25T10:00:00" }
{ "type": "daily", "time": "09:00", "interval_days": 1 }
{ "type": "weekly", "time": "09:00", "days_of_week": ["monday", "wednesday", "friday"], "interval_weeks": 1 }
{ "type": "on_logon" }
{ "type": "on_event", "channel": "Application", "id": 1000 }Example:
{
"name": "daily_backup",
"description": "Daily backup task",
"command": "powershell.exe",
"arguments": "-File C:\\Scripts\\backup.ps1",
"triggers": [
{ "type": "daily", "time": "02:00" }
]
}delete_task
Delete a scheduled task.
Parameters:
name(required): Task name
update_task
Update an existing scheduled task.
Parameters:
name(required): Task nameAll other parameters from
create_taskare optional (only specified fields are updated)
list_tasks
List all scheduled tasks.
Parameters: None
get_task
Get detailed information about a specific scheduled task.
Parameters:
name(required): Task name
get_task_log
Get execution log for a specific task.
Parameters:
name(required): Task namemax_events(optional): Maximum number of events to return (default: 50)level(optional): Filter by event level:"information","warning", or"error"
get_full_log
Get execution log for all tasks.
Parameters:
max_events(optional): Maximum number of events to return (default: 100)level(optional): Filter by event level:"information","warning", or"error"
Testing
The project includes three types of tests:
1. Unit Tests (Vitest)
Test individual functions in isolation:
npm test # Run all unit tests
npm run test:watch # Run tests in watch mode
npm run test:coverage # Run tests with coverage reportUnit tests cover:
Trigger conversion (cron, plist, Windows XML)
Path resolution
Logger operations
File locking
XML builder
2. Integration Tests
Test the full MCP server workflow via stdio JSON-RPC:
Windows
powershell -ExecutionPolicy Bypass -File test_scripts\run_all_tests.ps1Linux/macOS
./test_scripts/run_tests.shIntegration tests cover:
Task creation, update, deletion
Task listing and retrieval
Log retrieval
Error handling
3. Manual Testing with MCP Inspector
The MCP Inspector is an official debugging tool for MCP servers. It provides a web UI for manually testing tools.
Running MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.jsThis opens a web interface at http://localhost:5173 where you can:
View Available Tools: See all 7 tools with their schemas
Test Tools Manually: Invoke tools with custom parameters
Inspect Requests/Responses: View the full JSON-RPC payloads
Debug Issues: See error messages and stack traces
Example: Testing create_task
Open the MCP Inspector web UI
Click on "Tools" tab
Select "create_task" from the dropdown
Enter parameters:
{ "name": "test_manual", "command": "cmd.exe", "arguments": "/c echo manual test", "triggers": [ { "type": "once", "datetime": "2099-01-01T00:00:00" } ] }Click "Run Tool"
View the response in the right panel
Example: Testing list_tasks
Select "list_tasks" from the dropdown
Leave parameters empty (no parameters required)
Click "Run Tool"
View the list of tasks in the response
Troubleshooting with MCP Inspector
If a tool fails:
Check the "Error" tab for detailed error messages
Verify the request payload matches the tool schema
Check server logs in the terminal where you ran the inspector
Use the "Resources" tab to inspect server state
Running All Tests
To run the complete test suite (unit + integration + error handling):
# Windows
powershell -ExecutionPolicy Bypass -File test_scripts\run_all_tests.ps1
# Linux/macOS
./test_scripts/run_tests.shLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Schedule tasks for later from your AI agent: reminders, delayed webhooks, recurring jobs.
Schedule and manage recurring or one-shot tasks
- golemryOAuthcom.golemry
Create and manage scheduled, guarded AI agent jobs with built-in quality control and 900+ connectors
AI-native task management: list, create, update and archive tasks with rich context for AI agents
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables creation and management of scheduled tasks with interval, cron, or one-time triggers. Persists tasks in SQLite and supports MCP sampling to automatically invoke AI agents when schedules trigger.12 npm3MIT
- AlicenseAqualityBmaintenanceEnables AI agents to parse, validate, explain, and preview cron expressions, surfacing common silent bugs before deployment.434 npmMIT
- AlicenseNot gradedqualityBmaintenanceProvides 13 tools for AI agents to manage tasks, calendar, and goals in TaskPilot, a local-first desktop task manager with a permissioned agent runner and review workflows.MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that lets AI agents manage cron jobs through natural language — adding, listing, pausing, removing, running, and viewing logs of scheduled jobs with plain-English schedule parsing, automatic log capture, missed-run detection, and failure alerts.MIT