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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。