abpframework/abp · critical · CliUsageException

Your license has expired. Please renew your license to use t

Error message

Your license has expired. Please renew your license to use the MCP server.

What it means

Thrown by McpCommand.ValidateLicenseAsync when the license exists and HasActiveLicense is true, but LicenseEndTime is in the past (LicenseEndTime.Value < DateTime.UtcNow). This is the third and final license gate: a valid but expired license still blocks MCP server usage.

Source

Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/McpCommand.cs:140

    {
        var loginInfo = await _authService.GetLoginInfoAsync();

        if (string.IsNullOrEmpty(loginInfo?.Organization))
        {
            throw new CliUsageException("Please log in with your account!");
        }
        
        var licenseResult = await _apiKeyService.GetApiKeyOrNullAsync();

        if (licenseResult == null || !licenseResult.HasActiveLicense)
        {
            var errorMessage = licenseResult?.ErrorMessage ?? "No active license found.";
            throw new CliUsageException(errorMessage);
        }

        if (licenseResult.LicenseEndTime.HasValue && licenseResult.LicenseEndTime.Value < DateTime.UtcNow)
        {
            throw new CliUsageException("Your license has expired. Please renew your license to use the MCP server.");
        }
    }

    private Task PrintConfigurationAsync()
    {
        var config = new McpClientConfiguration
        {
            McpServers = new Dictionary<string, McpServerConfig>
            {
                ["abp"] = new McpServerConfig
                {
                    Command = "abp",
                    Args = new List<string> { "mcp" },
                    Env = new Dictionary<string, string>()
                }
            }
        };

View on GitHub (pinned to 7ed43b1931)

Solutions

  1. Renew your ABP Commercial license through the ABP.IO portal
  2. If recently renewed, re-login to refresh the cached license data: `abp login your-email -p password`
  3. Verify your system clock is correct (significant skew can cause false positives)
  4. Contact ABP support if you believe the expiration date is incorrect

Example fix

N/A
Defensive patterns

Strategy: validation

Validate before calling

// Check license expiration before running MCP commands
var license = await apiKeyService.GetApiKeyOrNullAsync();
if (license?.LicenseEndTime.HasValue == true && license.LicenseEndTime.Value < DateTime.UtcNow)
{
    Console.Error.WriteLine($"Error: License expired on {license.LicenseEndTime:O}. Renew to continue.");
    return;
}

Try / catch

try
{
    await mcpCommand.ExecuteAsync(commandLineArgs);
}
catch (CliUsageException ex) when (ex.Message.Contains("license has expired"))
{
    logger.LogError("License expired. Renew at abp.io and re-login: abp login <email>");
}

Prevention

When it happens

Trigger: The user's ABP Commercial license end date has passed. licenseResult.LicenseEndTime.HasValue is true and the date is earlier than the current UTC time.

Common situations: Annual/subscription license that was not renewed before the end date, trial that expired, or a system clock skew that makes a valid license appear expired (rare, but possible).

Related errors


AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13). Data as JSON: /api/errors/bd550dba3a467f2e. Report an issue: GitHub.