Skip to main content
Glama
mehmetfiskindal

Cursor Pro Limits MCP Server

check_alerts

Monitor Cursor Pro usage limits and API quotas across AI services like Sonnet 4.5, Gemini, and GPT-5. Get alerts when approaching subscription limits to prevent service interruptions.

Instructions

Check for services approaching or exceeding limits

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'check_alerts': fetches alerts from monitor and returns formatted markdown response with summary and details.
    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)
    Registration of 'check_alerts' tool in ListTools response, including name, description, and empty input schema.
    { name: 'check_alerts', description: 'Check for services approaching or exceeding limits', inputSchema: { type: 'object', properties: {}, }, },
  • Core implementation logic: iterates over services, computes usage, filters for warning (≥80%) or critical (≥95%) levels.
    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); }

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