Skip to main content
Glama
license-tools.jsβ€’11.9 kB
import { licenseManager, LICENSE_TIERS } from '../utils/license.js'; import { logger } from '../utils/logger.js'; import { validateString } from '../utils/validation.js'; export const licenseTools = { 'mcp__gemini__license_info': { description: 'Get detailed information about your current license, usage, and features', parameters: { include_usage: { type: 'boolean', description: 'Include detailed usage statistics', default: true } }, handler: async (args) => { const { include_usage = true } = args; const licenseInfo = licenseManager.getLicenseInfo(); const validation = await licenseManager.validateLicense(); let response = `# πŸ“œ License Information **Current License**: ${licenseInfo.tierName} (${licenseInfo.tier}) **Status**: ${validation.valid ? 'βœ… Active' : '❌ ' + validation.reason} **Price**: $${licenseInfo.price}${licenseInfo.price > 0 ? '/month' : ' (FREE)'} ## πŸ“… License Details - **Issued**: ${licenseInfo.issued ? new Date(licenseInfo.issued).toLocaleDateString() : 'N/A'} - **Expires**: ${licenseInfo.expires ? new Date(licenseInfo.expires).toLocaleDateString() : 'Never (FREE tier)'}`; if (validation.reason && !validation.valid) { response += `\n\n⚠️ **Issue**: ${validation.reason}`; if (validation.expiredOn) { response += `\n- Expired on: ${new Date(validation.expiredOn).toLocaleDateString()}`; } response += `\n\nπŸ”— **Renew License**: https://gemini-mcp.com/renew`; } if (include_usage) { response += `\n\n## πŸ“Š Usage Statistics **Daily Usage**: - Used: ${licenseInfo.usage.daily.used}/${licenseInfo.usage.daily.limit === Infinity ? '∞' : licenseInfo.usage.daily.limit} - Remaining: ${licenseInfo.usage.daily.limit === Infinity ? '∞' : licenseInfo.usage.daily.limit - licenseInfo.usage.daily.used} - Reset: Tomorrow at midnight UTC **Monthly Usage**: - Used: ${licenseInfo.usage.monthly.used}/${licenseInfo.usage.monthly.limit === Infinity ? '∞' : licenseInfo.usage.monthly.limit} - Remaining: ${licenseInfo.usage.monthly.limit === Infinity ? '∞' : licenseInfo.usage.monthly.limit - licenseInfo.usage.monthly.used} - Reset: 1st of next month **Total Lifetime**: ${licenseInfo.usage.total} calls`; } response += `\n\n## πŸ› οΈ Available Tools`; if (Array.isArray(licenseInfo.features)) { response += `\n- **Total**: ${licenseInfo.features.length} tools`; response += `\n\n**Your Tools**:`; licenseInfo.features.forEach((tool, i) => { response += `\n${i + 1}. ${tool}`; }); } else { response += `\n- **Total**: ALL 23 tools (Full Access) ✨`; } const tierConfig = LICENSE_TIERS[licenseInfo.tier]; response += `\n\n## βš™οΈ Features & Limits - **Max Code Size**: ${tierConfig.restrictions.maxCodeSize === Infinity ? 'Unlimited' : `${tierConfig.restrictions.maxCodeSize} characters`} - **Max Response Time**: ${tierConfig.restrictions.maxResponseTime / 1000} seconds - **Priority**: ${tierConfig.restrictions.priority || 'Standard'}`; if (tierConfig.restrictions.analytics) { response += `\n- **Analytics**: βœ… Advanced`; } if (tierConfig.restrictions.teamAccess) { response += `\n- **Team Access**: βœ… Enabled`; } if (tierConfig.restrictions.customModels) { response += `\n- **Custom Models**: βœ… Supported`; } if (licenseInfo.tier === 'FREE') { response += `\n\n## πŸš€ Upgrade to Pro or Enterprise **Why Upgrade?** - πŸ”“ Unlock 19-23 advanced tools - ⚑ Higher API limits (1,000-unlimited/day) - 🎯 Priority processing - πŸ’Ό Business intelligence tools (Enterprise) - πŸ“Š Advanced analytics **Pricing**: - **Pro**: $49/month - Perfect for professionals - **Enterprise**: $499/month - Full power for teams πŸ”— **Upgrade Now**: https://gemini-mcp.com/pricing 🎁 **Start 14-Day Trial**: https://gemini-mcp.com/trial`; } return response; } }, 'mcp__gemini__activate_license': { description: 'Activate a license key to unlock premium features', parameters: { license_key: { type: 'string', description: 'Your license key from Gemini MCP', required: true } }, handler: async (args) => { const { license_key } = args; validateString(license_key, 'license_key', 50, 1000); try { const result = await licenseManager.activateLicense(license_key); const tierConfig = LICENSE_TIERS[result.license.tier]; return `# βœ… License Activated Successfully! **Tier**: ${tierConfig.name} (${result.license.tier}) **Expires**: ${result.license.expires ? new Date(result.license.expires).toLocaleDateString() : 'Never'} ## πŸŽ‰ Welcome to ${tierConfig.name}! You now have access to: ${tierConfig.features === '*' ? '- βœ… ALL 23 Tools (Full Access)' : `- βœ… ${tierConfig.features.length} Advanced Tools`} - πŸ“ž ${tierConfig.maxCallsPerDay === Infinity ? 'Unlimited' : tierConfig.maxCallsPerDay} API calls per day - πŸ“… ${tierConfig.maxCallsPerMonth === Infinity ? 'Unlimited' : tierConfig.maxCallsPerMonth} API calls per month ${tierConfig.restrictions.priority ? `- ⚑ ${tierConfig.restrictions.priority.toUpperCase()} priority processing` : ''} ${tierConfig.restrictions.analytics ? '- πŸ“Š Advanced analytics' : ''} ${tierConfig.restrictions.teamAccess ? '- πŸ‘₯ Team collaboration' : ''} ## πŸš€ Next Steps 1. **Verify Tools**: Run \`mcp__gemini__license_info\` to see your new features 2. **Explore**: Try the advanced tools like \`chat_plus\`, \`codereview_expert\`, etc. 3. **Documentation**: Visit https://gemini-mcp.com/docs for guides **Need Help?** Contact support@gemini-mcp.com Thank you for choosing Gemini MCP! 🎊`; } catch (error) { logger.error('License activation failed', { error: error.message }); return `# ❌ License Activation Failed **Error**: ${error.message} ## πŸ” Troubleshooting 1. **Check License Key**: Ensure you copied the entire key 2. **Verify Email**: Make sure you received the key from gemini-mcp.com 3. **Check Expiration**: License may have expired ## πŸ“ž Need Help? - **Support**: support@gemini-mcp.com - **Purchase**: https://gemini-mcp.com/pricing - **Documentation**: https://gemini-mcp.com/docs/activation`; } } }, 'mcp__gemini__start_trial': { description: 'Start a 14-day free trial with full access to all features', parameters: { email: { type: 'string', description: 'Your email address', required: true } }, handler: async (args) => { const { email } = args; validateString(email, 'email', 5, 100); // Basic email validation if (!email.includes('@') || !email.includes('.')) { return `# ❌ Invalid Email Please provide a valid email address to start your trial. **Example**: user@example.com`; } try { const result = await licenseManager.startTrial(email); return `# πŸŽ‰ Trial Activated! **Welcome to your 14-day Gemini MCP Trial!** ## πŸ“§ Trial Details - **Email**: ${email} - **Duration**: 14 days - **Access**: ALL 23 Premium Tools - **Expires**: ${new Date(Date.now() + 14 * 24 * 60 * 60 * 1000).toLocaleDateString()} ## ✨ What's Included **All Enhanced Tools (10)**: - Multi-model AI collaboration - Advanced code review with risk scoring - Quantum-grade security auditing - Deep reasoning and planning - And more! **Business Intelligence (4)**: - Financial impact analysis - Performance prediction - Team orchestration - Quality monitoring **Unlimited Features**: - 100 API calls per day - All 23 tools unlocked - Priority support ## πŸ”‘ Your Trial License Key \`\`\` ${result.licenseKey} \`\`\` **Already Activated!** Start using premium features immediately. ## πŸš€ Next Steps 1. **Explore Tools**: Try \`mcp__gemini__chat_plus\` for advanced AI 2. **Analyze Code**: Run \`mcp__gemini__analyze_codebase\` for insights 3. **Business Intel**: Use \`mcp__gemini__financial_impact\` for ROI analysis ## πŸ’‘ Trial Tips - Trial expires in 14 days - No credit card required - Full access to all features - Convert to paid anytime ## πŸ“ž Questions? - **Support**: support@gemini-mcp.com - **Pricing**: https://gemini-mcp.com/pricing - **Docs**: https://gemini-mcp.com/docs **Enjoy your trial!** 🎊`; } catch (error) { logger.error('Trial activation failed', { error: error.message }); return `# ❌ Trial Activation Failed **Error**: ${error.message} ## πŸ“ž Get Help Contact support@gemini-mcp.com or visit https://gemini-mcp.com/trial`; } } }, 'mcp__gemini__check_upgrade': { description: 'Check upgrade options and pricing for your current tier', parameters: {}, handler: async () => { const licenseInfo = licenseManager.getLicenseInfo(); const currentTier = licenseInfo.tier; let response = `# πŸš€ Upgrade Options **Current Tier**: ${licenseInfo.tierName} (${currentTier}) `; if (currentTier === 'FREE' || currentTier === 'TRIAL') { response += `## πŸ’Ό Professional ($49/month) **Perfect for professional developers** **What You Get**: - βœ… 19 Advanced Tools (vs your ${Array.isArray(licenseInfo.features) ? licenseInfo.features.length : '4'}) - βœ… 1,000 API calls/day (vs your 50-100) - βœ… 25,000 API calls/month - βœ… Enhanced AI tools (chat_plus, codereview_expert, etc.) - βœ… Advanced analysis and debugging - βœ… Priority support - βœ… 50KB max code size **Price**: $49/month **Save**: 20% with annual billing ($470/year) πŸ”— **Upgrade to Pro**: https://gemini-mcp.com/pricing/pro --- ## 🏒 Enterprise ($499/month) **For teams and organizations** **Everything in Pro, PLUS**: - βœ… ALL 23 Tools (including 4 exclusive business tools) - βœ… UNLIMITED API calls - βœ… UNLIMITED code size - βœ… Business intelligence tools: - Financial impact analysis - Performance prediction - Team orchestration - Quality monitoring - βœ… Dedicated support (4h SLA) - βœ… Team access - βœ… Custom models - βœ… Advanced analytics - βœ… White-label options **Price**: $499/month **Save**: Custom pricing for annual contracts πŸ”— **Contact Sales**: https://gemini-mcp.com/contact-sales`; } else if (currentTier === 'PRO') { response += `## 🏒 Upgrade to Enterprise **Unlock the Full Power** **Additional Features**: - βœ… 4 Exclusive Business Tools: - Financial Impact Analysis - Performance Predictor - Team Orchestrator - Quality Guardian - βœ… Unlimited API calls (vs 1,000/day) - βœ… Unlimited code size (vs 50KB) - βœ… Dedicated support (4h SLA) - βœ… Team collaboration - βœ… Custom AI models - βœ… Advanced analytics dashboard - βœ… On-premise deployment option **Price**: $499/month (save with annual billing) πŸ”— **Upgrade to Enterprise**: https://gemini-mcp.com/contact-sales`; } else { response += `## πŸŽ‰ You're on the Highest Tier! You have access to ALL features and tools. Thank you for being an Enterprise customer! **Need More?** - Custom features - Dedicated infrastructure - Volume licensing - Training and onboarding πŸ”— **Contact Your Account Manager**: enterprise@gemini-mcp.com`; } response += `\n\n## πŸ’° Current Pricing Summary | Tier | Price | Tools | Daily Calls | Monthly Calls | |------|-------|-------|-------------|---------------| | Free | $0 | 4 | 50 | 1,000 | | Pro | $49/mo | 19 | 1,000 | 25,000 | | Enterprise | $499/mo | 23 | Unlimited | Unlimited | ## 🎁 Special Offers - πŸŽ“ **Students**: 50% off Pro (verify .edu email) - πŸ’Ό **Startups**: 3 months free Pro - 🏒 **Volume**: Custom pricing for 10+ seats - πŸ“… **Annual**: Save 20% with yearly billing πŸ”— **View All Offers**: https://gemini-mcp.com/offers`; return response; } } };

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/emmron/gemini-mcp'

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