claude -scheduler
Use Claude API to prompt remote agents on a cron interval but use local MCPs to handle tool calls for context
claude mcp add --transport stdio tonybentley-claude-mcp-scheduler npx -y @modelcontextprotocol/server-filesystem
How to use
This MCP server demonstrates how to schedule Claude AI prompts using a filesystem-based MCP server connection. The scheduler connects to the local filesystem MCP server to read/write data and execute prompts via Claude, enabling automated, unattended tasks. The example configuration focuses on the filesystem MCP server, but the architecture supports adding other MCP servers (like databases or APIs) by extending the mcp section. To use it, configure a cron-based schedule that sends a prompt to Claude and stores the results in the specified outputs directory, enabling you to manage and review results later. The included test utilities let you validate prompts before scheduling, ensuring your prompts, outputs, and error handling behave as expected. This setup is suitable for batch processing, daily analyses, or recurring file-based operations integrated with Claude’s capabilities.
How to install
Prerequisites:
- Node.js v18.0.0 or higher
- Anthropic API key
- npm or yarn
Install and run:
- Clone the repository
git clone https://github.com/tonybentley/claude-mcp-scheduler.git
cd claude-mcp-scheduler
- Install dependencies
npm install
- Create a .env file with your Anthropic API key
ANTHROPIC_API_KEY=your-api-key-here
- Copy the example configuration (adjust paths as needed)
cp config/config.example.json config/config.json
- Start the scheduler
npm start
Optional: If you want to customize the MCP server integration, edit config/config.json to reference additional MCP servers and their connection details. The filesystem MCP server is demonstrated using npx and the server-filesystem package as shown in the example.
Additional notes
Tips and common issues:
- Ensure Node.js is installed and the correct version is in use.
- The Anthropic API key must be kept secure; store it in environment variables and avoid committing it to version control.
- The filesystem MCP server example restricts access to configured directories (e.g., ./data, ./reports). Ensure these directories exist and have proper permissions.
- When adding more MCP servers (e.g., database or API), keep the command and args consistent with MCP server expectations and update the config.json accordingly.
- If prompts fail due to API rate limits, consider reducing schedule frequency or increasing delays between prompts.
- Use the test-prompt utilities to validate prompts before enabling schedules to minimize runtime errors.
- Review logs in the logs directory for troubleshooting, including connection issues to the MCP server and CAPTCHA-like prompts.
Related MCP Servers
mcp-graphql
Model Context Protocol server for GraphQL
tableau
Tableau's official MCP Server. Helping Agents see and understand data.
ghost
A Model Context Protocol (MCP) server for interacting with Ghost CMS through LLM interfaces like Claude. Allow you to control your Ghost blog by simply asking Claude etc.
any-script
An MCP server that exposes arbitrary CLI tools and shell scripts as MCP Tools
filesystem
A Model Context Protocol (MCP) server for platform-agnostic file capabilities, including advanced search/replace and directory tree traversal
prometheus
A Model Context Protocol (MCP) server implementation that provides AI agents with programmatic access to Prometheus metrics via a unified interface.