home / mcp / sidekiq mcp server
Provides an MCP server to query Sidekiq statistics, queues, and job management actions via HTTP.
Configuration
View docs{
"mcpServers": {
"andrew-sidekiq-mcp": {
"url": "http://localhost:3000/sidekiq-mcp",
"headers": {
"SIDEKIQ_MCP_TOKEN": "YOUR_TOKEN"
}
}
}
}You deploy a Sidekiq MCP server to give large language models a standardized way to interact with Sidekiq queues, statistics, and failed jobs. This enables you to monitor, inspect, and manage jobs from your AI workflows with consistent endpoints and real-time updates.
You access the MCP server through a remote endpoint to inspect queues, monitor statistics, and perform common job management actions. Use an MCP client or your integration to query tools such as sidekiq_stats, queue_details, failed_jobs, and stream_stats. You can also perform actions like retrying a failed job, rescheduling a scheduled job, or clearing a queue. Real-time updates can be streamed if you enable Server-Sent Events (SSE). Keep your authentication token ready and include it in your requests.
Prerequisites you need before installing the MCP server: Ruby and Bundler (since this is a Ruby gem-based MCP server). You should also have a working Rails or Rack-based application if you plan to integrate through Rails or Rack middleware.
# Add the gem to your Gemfile
gem 'sidekiq-mcp'
```
```
bundle installConfiguration and integration notes help you enable the MCP server and tailor access. The MCP server exposes a path (default: /sidekiq-mcp) where clients connect to request data and issue actions. You can enable Server-Sent Events for real-time updates and set an authentication token to secure access.
Rails integration example shows how to activate the MCP server in an initializer and enable the endpoint at the default path.
# 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
```
```text
The MCP server will be available at the configured path (default: /sidekiq-mcp).If you are not using Rails, you can add the middleware to your Rack stack to enable MCP access.
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::MiddlewareThe MCP server supports two authentication methods for client requests. Use a Bearer token or HTTP Basic authentication. For Bearer authentication, include a header like Authorization: Bearer your-token. For HTTP Basic, provide any username with your token as the password.
Clients can invoke the MCP endpoint using HTTP requests. For example, send a POST to the MCP URL with the appropriate authentication header.
Get general Sidekiq statistics such as processed, failed, busy, and enqueued counts.
Breakdown of job counts, retries, and error rates by job class.
Show how many workers are running and how many are currently busy.
Assess whether queues are backed up or healthy using simple heuristics.
List all queues with their sizes and latency.
Get detailed information about a specific queue, including jobs.
List currently busy workers and the jobs they are executing.
List failed jobs with error details for troubleshooting.
List jobs in the retry set that will be retried.
List jobs in the scheduled set.
Show jobs in the dead set after exhausting retries.
Show arguments, error messages, and history for a job by JID.
Retry a failed job by JID.
Delete a failed job by JID.
Remove a job from any set (queue/schedule/retry/dead) by JID.
Reschedule a job in the scheduled set to a new time.
Move a job from retry or scheduled sets to the dead set.
Clear all jobs from a specific queue (destructive operation).
Start streaming real-time Sidekiq statistics via SSE.
Get detailed information about all Sidekiq processes and workers.