@cronicorn/mcp-server 1.6.1 → 1.7.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 CHANGED
@@ -145,6 +145,135 @@ On first run, the server will:
145
145
 
146
146
  Subsequent runs will use the stored access token automatically.
147
147
 
148
+ ## Prompts (Slash Commands)
149
+
150
+ Prompts are interactive conversation starters that guide you through common Cronicorn workflows. They're triggered using slash commands in your AI assistant.
151
+
152
+ ### Available Prompts
153
+
154
+ #### `/setup-first-job` - Get Started with Cronicorn
155
+
156
+ Interactive guide for creating your first scheduled job. Works for all scenarios including new users and migrations from other cron systems.
157
+
158
+ **Optional Arguments:**
159
+ - `task_description`: What the job should do
160
+ - `endpoint_url`: HTTP endpoint to call
161
+ - `schedule_type`: "interval" or "cron"
162
+
163
+ **Example Usage (GitHub Copilot):**
164
+
165
+ In GitHub Copilot Chat, type:
166
+ ```
167
+ @cronicorn /setup-first-job
168
+ ```
169
+
170
+ Or with arguments:
171
+ ```
172
+ @cronicorn /setup-first-job task_description="check API health every 5 minutes" endpoint_url="https://api.myapp.com/health"
173
+ ```
174
+
175
+ The prompt will guide you through:
176
+ 1. Understanding jobs vs endpoints
177
+ 2. Creating a job container
178
+ 3. Adding your HTTP endpoint
179
+ 4. Configuring baseline schedules
180
+ 5. Setting safety constraints
181
+ 6. Enabling AI adaptation
182
+
183
+ **What You'll Learn:**
184
+ - Jobs vs endpoints (containers vs execution units)
185
+ - Baseline schedules (cron vs interval)
186
+ - AI hints for dynamic scheduling
187
+ - Safety constraints (min/max intervals)
188
+ - Response body instrumentation
189
+
190
+ ---
191
+
192
+ #### `/troubleshoot-failures` - Debug Failing Endpoints
193
+
194
+ Debug failing job executions and identify solutions.
195
+
196
+ **Optional Arguments:**
197
+ - `job_or_endpoint_name`: Name/ID of failing endpoint
198
+ - `error_description`: Error symptoms
199
+ - `when_started`: "just-now", "today", "this-week", or "longer"
200
+
201
+ **Example Usage (GitHub Copilot):**
202
+
203
+ ```
204
+ @cronicorn /troubleshoot-failures job_or_endpoint_name="payment-processor" error_description="timeout errors" when_started="today"
205
+ ```
206
+
207
+ The prompt will guide you through:
208
+ 1. Identifying the failing endpoint
209
+ 2. Reviewing run history for patterns
210
+ 3. Analyzing error details (status codes, messages)
211
+ 4. Checking AI hints and scheduling state
212
+ 5. Inspecting response bodies
213
+ 6. Applying fixes (constraints, pausing, configuration)
214
+
215
+ **Common Issues Covered:**
216
+ - Timeout errors (increase timeout/execution time)
217
+ - Rate limiting (429 errors, adjust min interval)
218
+ - Service unavailable (500/503, pause endpoint)
219
+ - Authentication failures (401/403, fix headers)
220
+ - Network issues (connection refused, DNS)
221
+ - Response body problems (size limits, structure)
222
+
223
+ ---
224
+
225
+ ### Using Prompts in GitHub Copilot
226
+
227
+ **In VS Code with GitHub Copilot Chat:**
228
+
229
+ 1. Open GitHub Copilot Chat (Click the chat icon or `Ctrl+Shift+I` / `Cmd+Shift+I`)
230
+
231
+ 2. Use the `@cronicorn` agent with a slash command:
232
+ ```
233
+ @cronicorn /setup-first-job
234
+ ```
235
+
236
+ 3. Copilot will run the prompt and guide you through the workflow
237
+
238
+ 4. Provide arguments inline:
239
+ ```
240
+ @cronicorn /migrate-from-cron current_system="vercel-cron" job_count="10"
241
+ ```
242
+
243
+ 5. Follow the interactive guidance to complete your task
244
+
245
+ **Tips for Best Results:**
246
+
247
+ - **Start broad**: Use prompts without arguments to get full guidance
248
+ - **Provide context**: Include arguments when you have specific info
249
+ - **Follow suggestions**: Prompts reference specific tools to use next
250
+ - **Check resources**: Prompts include doc links for deeper learning
251
+
252
+ **Note:** GitHub Copilot doesn't automatically load bundled resources like Claude Desktop does, but prompts include embedded summaries and hosted doc URLs for universal access.
253
+
254
+ ---
255
+
256
+ ### Using Prompts in Claude Desktop
257
+
258
+ **In Claude Desktop:**
259
+
260
+ 1. Type a slash command in the chat:
261
+ ```
262
+ /setup-first-job
263
+ ```
264
+
265
+ 2. Claude will execute the prompt and start guiding you
266
+
267
+ 3. Prompts can reference bundled documentation resources:
268
+ ```
269
+ file:///docs/quick-start.md
270
+ file:///docs/core-concepts.md
271
+ ```
272
+
273
+ 4. Claude automatically loads these resources for additional context
274
+
275
+ ---
276
+
148
277
  ## Keeping Updated
