Cronlytic MCP Server
A comprehensive Model Context Protocol (MCP) server that integrates with the Cronlytic API to provide seamless cron job management through LLM applications like Claude Desktop.
README
Cronlytic MCP Server
š PROJECT COMPLETED - PRODUCTION READY š
A comprehensive Model Context Protocol (MCP) server that integrates with the Cronlytic API to provide seamless cron job management through LLM applications like Claude Desktop.
Final Status: ā All 6 phases complete | 88/88 tests passing | Production documentation ready
Overview
The Cronlytic MCP Server enables AI agents and LLM applications to:
- š Health Check: Test connectivity and authentication with the Cronlytic API ā
- š Job Management: Create, read, update, and delete cron jobs ā
- āÆļø Job Control: Pause, resume, and monitor job execution ā
- š Logs & Monitoring: Access execution logs and performance metrics ā
- š¤ Smart Prompts: 18 comprehensive prompts for guided assistance ā
- š Resources: Dynamic job resources and cron templates ā
- ā” Performance: Built-in monitoring and optimization ā
š Project Status: ALL PHASES COMPLETED ā
šÆ Final Achievement Summary:
- ā Phase 1: Core infrastructure and authentication
- ā Phase 2: Basic CRUD operations (13 tests)
- ā Phase 3: Advanced job management (22 tests)
- ā Phase 4: Resources implementation (14 tests)
- ā Phase 5: Prompts & UX (39 tests)
- ā Phase 6: Testing & documentation (performance monitoring)
š Key Metrics:
- 88/88 Tests Passing (100% success rate)
- 18 Interactive Prompts (225% of original scope)
- 9 Comprehensive Tools (Full job lifecycle)
- Complete Documentation Suite (8 detailed guides)
- Production Ready (Multi-platform deployment support)
Installation
Prerequisites
- Python 3.8 or higher
- Cronlytic account with API access
Install from Source
Quick Setup (Recommended)
# Clone the repository
git clone https://github.com/Cronlytic/cronlytic-mcp-server.git
cd cronlytic-mcp-server
# Run the setup script (creates venv and installs everything)
./setup_dev_env.sh
# Activate the virtual environment
source venv/bin/activate
Manual Setup
# Clone the repository
git clone https://github.com/Cronlytic/cronlytic-mcp-server.git
cd cronlytic-mcp-server
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install dependencies
pip install -r requirements.txt
# Install development dependencies (optional)
pip install -r requirements-dev.txt
# Install in development mode
pip install -e .
Configuration
The server needs your Cronlytic API credentials to function. You can provide these in several ways:
Method 1: Environment Variables (Recommended)
export CRONLYTIC_API_KEY="your_api_key_here"
export CRONLYTIC_USER_ID="your_user_id_here"
Method 2: Configuration File
Create a configuration file at one of these locations:
./cronlytic_config.json(current directory)~/.cronlytic/config.json(user home directory)/etc/cronlytic/config.json(system-wide)
{
"api_key": "your_cronlytic_api_key_here",
"user_id": "your_cronlytic_user_id_here",
"base_url": "https://api.cronlytic.com/prog",
"timeout": 30,
"max_retries": 3,
"retry_delay": 1.0
}
Method 3: Command Line Arguments
python -m cronlytic_mcp_server.server --api-key "your_key" --user-id "your_id"
Getting API Keys
- Log into your Cronlytic dashboard
- Navigate to "API Keys" section
- Click "Generate New API Key"
- Copy your API key and User ID
Usage
Running the Server
# Basic usage (reads from environment variables or config file)
python -m cronlytic_mcp_server.server
# With command line arguments
python -m cronlytic_mcp_server.server --api-key "your_key" --user-id "your_id"
# With debug logging
python -m cronlytic_mcp_server.server --debug
# With custom config file
python -m cronlytic_mcp_server.server --config /path/to/config.json
Available Tools (Phase 1)
Health Check
Test connectivity and authentication with the Cronlytic API:
# The health_check tool requires no parameters
# It will test:
# - API connectivity
# - Authentication validity
# - Response times
# - Basic functionality
Example Output:
# Cronlytic API Health Check
**Status:** ā
Cronlytic API connection is healthy and working correctly
**Timestamp:** 2025-01-27T10:30:00Z
**Response Time:** 150 ms
## Connection Details
- **Base URL:** https://api.cronlytic.com/prog
- **Connectivity:** ā
- **Authentication:** ā
## Job Information
- **Job Count:** 3
- **Can List Jobs:** ā
## Performance
- **Performance Rating:** Good
## Recommendations
- š” Found 3 job(s). All systems appear to be working correctly.
Claude Desktop Integration
To use with Claude Desktop, add this to your claude_desktop_config.json:
{
"mcpServers": {
"cronlytic": {
"command": "python",
"args": ["-m", "cronlytic_mcp_server.server"],
"env": {
"CRONLYTIC_API_KEY": "your_api_key_here",
"CRONLYTIC_USER_ID": "your_user_id_here"
}
}
}
}
To run virtual environment of python
{
"mcpServers": {
"cronlytic": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "PATH/cronlytic-mcp-server",
"env": {
"VIRTUAL_ENV": "PATH/cronlytic-mcp-server/.venv",
"PATH": "PATH/cronlytic-mcp-server/.venv/bin:${PATH}",
"CRONLYTIC_API_KEY": "your_api_key_here",
"CRONLYTIC_USER_ID": "your_user_id_here"
}
}
}
}
Development
Project Structure
cronlytic-mcp-server/
āāā src/
ā āāā __init__.py # Package initialization
ā āāā server.py # Main MCP server implementation
ā āāā cronlytic_client.py # Cronlytic API client wrapper
ā āāā tools/ # Tool implementations
ā ā āāā __init__.py
ā ā āāā health_check.py # Health check tool
ā āāā resources/ # Resource implementations (Phase 4)
ā āāā prompts/ # Prompt implementations (Phase 5)
ā āāā utils/ # Utility modules
ā āāā __init__.py
ā āāā auth.py # Authentication handling
ā āāā errors.py # Custom error classes
ā āāā validation.py # Input validation
āāā tests/ # Test files (Phase 6)
āāā config/
ā āāā example_config.json # Example configuration
āāā requirements.txt
āāā pyproject.toml
āāā README.md
Running in Development Mode
# Activate virtual environment (if not already active)
source venv/bin/activate
# Install in development mode (if not already done)
pip install -e .
# Set environment variables for testing
export CRONLYTIC_API_KEY="your_test_key"
export CRONLYTIC_USER_ID="your_test_user_id"
# Run with debug logging
python -m cronlytic_mcp_server.server --debug
# Run validation tests
python validate_phase1.py
# Format code (if you have development dependencies)
black src/
ruff check src/
# Type checking
mypy src/
Testing with MCP Inspector
# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector
# Test the server
mcp-inspector python -m cronlytic_mcp_server.server
Error Handling
The server provides comprehensive error handling:
- Authentication Errors: Clear guidance on credential issues
- Connection Errors: Network and connectivity diagnostics
- Validation Errors: Detailed field-by-field validation messages
- API Errors: Proper error codes and user-friendly messages
- Rate Limiting: Automatic retry with exponential backoff
Logging
Structured logging is provided at multiple levels:
# Normal operation
2025-01-27 10:30:00 - cronlytic_mcp_server.server - INFO - Cronlytic MCP Server initialized
# Debug mode
python -m cronlytic_mcp_server.server --debug
Roadmap
Phase 2: Basic CRUD Operations (Next)
create_job- Create new cron jobslist_jobs- List all user jobsget_job- Get specific job detailsupdate_job- Update existing jobsdelete_job- Delete jobs permanently
Phase 3: Advanced Job Management
pause_job- Pause job executionresume_job- Resume paused jobsget_job_logs- Retrieve execution logs
Phase 4: Resources Implementation
- Dynamic job resources
- Cron template library
- Real-time resource updates
Phase 5: Prompts & UX
- Interactive job creation flows
- Monitoring and troubleshooting guidance
- User experience optimization
Phase 6: Testing & Documentation
- Comprehensive test suite
- Performance optimization
- Complete documentation
Contributing
This project follows a structured development approach with clearly defined phases. Each phase builds upon the previous one to ensure stability and maintainability.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests (Phase 6)
- Submit a pull request
License
MIT License - see LICENSE file for details.
Support
- Documentation: See
docs/directory for detailed specifications - Issues: Report bugs and feature requests on GitHub
- API Reference: Check
docs/cronlytic-API-specification.md
Related Projects
- Cronlytic - The cron job monitoring service
- Model Context Protocol - The open protocol for AI integration
- Claude Desktop - AI assistant with MCP support
Current Version: 0.1.0 Last Updated: Jun 2025
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.