1. Conduid
  2. Developer Tools
  3. Nall.HangfireMCP
MCP server · Developer Tools

Nall.HangfireMCP

Hangfire MCP Server

Unclaimed last commit a year ago devtools
34Low

Scored 7 months ago · breakdown

About Nall.HangfireMCP

Nall.HangfireMCP is an MCP server published by NikiforovAll in the Developer Tools category: hangfire MCP Server.

The repository has 6 stars and 1 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/NikiforovAll/hangfire-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Nall.HangfireMCP

Powered by Claude · Grounded in docs

I know everything about Nall.HangfireMCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Hangfire MCP Build

Enqueue background jobs using Hangfire MCP server.

Motivation

Interaction with Hangfire using Hangfire MCP Server allows you to enqueue jobs from any client that supports MCP protocol. For example, you can use Hangfire MCP directly from VS Code in Agent Mode and enqueue jobs. It makes possible to execute any kind of code without writing additional code.

Here is MCP Server configuration for VS Code:

{
    "servers": {
        "hangfire-mcp": {
            "url": "http://localhost:3001"
        }
    }
}

Code Example

Here is how it works:

sequenceDiagram
    participant User as User
    participant MCPHangfire as MCP Hangfire
    participant IBackgroundJobClient as IBackgroundJobClient
    participant Database as Database
    participant HangfireServer as Hangfire Server

    User->>MCPHangfire: Enqueue Job
    MCPHangfire->>IBackgroundJobClient: Send Job Message
    IBackgroundJobClient->>Database: Store Job Message
    HangfireServer->>Database: Fetch Job Message
    HangfireServer->>HangfireServer: Process Job

Standalone Mode

It is a regular MCP packaged as .NET global tool. Here is how to setup it as an MCP server in VSCode.

 dotnet tool install --global --add-source Nall.HangfireMCP

Configuration:

{
  "servers": {
    "hangfire-mcp-standalone": {
      "type": "stdio",
      "command": "HangfireMCP",
      "args": [
        "--stdio"
      ],
      "env": {
        "HANGFIRE_JOBS_ASSEMBLY": "path/to/Jobs.dll",
        "HANGFIRE_JOBS_MATCH_EXPRESSION": "[?IsInterface && contains(Name, 'Job')]",
        "HANGFIRE_CONNECTION_STRING": "Host=localhost;Port=5432;Username=postgres;Password=postgres;Database=hangfire"
      }
    }
  }
}

Aspire

var builder = DistributedApplication.CreateBuilder(args);

var postgresServer = builder
    .AddPostgres("postgres-server")
    .WithDataVolume()
    .WithLifetime(ContainerLifetime.Persistent);

var postgresDatabase = postgresServer.AddDatabase("hangfire");

builder.AddProject<Projects.Web>("server")
    .WithReference(postgresDatabase)
    .WaitFor(postgresDatabase);

var mcp = builder
    .AddProject<Projects.HangfireMCP_Standalone>("hangfire-mcp")
    .WithEnvironment("HANGFIRE_JOBS_ASSEMBLY", "path/to/Jobs.dll")
    .WithEnvironment("HANGFIRE_JOBS_MATCH_EXPRESSION", "[?IsInterface && contains(Name, 'Job')]")
    .WithReference(postgresDatabase)
    .WaitFor(postgresDatabase);

builder
    .AddMCPInspector()
    .WithSSE(mcp)
    .WaitFor(mcp);

builder.Build().Run();

As result, the jobs are dynamically loaded from the specified assembly and can be enqueued using MCP protocol. The rules for matching job names can be specified using HANGFIRE_JOBS_MATCH_EXPRESSION environment variable. For example, the expression [?IsInterface && contains(Name, 'Job')] will match all interfaces that contain "Job" in their name. It is a JMESPath expression, so you can define how to match job names according to your needs.

Custom Setup (as Code) Mode

You can create your own MCP server and use this project as starting point. You can extend it with your own tools and features. Here is an example of how to set up Hangfire MCP server in a custom project.

Aspire

var builder = DistributedApplication.CreateBuilder(args);

var postgresServer = builder
    .AddPostgres("postgres-server")
    .WithDataVolume()
    .WithLifetime(ContainerLifetime.Persistent);

var postgresDatabase = postgresServer.AddDatabase("hangfire");

builder.AddProject<Projects.Web>("server")
    .WithReference(postgresDatabase)
    .WaitFor(postgresDatabase);

var mcp = builder
    .AddProject<Projects.HangfireMCP>("hangfire-mcp")
    .WithReference(postgresDatabase)
    .WaitFor(postgresDatabase);

builder
    .AddMCPInspector()
    .WithSSE(mcp)
    .WaitFor(mcp);

builder.Build().Run();

Aspire Dashboard

MCP Server

var builder = WebApplication.CreateBuilder(args);

builder.WithMcpServer(args).WithToolsFromAssembly();
builder.Services.AddHangfire(cfg => cfg.UsePostgreSqlStorage(options =>
    options.UseNpgsqlConnection(builder.Configuration.GetConnectionString("hangfire")))
);
builder.Services.AddHangfireMcp();
builder.Services.AddTransient<HangfireTool>();
var app = builder.Build();
app.MapMcpServer(args);
app.Run();

Here is an example of the Hangfire tool:

[McpServerToolType]
public class HangfireTool(IHangfireDynamicScheduler scheduler)
{
    [McpServerTool(Name = "RunJob")]
    public string Run(
        [Required] string jobName,
        [Required] string methodName,
        Dictionary<string, object>? parameters = null
    )
    {
        var descriptor = new JobDescriptor(jobName, methodName, parameters);
        return scheduler.Enqueue(descriptor, typeof(ITimeJob).Assembly);
    }
}

Tools

Inspector

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Nall.HangfireMCP

How do I install Nall.HangfireMCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Nall.HangfireMCP safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Nall.HangfireMCP still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.