Q-Scheduler MCP server

Provides robust task scheduling and automation capabilities with cron-based scheduling, supporting shell commands, API calls, content generation, and desktop notifications with sound across Windows, macOS, and Linux.
Back to servers
Setup instructions
Provider
RadiumGu
Release date
Jul 16, 2025
Stats
3 stars

MCP Scheduler is a versatile task automation system that allows you to schedule and run different types of tasks including shell commands, API calls, AI content generation, and desktop notifications. Built on the Model Context Protocol (MCP), it integrates easily with AI assistants and provides comprehensive scheduling control through cron expressions.

Installation

Prerequisites

  • Python 3.10 or higher
  • uv package manager (recommended)

Installing uv (recommended)

# For Mac/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# For Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

After installing uv, restart your terminal to ensure the command is available.

Project Setup with uv (recommended)

# Clone the repository
git clone https://github.com/yourusername/mcp-scheduler.git
cd mcp-scheduler

# Create and activate a virtual environment with uv
uv venv
source .venv/bin/activate  # On Unix/MacOS
# or
.venv\Scripts\activate     # On Windows

# Install dependencies with uv
uv pip install -r requirements.txt

Standard pip installation (alternative)

# Clone the repository
git clone https://github.com/yourusername/mcp-scheduler.git
cd mcp-scheduler

# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate  # On Unix/MacOS
# or
.venv\Scripts\activate     # On Windows

# Install dependencies
pip install -r requirements.txt

Usage

Running the Server

# Activate the virtual environment first
source .venv/bin/activate  # On Unix/MacOS
# or
.venv\Scripts\activate     # On Windows

# Run with default settings (stdio transport)
uv run main.py

# Run with AWS Q integration (recommended for Amazon Q users)
uv run start_with_aws_q.py

# Run with debug mode for detailed logging
uv run main.py --debug

# Run with custom configuration file
uv run main.py --config /path/to/config.json

Integrating with Amazon Q

To use MCP Scheduler with Amazon Q:

  1. Make sure you have Amazon Q CLI installed
  2. Run the scheduler with the AWS Q model patch:
# Start the scheduler with AWS Q integration
uv run start_with_aws_q.py

This will automatically register the scheduler with Amazon Q, allowing you to create and manage tasks through natural language commands.

Example commands:

  • "Create a scheduled task to backup my config file every night at 10:30 PM"
  • "Show me all my scheduled tasks"
  • "Run the backup task now"

Claude Desktop Integration

To use your MCP Scheduler with Claude Desktop:

  1. Make sure you have Claude Desktop installed
  2. Open your Claude Desktop App configuration at:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Create the file if it doesn't exist, and add your server:
{
  "mcpServers": [
    {
      "type": "stdio",
      "name": "MCP Scheduler",
      "command": "python",
      "args": ["/path/to/your/mcp-scheduler/main.py"]
    }
  ]
}

Command Line Options

--address        Server address (default: localhost)
--port           Server port (default: 8080)
--transport      Transport mode (stdio or sse) (default: stdio)
--log-level      Logging level (default: INFO)
--log-file       Log file path (default: mcp_scheduler.log)
--db-path        SQLite database path (default: scheduler.db)
--config         Path to JSON configuration file
--ai-model       AI model to use for AI tasks (default: gpt-4o)
--version        Show version and exit
--debug          Enable debug mode with full traceback
--fix-json       Enable JSON fixing for malformed messages

Configuration File

You can use a JSON configuration file instead of command-line arguments:

{
  "server": {
    "name": "mcp-scheduler",
    "version": "0.1.0",
    "address": "localhost",
    "port": 8080,
    "transport": "stdio"
  },
  "database": {
    "path": "scheduler.db"
  },
  "logging": {
    "level": "INFO",
    "file": "mcp_scheduler.log"
  },
  "scheduler": {
    "check_interval": 5,
    "execution_timeout": 300
  },
  "ai": {
    "model": "gpt-4o",
    "use_aws_q_model": true,
    "openai_api_key": "your-api-key"  // Only needed if not using AWS Q model
  }
}

Important Notes

