A Sidekiq plugin that provides an MCP (Model Context Protocol) server, enabling LLMs to interact with Sidekiq queues, statistics, and failed jobs through a standardized interface.
The MCP server provides the following tools:
sidekiq_stats
- Get general Sidekiq statistics (processed, failed, busy, enqueued counts)job_class_stats
- Breakdown of job counts, retries, and error rates by classworkers_count
- Show how many workers are running and busyqueue_health
- Heuristics on whether queues are backed up or healthylist_queues
- List all queues with sizes and latencyqueue_details
- Get detailed info about a specific queue including jobsbusy_workers
- List currently busy workers and their job detailsfailed_jobs
- List failed jobs with error detailslist_retry_jobs
- List jobs in the retry set (jobs that failed but will be retried)list_scheduled_jobs
- List jobs in the scheduled setdead_jobs
- Show jobs in the dead set (jobs that have exhausted all retries)job_details
- Show args, error message, and history for a job by JIDretry_job
- Retry a failed job by JIDdelete_failed_job
- Delete a failed job by JIDremove_job
- Remove a job from any set (queue/schedule/retry/dead) by JIDreschedule_job
- Reschedule a job in the scheduled set to a new timekill_job
- Move a job from retry/scheduled set to the dead setclear_queue
- Clear all jobs from a specific queue (destructive operation)stream_stats
- Start streaming real-time Sidekiq statistics (use with SSE)process_set
- Get detailed information about all Sidekiq processes/workersOnce configured, you can ask your LLM:
Add this line to your application's Gemfile:
And then execute:
The gem automatically integrates with Rails applications. Configure it in an initializer:
# config/initializers/sidekiq_mcp.rb Sidekiq::Mcp.configure do |config| config.enabled = true config.path = "/sidekiq-mcp" config.auth_token = Rails.application.credentials.sidekiq_mcp_token config.sse_enabled = true # Enable Server-Sent Events for real-time updates end
The MCP server will be available at the configured path (default: /sidekiq-mcp
).
For non-Rails applications, add the middleware to your Rack stack:
require 'sidekiq/mcp' # Configure Sidekiq::Mcp.configure do |config| config.auth_token = "your-secret-token" end # Add to your config.ru or middleware stack use Sidekiq::Mcp::Middleware
The MCP server supports two authentication methods:
Authorization: Bearer your-token
headerExample configuration for different MCP clients:
Add to your claude_desktop_config.json
:
{ "mcpServers": { "sidekiq": { "command": "curl", "args": [ "-X", "POST", "-H", "Content-Type: application/json", "-H", "Authorization: Bearer your-secret-token", "http://localhost:3000/sidekiq-mcp" ] } } }VS Code with Claude Extension
Configure in your VS Code settings:
{ "claude.mcpServers": { "sidekiq": { "url": "http://localhost:3000/sidekiq-mcp", "headers": { "Authorization": "Bearer your-secret-token" } } } }
Add to your Cursor configuration:
{ "mcp": { "servers": { "sidekiq": { "command": ["curl"], "args": [ "-X", "POST", "-H", "Content-Type: application/json", "-H", "Authorization: Bearer your-secret-token", "http://localhost:3000/sidekiq-mcp" ] } } } }
Configure via CLI:
claude mcp add --transport http sidekiq-mcp-server http://localhost:3000/sidekiq-mcp
Or add to your MCP configuration:
{ "sidekiq-mcp": { "endpoint": "http://localhost:3000/sidekiq-mcp", "auth": { "type": "bearer", "token": "your-secret-token" } } }
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests.
The example/
directory contains a sample Rails application demonstrating the integration.
Bug reports and pull requests are welcome on GitHub at https://github.com/andrew/sidekiq-mcp.
The gem is available as open source under the terms of the MIT License.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4