moadim MCP server
Commit Nov 15, 2026Schedules and executes AI agent routines on a cron schedule via UI, REST, and MCP interfaces.
Also known as moadim-io/daemon
- Stars
- 59
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 15, 2026
- License
- MIT
What is moadim MCP?
moadim schedules and executes AI agent routines on a cron schedule via UI, REST, and MCP interfaces.
Summary generated from the project's README
About moadim MCP server
Automating repetitive AI agent tasks on a recurring schedule is what daemon enables for developers. By transforming prompts into scheduled routines, it allows users to design autonomous loops that run without manual intervention. The system functions as a background Rust server that manages these routines through a browser-based UI, a REST API, and an MCP interface, all sharing a single port.
Users can manage their agent workflows locally on macOS or Linux. The server requires tmux to launch routine agents and python3 for certain agent capabilities. Each scheduled task executes within a temporary, throwaway workbench to ensure a clean environment for every run. Because routines are stored as git-trackable files in the configuration directory, developers can version control their prompts, schedules, and agent settings. The daemon uses an internal scheduler instead of the system crontab, providing consistent behavior across different platforms while respecting local timezones or specific IANA zones.
What you can do with it
- 1Automate nightly code triageA developer can schedule a coding agent to run a specific prompt every night to analyze repository changes.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
MOADIM_ALLOWED_HOSTSMOADIM_ALLOW_REMOTEMOADIM_BIND_ADDRMOADIM_LOG_FORMAT
| Name | Description | |
|---|---|---|
| MOADIM_ALLOWED_HOSTS | — | |
| MOADIM_ALLOW_REMOTE | — | |
| MOADIM_BIND_ADDR | — | |
| MOADIM_LOG_FORMAT | — |
Automated checks
Ran Nov 13, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablemoadim-io/daemon is public and reachablegithub.com/moadim-io/daemon ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-13github.com/moadim-io/daemon ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubmoadim
Loop engineering, on a schedule. Stop prompting your agents — design the loop that prompts them.
Agent routines that run while you sleep. One port. Three interfaces. Zero drift.
Set the loop. Forget the keyboard. moadim fires the prompt so you don't have to.
One-line install — install Rust/Cargo, install moadim, then run it:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && . "$HOME/.cargo/env" && cargo install --locked moadim && moadim
Rust server that schedules routines (run an AI agent on a cron schedule), exposing them over three interfaces simultaneously:
- UI (
http://localhost:5784/) — browser dashboard for managing routines - REST (
http://localhost:5784/api/v1) — standard HTTP API for browsers, CLI tools, and services; Swagger UI at/docs - MCP (
http://localhost:5784/mcp) — Model Context Protocol for AI agents (Claude, etc.)
All three share the same port. Routines created through any interface are
registered with the daemon's cross-platform scheduler so they run on schedule
without depending on an OS cron service. See
Routines for the agent-loop engine, or
docs/comparison.md for how moadim compares to cron,
GitHub Actions, and other agent runners.
Prerequisites
moadim depends on a few external tools at runtime, in addition to Rust/Cargo for building and installing:
| Tool | Required for | Install |
|---|---|---|
| Rust/Cargo | building and installing moadim | https://rustup.rs |
tmux |
launching routine agents — every scheduled routine starts its agent inside a tmux session. Without tmux, routine runs silently fail to launch. |
brew install tmux (macOS) · apt install tmux (Debian/Ubuntu) |
The daemon reports whether tmux and python3 resolve on its PATH in
GET /api/v1/health (under dependencies) and logs a warning at startup when
either is missing, so a misconfigured host is easy to spot. See the built-in
claude agent's prerequisites below for why python3 matters.
Installation
cargo install --locked moadim
Homebrew (from this repository)
To build and install the current main branch with Homebrew, add this repository
as a tap and install its formula with --HEAD:
brew tap moadim-io/daemon https://github.com/moadim-io/daemon.git
brew install --build-from-source --HEAD moadim-io/daemon/moadim
The formula installs the moadim binary, its moadim(1) man page, and the
required tmux runtime dependency. Homebrew builds the Rust binary from the
repository checkout; it is not a prebuilt package.
--locked installs the exact dependency graph published and tested with this
release (from the crate's Cargo.lock) instead of re-resolving every dependency
to the newest semver-compatible version at install time — so a bad or breaking
transitive bump can't fail an otherwise-unchanged install.
Prefer a prebuilt binary over compiling from source? Releases are meant to
publish binary archives (with a SHA256 checksum) for macOS (Apple Silicon and
Intel) and Linux x86_64, for cargo binstall.
Status: current releases have no binary archives yet (the release workflow skipped that job; the fix is in #1664), so
cargo binstallfalls back to a source compile. Usecargo install --locked moadimabove until a release lists the archives.
cargo binstall moadim
Node/npm users will be able to install the same prebuilt binaries through npm.
The npm package is a thin wrapper over per-platform optional binary packages; it
does not run cargo install during installation, and every npm package version
is kept in lockstep with the Rust crate version.
Status:
moadimis not on npm yet (npm install -g moadimreturns 404). Usecargo install --locked moadimuntil it is published.
npm install -g moadim
moadim --version
...or download the archive for your platform directly from the Releases page.
If moadim is not found after install, add Cargo's bin directory to your PATH:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
Then run:
moadim
This starts the server in the background and returns control to your shell.
Stop it later with moadim stop (or the STOP button in the UI). To run it
attached to your terminal instead, use moadim --interactive.
Man page
A Unix man page ships in docs/moadim.1, mirroring the
built-in moadim --help. View it without installing:
man ./docs/moadim.1
Or install it so man moadim works system-wide (packagers can drop it into
share/man/man1/):
install -Dm644 docs/moadim.1 "$HOME/.local/share/man/man1/moadim.1"
Features
Close the loop. Skip the keyboard. Loop engineering, shipped as a daemon.
- Routines created via REST or MCP are registered with the daemon's in-process scheduler automatically
- Routines schedule an AI agent — a prompt + schedule + agent, stored in
~/.config/moadim/routines/(see Routines) — git-trackable, diff-friendly - Agents are a registry of coding agents (
claude, …) under~/.config/moadim/agents/<name>.toml, referenced by routines - Each routine run executes in a throwaway workbench under
~/.moadim/workbenches/(a separate tree from the config dir), reaped on a periodic (5-minute) cleanup sweep - Same REST and MCP interface — no logic duplication between protocols
- API spec auto-generated at build time into
apis/
Directory layout
~/.config/moadim/
├── routines/ # scheduled AI-agent tasks (see ## Routines)
│ └── nightly-triage/
│ ├── routine.toml # tracked — schedule, agent, repositories, [env], …
│ ├── schedule.cron # tracked — cron-entry mirror, not functional yet
│ ├── overlap.json # tracked — explicit overlap policy, default disabled
│ ├── routine.local.toml # gitignored, optional — secret/local env var overrides
│ └── prompts/
│ ├── prompt.pure.md # tracked — the raw, user-authored prompt
│ └── prompt.compiled.local.md # gitignored — derived, rendered prompt
├── agents/ # registered coding agents referenced by routines
│ └── claude.toml
├── .gitignore # generated — excludes *.compiled.*, *.local.*, *.log, cache/, … for the whole tree
└── user_prompt.md # optional — appended to every routine's prompt (see ## Routines)
~/.moadim/ # runtime tree, separate from the config dir above
└── workbenches/ # per-run throwaway dirs, reaped on the periodic sweep
Daemon scheduler
One daemon owns routine schedules on every supported platform.
Moadim evaluates enabled routines with an in-process scheduler backed by
tokio-cron-scheduler. Creating,
updating, enabling, disabling, moving, or deleting a routine asks that scheduler
to rebuild its jobs; no routine entry is written to the host's crontab.
Each scheduled fire goes through the same daemon-side safety path as a manual trigger. Global locks, machine targeting, power-saving state, snoozes, per-routine overlap protection, the global concurrency cap, and same-minute deduplication therefore apply consistently on macOS, Linux, and other supported platforms.
Schedule format: standard 5-field cron (min hour dom month dow). @keyword
shortcuts (@hourly, @daily, @weekly, @monthly, @yearly, @annually) are
also accepted. @reboot and @midnight are not supported via the API and are
rejected with 400 Bad Request.
Timezone: schedules are evaluated in the host's local system timezone, not
UTC. A schedule of 0 9 * * * fires at 09:00 local time. AI agents in particular
should not pre-convert times to UTC. To pin one routine to another zone, set its
timezone to an IANA name; the schedule then fires at that wall-clock time there:
schedule = "0 9 * * *"
timezone = "Asia/Tokyo" # fires at 09:00 Tokyo time, whatever the host's zone
Routines
A routine is a scheduled AI-agent task: it fires a prompt at a coding
agent (e.g. Claude) on a cron schedule, each run inside its own throwaway
workbench. The schedule lives in routine.toml with the rest of the routine
metadata; a sibling schedule.cron file mirrors the cron entry but is not
functional yet.
Routines are stored as folders under ~/.config/moadim/routines/<id>/,
git-trackable:
~/.config/moadim/routines/
└── nightly-triage/
├── routine.toml # tracked — schedule, agent, repositories, [env], …
├── schedule.cron # tracked — cron-entry mirror, not functional yet
├── overlap.json # tracked — explicit overlap policy, default disabled
├── routine.local.toml # gitignored, optional — secret/local env var overrides
└── prompts/
├── prompt.pure.md # tracked — the raw, user-authored prompt
└── prompt.compiled.local.md # gitignored — derived, rendered prompt
The gitignored files are covered by the single generated .gitignore at the
config-dir root (~/.config/moadim/.gitignore), whose patterns apply to the
whole tree — routine directories don't carry their own.
Overlap policy
The daemon creates this sibling file (not a routine.toml field) whenever it persists a routine,
including startup repair of existing routine directories. Its default content denies overlap:
{"version":1,"allow_overlapping_runs":false}
When this value is false, a fire is skipped and recorded in skip.log when a previous run of the
same routine is still alive. To explicitly allow independent manual or scheduled fires to overlap,
change the boolean to true:
{"version":1,"allow_overlapping_runs":true}
Save it as routines/<slug>/overlap.json. If a legacy directory is missing the file, the daemon
recreates it with the default on its next persistence. Invalid JSON or an unsupported version fails
closed: the daemon records the policy error in skip.log and does not start the new run. This
opt-in bypasses only the
per-routine overlap guard; global locks, snoozes, power-saving rules, same-minute schedule
deduplication, and the fleet-wide concurrency cap remain in force.
| Field | Type | Required | Description |
|---|---|---|---|
schedule |
string | yes | Cron expression (min hour dom month dow or @daily, …), evaluated by the daemon scheduler in the host's local timezone — not UTC. Mirrored into schedule.cron, which is not functional yet. |
timezone |
string | no | IANA zone name (e.g. Asia/Tokyo) to evaluate schedule in instead of the host's local timezone. Unknown names are rejected with 400 Bad Request. Omitted or blank uses the host's zone. |
title |
string | yes | Human name; slugified to name the run workbench and tmux session. |
agent |
string | yes | Agent registry key (e.g. claude), resolved from ~/.config/moadim/agents/<agent>.toml. |
model |
string | no | Model ID to run the agent with (e.g. claude-sonnet-4-6), passed as --model on the agent invocation. None/omitted uses the agent's own default. |
goal |
string | no | A very short (≤5 lines) statement of the routine's goal — the "why" behind the prompt. Rendered into prompt.md as a ## Goal preamble. |
repositories |
list | no | Git repos pre-cloned into the workbench before the agent launches (via a persistent local mirror cache under ~/.config/moadim/cache/, reused across runs). A clone/fetch failure — bad URL, unreachable host, missing branch — aborts the run and is recorded in agent.log. |
machines |
list | no | Machine identities this routine runs on (matched against this install's resolved machine name — see below). An entry may be an exact name or a glob containing * (e.g. "*" for any machine, "box-*" for a family). Defaults to empty — an empty list runs nowhere, so a new routine is dormant until explicitly assigned. |
enabled |
bool | no | Defaults to true. Set false to pause without deleting. |
power_saving_exempt |
bool | no | Defaults to false. When true, this routine may still launch while the host is on battery or Low Power Mode. |
ttl_secs |
int | no | How long a finished run's workbench is retained before auto-cleanup. Caps the cron-derived retention lower — it can only shorten, never extend it. None uses the cron-derived value. |
max_runtime_secs |
int | no | Max wall-clock seconds a single run may execute before the cleanup watchdog force-kills its (hung) tmux session; the workbench is then reaped under the normal TTL rules. Caps the cron-derived runtime (min(MAX_RUNTIME_SECS, cron interval)) lower — it can only shorten, never extend it. None uses the cron-derived value. |
notifications |
table | no | Optional per-routine failure hooks. When empty, the daemon falls back to ~/.config/moadim/notifications.toml. |
tags |
list | no | Free-form labels for grouping/filtering routines (e.g. "nightly"). Defaults to empty; each entry is trimmed and must be non-blank. |
env |
map | no | Environment variables injected into the agent's shell session at launch (see Environment variables below). Defaults to empty. |
Power saving
enabled remains the user's on/off intent. Power saving is a separate system throttle: on macOS,
when the host is on battery or Low Power Mode, scheduled and manual launches are skipped with a
clear system power saving is active reason unless the routine sets power_saving_exempt = true.
There is no automatic catch-up when the host leaves power saving in v1.
moadim MCP questions
What is required to run routine agents?
Every scheduled routine starts its agent inside a tmux session, so tmux must be installed on your system.