Task Types and Limitations

MCP Scheduler is an application-level task scheduler, not a system-level scheduler:

  • Tasks are stored in the scheduler's database and only execute while the MCP Scheduler service is running
  • Tasks are not system crontab or systemd timers and won't automatically run on system startup
  • Tasks run with the permissions of the user running MCP Scheduler, not root privileges

Cron Expression Guide

MCP Scheduler uses standard cron expressions for scheduling. Examples:

  • 0 0 * * * - Daily at midnight
  • 0 */2 * * * - Every 2 hours
  • 0 9-17 * * 1-5 - Every hour from 9 AM to 5 PM, Monday to Friday
  • 0 0 1 * * - At midnight on the first day of each month
  • 0 0 * * 0 - At midnight every Sunday

Using MCP Scheduler

Through Amazon Q (Recommended)

Use natural language to create and manage tasks:

  1. Creating a command task:

    Create a scheduled task to backup my database to /backups directory every night at 10:30
    
  2. Creating an API call task:

    Set up a task to fetch weather data every 6 hours
    
  3. Creating an AI task:

    Generate a sales data summary report every Monday at 9AM
    
  4. Creating a reminder task:

    Remind me about team meetings every Tuesday and Thursday at 9:30 AM
    
  5. Listing all tasks:

    Show all scheduled tasks
    
  6. Running a task immediately:

    Run the backup task now
    

Through the Programming API

import asyncio
from mcp.client import StdioClient

async def main():
    # Start MCP Scheduler as a subprocess
    process_args = ["uv", "run", "/path/to/scheduler-mcp/main.py"]
    async with StdioClient.create_subprocess(process_args) as client:
        # Get server info
        server_info = await client.call("get_server_info")
        print(f"Connected to {server_info['name']} version {server_info['version']}")
        
        # List all tasks
        tasks = await client.call("list_tasks")
        print(f"There are {len(tasks)} tasks")
        
        # Add a command task
        cmd_task = await client.call(
            "add_command_task", 
            {
                "name": "System Status Check",
                "schedule": "*/30 * * * *",  # Every 30 minutes
                "command": "vmstat > /tmp/vmstat_$(date +%Y%m%d_%H%M).log",
                "description": "Log system status",
                "do_only_once": False
            }
        )
        print(f"Created command task: {cmd_task['id']}")
        
        # Run a task immediately
        run_result = await client.call(
            "run_task_now", 
            {"task_id": cmd_task['id']}
        )
        print(f"Task execution result: {run_result['execution']['status']}")

if __name__ == "__main__":
    asyncio.run(main())

Environment Variables

The scheduler can be configured using environment variables:

  • MCP_SCHEDULER_NAME: Server name (default: mcp-scheduler)
  • MCP_SCHEDULER_VERSION: Server version (default: 0.1.0)
  • MCP_SCHEDULER_ADDRESS: Server address (default: localhost)
  • MCP_SCHEDULER_PORT: Server port (default: 8080)
  • MCP_SCHEDULER_TRANSPORT: Transport mode (default: stdio)
  • MCP_SCHEDULER_LOG_LEVEL: Logging level (default: INFO)
  • MCP_SCHEDULER_LOG_FILE: Log file path
  • MCP_SCHEDULER_DB_PATH: Database path (default: scheduler.db)
  • MCP_SCHEDULER_CHECK_INTERVAL: How often to check for tasks (default: 5 seconds)
  • MCP_SCHEDULER_EXECUTION_TIMEOUT: Task execution timeout (default: 300 seconds)
  • MCP_SCHEDULER_AI_MODEL: OpenAI model for AI tasks (default: gpt-4o)
  • MCP_SCHEDULER_USE_AWS_Q_MODEL: Use AWS Q model for AI tasks (default: false)
  • OPENAI_API_KEY: API key for OpenAI tasks (not needed when using AWS Q model)

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "q-scheduler" '{"command":"python","args":["main.py"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "q-scheduler": {
            "command": "python",
            "args": [
                "main.py"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "q-scheduler": {
            "command": "python",
            "args": [
                "main.py"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later