149
278
 
150
279
  The MCP server does not automatically update. When using `npx` or global installation, you'll continue using the cached version until you manually update.
@@ -345,6 +474,21 @@ git push --follow-tags
345
474
 
346
475
  **Note**: Only production dependency is `@modelcontextprotocol/sdk` - everything else is bundled.
347
476
 
477
+ ## Alternative: Context7 Documentation Access
478
+
479
+ If you have the [Context7 MCP server](https://context7.com) installed alongside Cronicorn MCP, you can access Cronicorn documentation directly in your AI assistant:
480
+
481
+ ```
482
+ @context7 /weskerllc/cronicorn
483
+ ```
484
+
485
+ This provides an alternative way to access up-to-date Cronicorn documentation without leaving your conversation. Context7 complements the Cronicorn MCP server's prompts and bundled resources.
486
+
487
+ **Use cases:**
488
+ - Quick doc lookups while working with Cronicorn MCP tools
489
+ - Access to the latest documentation updates
490
+ - Cross-reference between different sections of the docs
491
+
348
492
  ## Security
349
493
 
350
494
  - OAuth 2.0 Device Authorization Grant for secure authentication
@@ -225,9 +225,3 @@ AI behavior:
225
225
  - Never exceeds API rate limits (min)
226
226
  - Ensures data freshness (max)
227
227
  ```
228
-
229
- ## Next Steps
230
-
231
- - **[Introduction](./introduction.md)** - Why use Cronicorn
232
- - **[Quick Start](./quick-start.md)** - Create your first job
233
- - **[Technical Documentation](./technical/system-architecture.md)** - For developers and self-hosters
@@ -77,8 +77,3 @@ pnpm dev
77
77
 
78
78
  **Database errors?**
79
79
  → Ensure Docker is running, then `pnpm db`
80
-
81
- ## Next Steps
82
-
83
- - [Authentication](./authentication.md) - Configure authentication methods
84
- - [Architecture](../technical/system-architecture.md) - System design
@@ -172,8 +172,3 @@ Central docs folder that is used by the docs app and mcp-server
172
172
  | AI prompts | `packages/worker-ai-planner/src/` |
173
173
  | HTTP dispatcher | `packages/adapter-http/` |
174
174
  | Business logic | `packages/services/` |
175
-
176
- ## Next Steps
177
-
178
- - **[System Architecture](../technical/system-architecture.md)** - How components interact at runtime
179
- - **[Quick Start](./quick-start.md)** - Set up your dev environment
@@ -21,6 +21,40 @@ mcp:
21
21
 
22
22
  **Cronicorn** is an intelligent scheduler that automatically adapts to your application's behavior. Set baseline schedules and let AI optimize execution timing based on real-world patterns.
23
23
 
24
+ ---
25
+
26
+ ## 🤖 Recommended: Use the MCP Server
27
+
28
+ **The easiest way to use Cronicorn is through your AI assistant.** Just chat to create jobs, monitor executions, and debug issues—no forms, no clicking.
29
+
30
+ [![npm version](https://badge.fury.io/js/@cronicorn%2Fmcp-server.svg)](https://www.npmjs.com/package/@cronicorn/mcp-server)
31
+
32
+ ```bash
33
+ npm install -g @cronicorn/mcp-server
34
+ ```
35
+
36
+ Configure it with GitHub Copilot, Claude Desktop, or any MCP-compatible AI assistant. Then just talk:
37
+
38
+ - *"Set up a job that checks my API health every 5 minutes"*
39
+ - *"Show me why that endpoint is failing"*
40
+ - *"Migrate my 10 Vercel cron jobs to Cronicorn"*
41
+
42
+ **[→ Learn more about the MCP Server](./mcp-server.md)**
43
+
44
+ ---
45
+
46
+ ## Quick Navigation
47
+
48
+ **Getting Started**
49
+ - [Quick Start](./quick-start.md) - Create your first scheduled job in 5 minutes
50
+ - [Core Concepts](./core-concepts.md) - Understand jobs, endpoints, and scheduling
51
+
52
+ **Learn More**
53
+ - [Use Cases & Examples](./use-cases.md) - Real-world scenarios across industries
54
+ - [Technical Architecture](./technical/system-architecture.md) - Deep dive - How Cronicorn works behind the scenes
55
+
56
+ ---
57
+
24
58
  ## What is Cronicorn?
25
59
 
26
60
  Cronicorn is a scheduling service that combines:
@@ -89,44 +123,6 @@ When enabled, the AI planner:
89
123
  - **Multi-tenant isolation**: Secure separation between accounts
90
124
  - **API & Web UI**: Manage jobs programmatically or visually
91
125
 
92
- ## Use Cases
93
-
94
- ### API Health Monitoring
95
-
96
- Monitor your APIs with adaptive frequency:
97
-
98
- - Baseline: Check every 5 minutes
99
- - AI increases to every 30 seconds when errors detected
100
- - AI backs off to every 15 minutes when stable
101
- - Stays within your min (30s) and max (15min) constraints
102
-
103
- ### Data Synchronization
104
-
105
- Sync data between systems efficiently:
106
-
107
- - Baseline: Sync every hour
108
- - AI increases during business hours when changes are frequent
109
- - AI decreases overnight when activity is low
110
- - Respects API rate limits with max interval constraints
111
-
112
- ### Scheduled Maintenance
113
-
114
- Run cleanup and maintenance tasks:
115
-
116
- - Baseline: Daily at 2am via cron expression
117
- - Pause during known maintenance windows
118
- - Monitor execution duration trends over time
119
- - Track success/failure for audit compliance
120
-
121
- ### Webhook Retry Logic
122
-
123
- Retry failed webhooks intelligently:
124
-
125
- - Baseline: Immediate retry, then exponential backoff
126
- - AI adjusts retry timing based on downstream service patterns
127
- - Automatic pause after sustained failures
128
- - Resume when downstream recovers
129
-
130
126
  ## How It Works
131
127
 
132
128
  1. **Create a Job** - Logical container for related endpoints
@@ -141,15 +137,3 @@ Retry failed webhooks intelligently:
141
137
  - **E-commerce teams** syncing inventory and order data
142
138
  - **DevOps engineers** running scheduled maintenance tasks
143
139
  - **Integration developers** managing webhook retries and polling
144
-
145
- ## Getting Started
146
-
147
- - **Using Cronicorn as a service**: See [Quick Start](./quick-start.md)
148
- - **Self-hosting Cronicorn**: See [Technical Documentation](./technical/system-architecture.md)
149
- - **AI assistant integration**: Use our [MCP Server](https://www.npmjs.com/package/@cronicorn/mcp-server)
150
-
151
- ## Next Steps
152
-
153
- - **[Core Concepts](./core-concepts.md)** - Understand jobs, endpoints, and scheduling
154
- - **[Quick Start](./quick-start.md)** - Create your first scheduled job
155
- - **[Technical Deep Dive](./technical/system-architecture.md)** - For developers and self-hosters
@@ -0,0 +1,127 @@
1
+ ---
2
+ id: mcp-server
3
+ title: MCP Server
4
+ description: Control Cronicorn through your AI assistant - no forms, no clicking, just conversation
5
+ tags:
6
+ - getting-started
7
+ - integrations
8
+ - ai
9
+ sidebar_position: 3
10
+ mcp:
11
+ uri: file:///docs/mcp-server.md
12
+ mimeType: text/markdown
13
+ priority: 0.9
14
+ ---
15
+
16
+ # Chat Your Way to Scheduled Jobs
17
+
18
+ [![npm version](https://badge.fury.io/js/@cronicorn%2Fmcp-server.svg)](https://www.npmjs.com/package/@cronicorn/mcp-server)
19
+
20
+ **What if you could manage cron jobs by just talking to your AI assistant?**
21
+
22
+ ```
23
+ You: "Set up a job that checks my API health every 5 minutes"
24
+
25
+ AI: *Creates the job, adds the endpoint, configures the schedule*
26
+ ✅ Done! Your health check is now running every 5 minutes.
27
+ ```
28
+
29
+ **No forms. No clicking. Just conversation.**
30
+
31
+ ## Quick Start
32
+
33
+ ### Install
34
+
35
+ ```bash
36
+ npm install -g @cronicorn/mcp-server
37
+ ```
38
+
39
+ ### Configure Your AI Assistant
40
+
41
+ Add the Cronicorn MCP server to your AI assistant's configuration. The exact setup varies by tool:
42
+
43
+ - **GitHub Copilot**: Add to VS Code settings
44
+ - **Claude Desktop**: Add to `claude_desktop_config.json`
45
+ - **Cline/Continue/Cursor**: Check your extension's MCP settings
46
+
47
+ See the [full installation guide](https://github.com/weskerllc/cronicorn/tree/main/apps/mcp-server#installation) for platform-specific instructions.
48
+
49
+ ### Authenticate
50
+
51
+ First time you use it, you'll authenticate once via OAuth (browser opens, you approve, done). The MCP server remembers you for 30 days.
52
+
53
+ ## What You Can Do
54
+
55
+ **Create jobs instantly:**
56
+ ```
57
+ "Check https://api.myapp.com/health every 5 minutes"
58
+ ```
59
+
60
+ **Debug failures:**
61
+ ```
62
+ "My payment-processor job is timing out - fix it"
63
+ ```
64
+
65
+ **Monitor everything:**
66
+ ```
67
+ "Show me my dashboard stats"
68
+ "What's wrong with that failing endpoint?"
69
+ ```
70
+
71
+ **Migrate from other systems:**
72
+ ```
73
+ "Help me move my 15 Vercel cron jobs to Cronicorn"
74
+ ```
75
+
76
+ ## Built-In Guides
77
+
78
+ The MCP server includes interactive slash commands that guide you through common workflows:
79
+
80
+ **`/setup-first-job`** - Perfect for getting started or migrating
81
+ - Learn jobs vs endpoints, baseline schedules, AI adaptation, safety constraints
82
+ - Get step-by-step guidance for your first scheduled task
83
+
84
+ **`/troubleshoot-failures`** - Debug failing endpoints
85
+ - Systematic diagnostic process
86
+ - Common issues and fixes (timeouts, rate limits, auth)
87
+ - Emergency actions when needed
88
+
89
+ ## 30+ Tools Available
90
+
91
+ Your AI assistant has access to tools for:
92
+
93
+ - **Job Management** - Create, list, update, pause, resume, delete
94
+ - **Endpoint Control** - Add, configure, update URLs/timeouts/schedules
95
+ - **AI Scheduling** - Apply hints, trigger immediate runs, pause/resume
96
+ - **Monitoring** - Health summaries, execution history, run details, dashboard stats
97
+
98
+ [See all available tools →](https://github.com/weskerllc/cronicorn/tree/main/apps/mcp-server#available-tools)
99
+
100
+ ## Example Use Cases
101
+
102
+ **Health monitoring with AI adaptation:**
103
+ ```
104
+ "Monitor https://api.acme.com/health every minute.
105
+ Check more frequently if slow, relax to 5 minutes when healthy."
106
+ ```
107
+ → AI auto-adjusts interval based on latency in response
108
+
109
+ **Data sync with queue monitoring:**
110
+ ```
111
+ "Sync https://api.acme.com/sync every 5 minutes.
112
+ Speed up when queue_depth > 100, slow down when < 10."
113
+ ```
114
+ → AI monitors queue_depth and adjusts schedule dynamically
115
+
116
+ **Daily cleanup:**
117
+ ```
118
+ "Run cleanup at https://api.acme.com/cleanup daily at 2 AM Pacific"
119
+ ```
120
+ → Simple cron-based schedule
121
+
122
+ ## Security & Compatibility
123
+
124
+ **Secure authentication** via OAuth 2.0 Device Flow (same as AWS CLI, GitHub CLI). Credentials stored locally with strict permissions. Tokens refresh automatically, re-auth every 30 days.
125
+
126
+ **Works with** GitHub Copilot, Claude Desktop, Cline, Continue, Cursor, and any MCP-compatible AI assistant.
127
+
@@ -217,16 +217,3 @@ If you're hitting rate limits:
217
217
  1. Increase **Min Interval** (e.g., from 30s to 60s)
218
218
  2. Adjust **Baseline Schedule** to be less frequent
219
219
  3. Let AI adapt (it will back off automatically)
220
-
221
- ## Next Steps
222
-
223
- - **[Core Concepts](./core-concepts.md)** - Understand jobs, endpoints, and AI scheduling
224
- - **[API Reference](https://cronicorn.com/docs/api)** - Full API documentation
225
- - **[Self-Hosting Guide](./technical/system-architecture.md)** - Deploy Cronicorn yourself
226
-
227
- ## Getting Help
228
-
229
- - 📖 [Documentation](https://cronicorn.com/docs)
230
- - 💬 [Discord Community](https://discord.gg/cronicorn)
231
- - 📧 [Email Support](mailto:support@cronicorn.com)
232
- - 🐛 [Report Issues](https://github.com/weskerllc/cronicorn/issues)
@@ -407,9 +407,3 @@ Expensive operation runs every 10 minutes normally, AI can relax to hourly or ti
407
407
  7. **Min/max apply relative to `now`, not `lastRunAt`**
408
408
 
409
409
  Configure conservatively. The system is designed to be safe by default. Add constraints when you encounter real problems, not anticipated ones.
410
-
411
- ## Next Steps
412
-
413
- - **[How Scheduling Works](./how-scheduling-works.md)** - Understand how Governor applies constraints
414
- - **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Learn how AI proposes intervals
415
- - **[Reference](./reference.md)** - Quick lookup for defaults and field ranges
@@ -449,9 +449,3 @@ When coordination isn't working:
449
449
  7. **Cross-job coordination**: Embed external status checks in responses
450
450
 
451
451
  These patterns give you the building blocks for complex workflows. Mix and match based on your needs.
452
-
453
- ## Next Steps
454
-
455
- - **[Configuration and Constraints](./configuration-and-constraints.md)** - Set up endpoints for optimal coordination
456
- - **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Understand how AI reads and acts on signals
457
- - **[Reference](./reference.md)** - Quick lookup for tools and response body patterns
@@ -445,9 +445,3 @@ This ensures that even if AI becomes unavailable or too expensive, your jobs kee
445
445
  9. **Quota controls costs**: AI unavailable ≠ jobs stop running
446
446
 
447
447
  Understanding how AI adaptation works helps you design endpoints that benefit from intelligent scheduling, structure response bodies effectively, and debug unexpected schedule changes.
448
-
449
- ## Next Steps
450
-
451
- - **[Coordinating Multiple Endpoints](./coordinating-multiple-endpoints.md)** - Use AI to orchestrate workflows
452
- - **[Configuration and Constraints](./configuration-and-constraints.md)** - Set up endpoints for optimal AI behavior
453
- - **[Reference](./reference.md)** - Quick lookup for tools, fields, and defaults
@@ -260,9 +260,3 @@ This is the power of database-mediated communication: the Scheduler and AI Plann
260
260
  6. **Sources provide auditability**: Every decision is traceable
261
261
 
262
262
  Understanding how scheduling works gives you the foundation to configure endpoints effectively, debug unexpected behavior, and reason about how AI adaptation affects execution timing.
263
-
264
- ## Next Steps
265
-
266
- - **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Learn how the AI Planner writes hints
267
- - **[Configuration and Constraints](./configuration-and-constraints.md)** - Guide to setting up endpoints safely
268
- - **[Reference](./reference.md)** - Quick lookup for fields, defaults, and sources
@@ -394,11 +394,3 @@ Calculate current backoff multiplier:
394
394
  ```
395
395
  failureCount > 0 ? 2^min(failureCount, 5) : 1
396
396
  ```
397
-
398
- ## Next Steps
399
-
400
- For detailed explanations, see:
401
- - **[System Architecture](./system-architecture.md)** - Understand the big picture
402
- - **[How Scheduling Works](./how-scheduling-works.md)** - Deep-dive into Governor and Scheduler
403
- - **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Learn about hints and tools
404
- - **[Configuration Guide](./configuration-and-constraints.md)** - Set up endpoints correctly
@@ -292,14 +292,6 @@ To use Cronicorn effectively, you need to understand:
292
292
 
293
293
  5. **The system is eventually consistent**: Don't expect instant reactions to every change. The AI analyzes every 5 minutes, and hints apply on the next execution. Plan for minutes, not seconds.
294
294
 
295
- ## Next Steps
296
-
297
- Now that you understand the architecture, you can dive deeper:
298
-
299
- - **[How Scheduling Works](./how-scheduling-works.md)** - Deep-dive into the Scheduler worker and Governor logic
300
- - **[How AI Adaptation Works](./how-ai-adaptation-works.md)** - Deep-dive into the AI Planner and hint system
301
- - **[Coordinating Multiple Endpoints](./coordinating-multiple-endpoints.md)** - Patterns for building workflows
302
- - **[Configuration and Constraints](./configuration-and-constraints.md)** - How to configure endpoints effectively
303
295
 
304
296
  ---
305
297