Skip to main content
Glama
mehmetfiskindal

Cursor Pro Limits MCP Server

check_alerts

Monitor Cursor Pro usage limits and API quotas for Sonnet 4.5, Gemini, and GPT-5 services to receive alerts when approaching subscription thresholds.

Instructions

Check for services approaching or exceeding limits

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary MCP tool handler for 'check_alerts'. Calls monitor.checkAlerts(), formats alerts into Markdown summary with status emojis and details if any, or no-alerts message.
      private async handleCheckAlerts() {
        const alerts = this.monitor.checkAlerts();
    
        if (alerts.length === 0) {
          return {
            content: [
              {
                type: 'text',
                text: '✅ No alerts - all services are within normal limits.',
              },
            ],
          };
        }
    
        const alertContent = alerts
          .map(alert => {
            const status = alert.isCritical ? '🔴 CRITICAL' : '🟡 WARNING';
            return `- **${alert.service.toUpperCase()}**: ${status} (${alert.percentage.toFixed(1)}% used)`;
          })
          .join('\n');
    
        const content = `
    # Alert Summary
    
    ${alertContent}
    
    ## Details
    ${alerts
      .map(alert =>
        `
    ### ${alert.service.toUpperCase()}
    - Current: ${alert.current}/${alert.max}
    - Percentage: ${alert.percentage.toFixed(1)}%
    - Remaining: ${alert.remaining}
    - Status: ${alert.isCritical ? 'CRITICAL' : 'WARNING'}
        `.trim()
      )
      .join('\n')}
        `.trim();
    
        return {
          content: [
            {
              type: 'text',
              text: content,
            },
          ],
        };
      }
  • src/index.ts:63-70 (registration)
    Tool registration in ListTools response: defines name 'check_alerts', description, and empty input schema (no parameters required).
    {
      name: 'check_alerts',
      description: 'Check for services approaching or exceeding limits',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Helper method in CursorLimitsMonitor that checks all services for warning (>=80%) or critical (>=95%) usage and returns array of ServiceUsage for alerting services.
    public checkAlerts(): ServiceUsage[] {
      const services: Array<'sonnet45' | 'gemini' | 'gpt5' | 'total'> = [
        'sonnet45',
        'gemini',
        'gpt5',
        'total',
      ];
    
      return services
        .map(service => this.getServiceUsage(service))
        .filter(usage => usage.isWarning || usage.isCritical);
    }
  • TypeScript interface defining ServiceUsage structure used for alert outputs, including flags for warning and critical thresholds.
    export interface ServiceUsage {
      service: ServiceType;
      current: number;
      max: number;
      percentage: number;
      remaining: number;
      isWarning: boolean;
      isCritical: boolean;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mehmetfiskindal/cursor-pro-limits-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server