{"record":{"id":"bd550dba3a467f2e","repo":"abpframework/abp","slug":"your-license-has-expired-please-renew-your-licens","errorCode":null,"errorMessage":"Your license has expired. Please renew your license to use the MCP server.","messagePattern":"Your license has expired\\. Please renew your license to use the MCP server\\.","errorType":"validation","errorClass":"CliUsageException","httpStatus":null,"severity":"critical","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/McpCommand.cs","lineNumber":140,"sourceCode":"    {\n        var loginInfo = await _authService.GetLoginInfoAsync();\n\n        if (string.IsNullOrEmpty(loginInfo?.Organization))\n        {\n            throw new CliUsageException(\"Please log in with your account!\");\n        }\n        \n        var licenseResult = await _apiKeyService.GetApiKeyOrNullAsync();\n\n        if (licenseResult == null || !licenseResult.HasActiveLicense)\n        {\n            var errorMessage = licenseResult?.ErrorMessage ?? \"No active license found.\";\n            throw new CliUsageException(errorMessage);\n        }\n\n        if (licenseResult.LicenseEndTime.HasValue && licenseResult.LicenseEndTime.Value < DateTime.UtcNow)\n        {\n            throw new CliUsageException(\"Your license has expired. Please renew your license to use the MCP server.\");\n        }\n    }\n\n    private Task PrintConfigurationAsync()\n    {\n        var config = new McpClientConfiguration\n        {\n            McpServers = new Dictionary<string, McpServerConfig>\n            {\n                [\"abp\"] = new McpServerConfig\n                {\n                    Command = \"abp\",\n                    Args = new List<string> { \"mcp\" },\n                    Env = new Dictionary<string, string>()\n                }\n            }\n        };\n","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/McpCommand.cs#L122-L158","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Renew your ABP Commercial license through the ABP.IO portal","If recently renewed, re-login to refresh the cached license data: `abp login your-email -p password`","Verify your system clock is correct (significant skew can cause false positives)","Contact ABP support if you believe the expiration date is incorrect"],"exampleFix":"N/A","handlingStrategy":"validation","validationCode":"// Check license expiration before running MCP commands\nvar license = await apiKeyService.GetApiKeyOrNullAsync();\nif (license?.LicenseEndTime.HasValue == true && license.LicenseEndTime.Value < DateTime.UtcNow)\n{\n    Console.Error.WriteLine($\"Error: License expired on {license.LicenseEndTime:O}. Renew to continue.\");\n    return;\n}","typeGuard":null,"tryCatchPattern":"try\n{\n    await mcpCommand.ExecuteAsync(commandLineArgs);\n}\ncatch (CliUsageException ex) when (ex.Message.Contains(\"license has expired\"))\n{\n    logger.LogError(\"License expired. Renew at abp.io and re-login: abp login <email>\");\n}","preventionTips":["Track your license renewal date and renew before expiry","Re-login after renewal to refresh cached license data","Verify system clock accuracy, as expiration is checked against DateTime.UtcNow"],"tags":["cli","abp-cli","mcp","license","expiration"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}