Hangfire MCP

by inansen

Not rated
GitHub

About

MCP server for managing Hangfire background jobs

Details

Author
inansen
Categories
Developer Tools, Project Management, Infrastructure

Setup

Install Hangfire MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/inansen/hangfire-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

AModel Context Protocol (MCP)server for managingHangfirebackground jobs directly from VS Code Copilot and other MCP-compatible clients. Monitor job queues, retry failed jobs, manage recurring tasks, and view real-time statistics — all without leaving your editor.

- Job Management: List, view, retry, delete, and requeue jobs
- Recurring Jobs: List, view, trigger, pause, and resume recurring jobs
- Statistics: View server stats, queues, and active servers
- Auto-Discovery: Automatically finds connection strings from appsettings.json
- Web Dashboard: Built-in web UI with real-time stats and job management

# Clone the repo git clone https://github.com/inansen/hangfire-mcp.git cd hangfire-mcp # Run cross-platform setup (Windows, macOS, Linux) python setup.py

- Create a virtual environment
- Install all dependencies (including dashboard)
- Prompt for your SQL Server connection string (or read from.vscode/mcp.json)
- Create VS Code MCP configuration
- Test the connection
- Optionally start the dashboard

Add to your VS Code settings (settings.json):

{ "mcp": { "servers": { "hangfire-mcp": { "command": "uvx", "args": ["hangfire-mcp", "--workspace", "${workspaceFolder}"] } } } }

Create.vscode/mcp.jsonin your project:

{ "servers": { "hangfire-mcp": { "command": "uvx", "args": ["hangfire-mcp", "--workspace", "${workspaceFolder}"] } } }
{ "servers": { "hangfire-mcp": { "command": "python", "args": ["-m", "hangfire_mcp", "--workspace", "${workspaceFolder}"], "env": { "HANGFIRE_CONNECTION_STRING": "Driver={ODBC Driver 17 for SQL Server};Server=localhost;Database=Hangfire;UID=sa;PWD=yourpassword;Encrypt=no;" } } } }

Note:This project usespyodbcand requires ODBC-format connection strings, not ADO.NET format.

The server finds connection strings in this priority order:
- --connection-stringCLI argument
- HANGFIRE_CONNECTION_STRINGenvironment variable
- Auto-discover from${workspaceFolder}//appsettings.json
- User config at~/.config/hangfire-mcp/connections.json(Linux/macOS) or%APPDATA%\hangfire-mcp\connections.json(Windows)
- Use theconfiguretool to set it manually

User: Show me failed jobs Agent: [calls list_jobs(state="Failed")] Found 3 failed jobs: | ID | State | Job Type | Created | Reason | |----|-------|----------|---------|--------| | 123 | Failed | OrderSyncJob.Execute | 2026-03-17 10:30 | Connection timeout | | 124 | Failed | EmailJob.Send | 2026-03-17 10:45 | SMTP error | User: Retry job 123 Agent: [calls retry_job(job_id=123)] Job 123 has been requeued to 'default' queue. User: When did CacheRefreshJob last run? Agent: [calls get_recurring_job(job_id="CacheRefreshJob")] Recurring Job: CacheRefreshJob - Cron: 0 /5    (every 5 minutes) - Last Run: 2026-03-17 12:55:00 - Queue: default User: Trigger CacheRefreshJob now Agent: [calls trigger_recurring_job(job_id="CacheRefreshJob")] CacheRefreshJob has been triggered. New job ID: 456

The package includes a built-in web dashboard for visual job management.

# Windows .\scripts\run-dashboard.ps1 # macOS / Linux chmod +x scripts/run-dashboard.sh ./scripts/run-dashboard.sh # Or manually (any platform) export HANGFIRE_CONNECTION_STRING="Driver={ODBC Driver 17 for SQL Server};Server=localhost;Database=Hangfire;..." python -m uvicorn hangfire_mcp.dashboard:app --host 127.0.0.1 --port 8080

Openhttp://127.0.0.1:8080in your browser.

- Real-time Stats: Succeeded, Failed, Processing, Enqueued, Scheduled counts
-
Job List: View all jobs with filtering by state
-
Job Actions: Retry, Delete, View details with one click
-
Recurring Jobs: Pause, Resume, Trigger recurring jobs
-
Server Status: Online/Idle/Offline status based on heartbeat
-
Auto-refresh
*: Updates every 10 seconds

- Python 3.11+
- SQL Server with Hangfire database
- ODBC Driver 17 for SQL Server (or compatible)

# Clone the repository git clone https://github.com/inansen/hangfire-mcp.git cd hangfire-mcp # Install all dependencies pip install -e ".[dev]" # Run tests pytest

- Fork the repository
- Create a feature branch (git checkout -b feature/my-feature)
- Commit your changes (git commit -am 'Add my feature')
- Push to the branch (git push origin feature/my-feature)
- Open a Pull Request

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Official MCP server for Buildable AI-powered development platform. Enables AI assistants to manage tasks, track progress, get project context, and collaborate with humans on software projects.

Enable AI Agents to fix build failures from CircleCI.

Objective-native planning board for agent-led development

Integrates with PostHog for feature flag management and error tracking.

Interact with your crash reporting and real using monitoring data on your Raygun account

Query live Mac system metrics, listening ports, and Claude Code and Codex session history.

A toolkit for autonomous agent development with tools for task management, filesystem operations, browser automation, and terminal control.

A VS Code extension with a GUI for the agentic-tools-mcp server, enhancing task and memory management.

A planning and orchestration system for AI-driven software development.

A command-line interface to prompt users for their next plan or confirmation.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.