mcp

v0.6.4
@schedjs/mcp Checked 21 minutes ago Published 10 days ago

Cron scheduler MCP server (Model Context Protocol) for Node.js — AI control plane: list/get tasks & runs, trigger/pause/resume, delete

A queue-based, self-hosted cron scheduler for modern apps — polyglot-ready, built to be operated as a service. Schedule functions in-process, or run a standalone daemon that dispatches HTTP/Docker/SSH workers with run history, retries, priority, and alerts. Full documentation: sched docs — quick start, task format, comparison with BullMQ, Agenda, pg-boss and friends, runner protocol, storage, self-hosting, security. Requires Node.js >= 22.5. Install and schedule a function in-process:

Summary extracted from the README.

sched

CI License: MIT Docs

A queue-based, self-hosted cron scheduler for modern apps — polyglot-ready, built to be operated as a service. Schedule functions in-process, or run a standalone daemon that dispatches HTTP/Docker/SSH workers with run history, retries, priority, and alerts.

  • Queue-based, not naive-cron — runs, retries with backoff, priority, idempotency via runId, cancellation that actually reaches the worker.
  • Polyglot workers — workers are dumb HTTP endpoints (or Docker containers, SSH commands, in-process functions). Any language, any stack.
  • Self-hosted — SQLite by default; MariaDB/MySQL, PostgreSQL, and MongoDB adapters. No SaaS required.
  • Operable — admin REST API, web UI, CLI, MCP server for AI tooling, status alerts via webhook.

Full documentation: sched docs — quick start, task format, comparison with BullMQ, Agenda, pg-boss and friends, runner protocol, storage, self-hosting, security.

Quick start (5 minutes)

Requires Node.js >= 22.5. Install and schedule a function in-process:

npm install @schedjs/core
// embed.mjs — sched as a library (the package is ESM-only)
import { DatabaseSync } from 'node:sqlite'
import { createEngine, createInternalRunner, createSqliteStorage, syncTasks } from '@schedjs/core'

const engine = createEngine({
  storage: createSqliteStorage(new DatabaseSync('sched.db')),
  runner: createInternalRunner({
    handlers: {
      generateThumbnail: async (data) => ({ thumb: `thumb-${data.videoId}.png` }),
    },
  }),
  maxConcurrent: 4,
})

await syncTasks(storage, [
  {
    name: 'generate-thumbnail',
    runner: 'internal',
    schedules: [{ cron: '0 9 * * *' }],
    config: { handler: 'generateThumbnail', data: { videoId: 'v-42' } },
  },
], new Date())

engine.start() // fires daily at 09:00

Run history, retries with backoff, priority and alerts — all included; the daemon (schedd --tasks tasks.json) is just the standalone form for HTTP/Docker/SSH workers. The operator CLI is sched status (from @schedjs/cli).

Want HTTP workers, the admin UI, or the webhook alerts? See the quick start in the docs for the daemon and Docker paths.

Packages

Package What it is
@schedjs/core Engine, storages, runners — the library
@schedjs/daemon Standalone daemon, binary schedd
@schedjs/admin-api Admin REST surface over the engine
@schedjs/cli Operator CLI, binary sched
@schedjs/mcp MCP server (stdio / Streamable HTTP)
@schedjs/ui Web admin UI components + sched-ui serve
@schedjs/storage-mongo / -mysql / -postgres Storage adapters

License

MIT — see LICENSE. Contributions require a CLA (details); the sched name and logo are trademarks and are not granted under the license.