mcp-cron 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -2
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -35,6 +35,58 @@ claude mcp add mcp-cron -- npx -y mcp-cron
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
#### Recommended Configuration
|
|
39
|
+
|
|
40
|
+
A more complete setup with AI provider, model selection, and sleep prevention:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"mcp-cron": {
|
|
46
|
+
"command": "npx",
|
|
47
|
+
"args": [
|
|
48
|
+
"-y", "mcp-cron",
|
|
49
|
+
"--transport", "stdio",
|
|
50
|
+
"--prevent-sleep",
|
|
51
|
+
"--ai-provider", "anthropic",
|
|
52
|
+
"--ai-model", "claude-sonnet-4-5-20250929"
|
|
53
|
+
],
|
|
54
|
+
"env": {
|
|
55
|
+
"ANTHROPIC_API_KEY": "your-api-key"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### Using LiteLLM
|
|
63
|
+
|
|
64
|
+
To route AI tasks through a [LiteLLM](https://docs.litellm.ai/) proxy:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"mcpServers": {
|
|
69
|
+
"mcp-cron": {
|
|
70
|
+
"command": "npx",
|
|
71
|
+
"args": [
|
|
72
|
+
"-y", "mcp-cron",
|
|
73
|
+
"--transport", "stdio",
|
|
74
|
+
"--prevent-sleep",
|
|
75
|
+
"--ai-base-url", "https://litellm.yourcompany.com",
|
|
76
|
+
"--ai-model", "claude-sonnet-4-5-20250929"
|
|
77
|
+
],
|
|
78
|
+
"env": {
|
|
79
|
+
"MCP_CRON_AI_API_KEY": "sk-your-litellm-key"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
> The `--ai-model` value should match a model name in your LiteLLM proxy config. LiteLLM exposes an OpenAI-compatible API, so `--ai-provider` can be omitted (defaults to `openai`).
|
|
87
|
+
|
|
88
|
+
> See [Command Line Arguments](#command-line-arguments) and [Environment Variables](#environment-variables) for all available options.
|
|
89
|
+
|
|
38
90
|
### Building from Source
|
|
39
91
|
|
|
40
92
|
#### Prerequisites
|
|
@@ -120,6 +172,7 @@ The following command line arguments are supported:
|
|
|
120
172
|
| `--ai-max-iterations` | Maximum iterations for tool-enabled AI tasks | `20` |
|
|
121
173
|
| `--mcp-config-path` | Path to MCP configuration file | `~/.cursor/mcp.json` |
|
|
122
174
|
| `--db-path` | Path to SQLite database for result history | `~/.mcp-cron/results.db` |
|
|
175
|
+
| `--prevent-sleep` | Prevent system from sleeping while mcp-cron is running (macOS and Windows) | `false` |
|
|
123
176
|
|
|
124
177
|
### Environment Variables
|
|
125
178
|
|
|
@@ -131,7 +184,7 @@ The following environment variables are supported:
|
|
|
131
184
|
| `MCP_CRON_SERVER_PORT` | The port to bind the server to | `8080` |
|
|
132
185
|
| `MCP_CRON_SERVER_TRANSPORT` | Transport mode: `sse` or `stdio` | `sse` |
|
|
133
186
|
| `MCP_CRON_SERVER_NAME` | Server name | `mcp-cron` |
|
|
134
|
-
| `MCP_CRON_SERVER_VERSION` | Server version | `
|
|
187
|
+
| `MCP_CRON_SERVER_VERSION` | Server version | `dev` |
|
|
135
188
|
| `MCP_CRON_SCHEDULER_DEFAULT_TIMEOUT` | Default timeout for task execution | `10m` |
|
|
136
189
|
| `MCP_CRON_LOGGING_LEVEL` | Logging level: `debug`, `info`, `warn`, `error`, `fatal` | `info` |
|
|
137
190
|
| `MCP_CRON_LOGGING_FILE` | Log file path | stdout |
|
|
@@ -145,6 +198,28 @@ The following environment variables are supported:
|
|
|
145
198
|
| `MCP_CRON_AI_MAX_TOOL_ITERATIONS` | Maximum iterations for tool-enabled tasks | `20` |
|
|
146
199
|
| `MCP_CRON_MCP_CONFIG_FILE_PATH` | Path to MCP configuration file | `~/.cursor/mcp.json` |
|
|
147
200
|
| `MCP_CRON_STORE_DB_PATH` | Path to SQLite database for result history | `~/.mcp-cron/results.db` |
|
|
201
|
+
| `MCP_CRON_PREVENT_SLEEP` | Prevent system from sleeping while mcp-cron is running (macOS and Windows) | `false` |
|
|
202
|
+
|
|
203
|
+
### Sleep Prevention
|
|
204
|
+
|
|
205
|
+
On laptops, the system may go to sleep and prevent scheduled tasks from running on time. Use the `--prevent-sleep` flag to keep the system awake while mcp-cron is running:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
mcp-cron --prevent-sleep --transport stdio
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Or via environment variable:
|
|
212
|
+
```bash
|
|
213
|
+
MCP_CRON_PREVENT_SLEEP=true mcp-cron --transport stdio
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
| Platform | Mechanism | Notes |
|
|
217
|
+
|----------|-----------|-------|
|
|
218
|
+
| macOS | `caffeinate` | Prevents idle sleep; automatically cleans up on exit |
|
|
219
|
+
| Windows | `SetThreadExecutionState` | Prevents idle sleep; automatically cleans up on exit |
|
|
220
|
+
| Linux | Not supported | Linux servers typically do not auto-sleep |
|
|
221
|
+
|
|
222
|
+
> **Note:** This prevents idle sleep only. It does not prevent sleep from closing the laptop lid or pressing the power button.
|
|
148
223
|
|
|
149
224
|
### Logging
|
|
150
225
|
|
|
@@ -243,8 +318,9 @@ mcp-cron/
|
|
|
243
318
|
│ ├── model/ # Data models and types
|
|
244
319
|
│ ├── scheduler/ # Task scheduling
|
|
245
320
|
│ ├── server/ # MCP server implementation
|
|
321
|
+
│ ├── sleep/ # Platform-specific system sleep prevention
|
|
246
322
|
│ ├── store/ # SQLite store (persistent task definitions + result history)
|
|
247
|
-
│ └── utils/ #
|
|
323
|
+
│ └── utils/ # Miscellaneous utilities
|
|
248
324
|
├── npm/ # npm packages (main + platform-specific binaries)
|
|
249
325
|
├── scripts/ # Build and publish scripts
|
|
250
326
|
├── go.mod # Go modules definition
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-cron",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "MCP server for cron task scheduling (shell commands and AI prompts)",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"bin": {
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"url": "git+https://github.com/jolks/mcp-cron.git"
|
|
12
12
|
},
|
|
13
13
|
"optionalDependencies": {
|
|
14
|
-
"mcp-cron-darwin-amd64": "0.1
|
|
15
|
-
"mcp-cron-darwin-arm64": "0.1
|
|
16
|
-
"mcp-cron-linux-amd64": "0.1
|
|
17
|
-
"mcp-cron-linux-arm64": "0.1
|
|
18
|
-
"mcp-cron-windows-amd64": "0.1
|
|
19
|
-
"mcp-cron-windows-arm64": "0.1
|
|
14
|
+
"mcp-cron-darwin-amd64": "0.2.1",
|
|
15
|
+
"mcp-cron-darwin-arm64": "0.2.1",
|
|
16
|
+
"mcp-cron-linux-amd64": "0.2.1",
|
|
17
|
+
"mcp-cron-linux-arm64": "0.2.1",
|
|
18
|
+
"mcp-cron-windows-amd64": "0.2.1",
|
|
19
|
+
"mcp-cron-windows-arm64": "0.2.1"
|
|
20
20
|
}
|
|
21
21
|
}
|