Skip to main content
Glama
aegntic

Obsidian Elite RAG MCP Server

index.ts22.1 kB
#!/usr/bin/env node /** * MCP Server for aegnt-27: The Human Peak Protocol * * Provides Claude with access to AI authenticity achievement capabilities * through 27 distinct behavioral patterns. */ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from '@modelcontextprotocol/sdk/types.js'; import { z } from 'zod'; import 'dotenv/config'; // Tool schemas for validation const MousePathSchema = z.object({ startX: z.number().min(-10000).max(10000), startY: z.number().min(-10000).max(10000), endX: z.number().min(-10000).max(10000), endY: z.number().min(-10000).max(10000), authenticity_level: z.enum(['basic', 'advanced']).default('basic'), micro_movements: z.boolean().default(true), natural_curves: z.boolean().default(true) }); const TypingSequenceSchema = z.object({ text: z.string().min(1).max(10000), authenticity_level: z.enum(['basic', 'advanced']).default('basic'), wpm: z.number().min(20).max(200).optional(), error_rate: z.number().min(0).max(0.1).optional(), include_thinking_pauses: z.boolean().default(true) }); const ContentValidationSchema = z.object({ content: z.string().min(1).max(100000), authenticity_level: z.enum(['basic', 'advanced']).default('basic'), target_models: z.array(z.enum(['gpt_zero', 'originality_ai', 'turnitin', 'youtube'])).optional() }); const AudioProcessingSchema = z.object({ audio_description: z.string().min(1).max(1000), authenticity_level: z.enum(['basic', 'advanced']).default('basic'), add_breathing: z.boolean().default(true), voice_naturalness: z.number().min(0).max(1).default(0.8) }); // Community signup tracking interface CommunitySignup { email?: string; platforms: ('x' | 'telegram' | 'youtube' | 'discord')[]; timestamp: string; authenticity_needs: string; } class Aegnt27MCPServer { private server: Server; private signups: CommunitySignup[] = []; constructor() { this.server = new Server( { name: 'aegnt27-mcp', version: '2.7.1', }, { capabilities: { tools: {}, }, } ); this.setupToolHandlers(); this.setupErrorHandling(); } private setupErrorHandling(): void { this.server.onerror = (error) => { console.error('[MCP Error]', error); }; process.on('SIGINT', async () => { await this.server.close(); process.exit(0); }); } private setupToolHandlers(): void { this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ { name: 'achieve_mouse_authenticity', description: 'Generate authentic human mouse movement patterns with natural curves and micro-movements', inputSchema: { type: 'object', properties: { startX: { type: 'number', description: 'Starting X coordinate' }, startY: { type: 'number', description: 'Starting Y coordinate' }, endX: { type: 'number', description: 'Ending X coordinate' }, endY: { type: 'number', description: 'Ending Y coordinate' }, authenticity_level: { type: 'string', enum: ['basic', 'advanced'], description: 'Basic: 75% authenticity (free), Advanced: 96% authenticity (commercial license required)', default: 'basic' }, micro_movements: { type: 'boolean', description: 'Include natural micro-movements', default: true }, natural_curves: { type: 'boolean', description: 'Use natural Bezier curves', default: true } }, required: ['startX', 'startY', 'endX', 'endY'] } }, { name: 'achieve_typing_authenticity', description: 'Generate authentic human typing patterns with natural timing and variations', inputSchema: { type: 'object', properties: { text: { type: 'string', description: 'Text to generate typing patterns for' }, authenticity_level: { type: 'string', enum: ['basic', 'advanced'], description: 'Basic: 70% authenticity (free), Advanced: 95% authenticity (commercial license required)', default: 'basic' }, wpm: { type: 'number', description: 'Target words per minute (20-200)', minimum: 20, maximum: 200 }, error_rate: { type: 'number', description: 'Natural error rate (0-0.1)', minimum: 0, maximum: 0.1 }, include_thinking_pauses: { type: 'boolean', description: 'Include natural thinking pauses', default: true } }, required: ['text'] } }, { name: 'validate_ai_detection_resistance', description: 'Validate content against AI detection systems and provide authenticity scores', inputSchema: { type: 'object', properties: { content: { type: 'string', description: 'Content to validate for human authenticity' }, authenticity_level: { type: 'string', enum: ['basic', 'advanced'], description: 'Basic: 60-70% resistance (free), Advanced: 98%+ resistance (commercial license required)', default: 'basic' }, target_models: { type: 'array', items: { type: 'string', enum: ['gpt_zero', 'originality_ai', 'turnitin', 'youtube'] }, description: 'Specific AI detection models to test against' } }, required: ['content'] } }, { name: 'process_audio_authenticity', description: 'Apply authentic human characteristics to audio descriptions and speech patterns', inputSchema: { type: 'object', properties: { audio_description: { type: 'string', description: 'Description of audio to process' }, authenticity_level: { type: 'string', enum: ['basic', 'advanced'], description: 'Basic: 70% authenticity (free), Advanced: 94% authenticity (commercial license required)', default: 'basic' }, add_breathing: { type: 'boolean', description: 'Add natural breathing patterns', default: true }, voice_naturalness: { type: 'number', description: 'Voice naturalness factor (0-1)', minimum: 0, maximum: 1, default: 0.8 } }, required: ['audio_description'] } }, { name: 'join_community', description: 'Join the aegnt-27 community for updates, tutorials, and access to open source components', inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'Email for updates (optional)' }, platforms: { type: 'array', items: { type: 'string', enum: ['x', 'telegram', 'youtube', 'discord'] }, description: 'Social platforms to follow for community engagement' }, authenticity_needs: { type: 'string', description: 'What authenticity challenges are you trying to solve?' } }, required: ['platforms', 'authenticity_needs'] } }, { name: 'get_commercial_license_info', description: 'Get information about commercial licensing for advanced features and premium authenticity', inputSchema: { type: 'object', properties: { use_case: { type: 'string', description: 'Describe your commercial use case' }, team_size: { type: 'number', description: 'Number of developers who will use aegnt-27' }, expected_volume: { type: 'string', description: 'Expected usage volume (requests per month)' } }, required: ['use_case'] } } ] })); this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { switch (name) { case 'achieve_mouse_authenticity': return await this.handleMouseAuthenticity(args); case 'achieve_typing_authenticity': return await this.handleTypingAuthenticity(args); case 'validate_ai_detection_resistance': return await this.handleDetectionValidation(args); case 'process_audio_authenticity': return await this.handleAudioProcessing(args); case 'join_community': return await this.handleCommunityJoin(args); case 'get_commercial_license_info': return await this.handleCommercialInfo(args); default: throw new McpError( ErrorCode.MethodNotFound, `Unknown tool: ${name}` ); } } catch (error) { if (error instanceof McpError) { throw error; } throw new McpError( ErrorCode.InternalError, `Tool execution failed: ${error}` ); } }); } private async handleMouseAuthenticity(args: any) { const params = MousePathSchema.parse(args); // Basic implementation (open source level) const distance = Math.sqrt( Math.pow(params.endX - params.startX, 2) + Math.pow(params.endY - params.startY, 2) ); const duration = Math.max(200, distance * 2); // Basic timing const points = this.generateBasicMousePath(params); const result = { authenticity_level: params.authenticity_level, performance: params.authenticity_level === 'basic' ? '75%' : '96% (requires commercial license)', path_points: points.length, estimated_duration_ms: duration, includes_micro_movements: params.micro_movements, uses_natural_curves: params.natural_curves, path_data: params.authenticity_level === 'basic' ? points : 'Advanced path data requires commercial license' }; if (params.authenticity_level === 'advanced') { result['upgrade_info'] = { message: 'Advanced mouse authenticity (96%) requires a commercial license', features: ['Neural-based movement simulation', '27-point behavioral patterns', 'Individual movement signatures'], pricing: 'Starting at $297/month for Developer license', contact: 'licensing@aegntic.com' }; } return { content: [ { type: 'text', text: `**Mouse Authenticity Achievement**\n\n${JSON.stringify(result, null, 2)}\n\n${this.getCommunityMessage()}` } ] }; } private async handleTypingAuthenticity(args: any) { const params = TypingSequenceSchema.parse(args); const keystrokes = this.generateBasicTypingSequence(params); const totalDuration = keystrokes.reduce((sum, k) => sum + k.delay + k.hold, 0); const avgWpm = (params.text.split(' ').length / (totalDuration / 1000)) * 60; const result = { authenticity_level: params.authenticity_level, performance: params.authenticity_level === 'basic' ? '70%' : '95% (requires commercial license)', text_length: params.text.length, total_keystrokes: keystrokes.length, estimated_duration_ms: totalDuration, average_wpm: Math.round(avgWpm), includes_errors: params.error_rate ? params.error_rate > 0 : false, keystroke_data: params.authenticity_level === 'basic' ? keystrokes.slice(0, 10) : 'Advanced keystroke dynamics require commercial license' }; if (params.authenticity_level === 'advanced') { result['upgrade_info'] = { message: 'Advanced typing authenticity (95%) requires a commercial license', features: ['Keystroke dynamics', 'Cognitive load modeling', 'Individual typing signatures'], pricing: 'Starting at $297/month for Developer license', contact: 'licensing@aegntic.com' }; } return { content: [ { type: 'text', text: `**Typing Authenticity Achievement**\n\n${JSON.stringify(result, null, 2)}\n\n${this.getCommunityMessage()}` } ] }; } private async handleDetectionValidation(args: any) { const params = ContentValidationSchema.parse(args); // Basic heuristic validation (open source level) const basicScore = this.calculateBasicAuthenticityScore(params.content); const result = { authenticity_level: params.authenticity_level, performance: params.authenticity_level === 'basic' ? '60-70% resistance' : '98%+ resistance (requires commercial license)', content_length: params.content.length, estimated_authenticity_score: params.authenticity_level === 'basic' ? `${basicScore}%` : '98%+ (advanced algorithms)', detected_patterns: params.authenticity_level === 'basic' ? this.getBasicDetectedPatterns(params.content) : 'Advanced pattern analysis requires commercial license', recommendations: params.authenticity_level === 'basic' ? this.getBasicRecommendations(params.content) : 'Advanced evasion strategies require commercial license' }; if (params.authenticity_level === 'advanced') { result['upgrade_info'] = { message: 'Advanced AI detection resistance (98%+) requires a commercial license', features: ['Multi-model evasion', 'Real-time adaptation', 'GPTZero/Originality.ai resistance'], pricing: 'Starting at $297/month for Developer license', contact: 'licensing@aegntic.com' }; } return { content: [ { type: 'text', text: `**AI Detection Resistance Validation**\n\n${JSON.stringify(result, null, 2)}\n\n${this.getCommunityMessage()}` } ] }; } private async handleAudioProcessing(args: any) { const params = AudioProcessingSchema.parse(args); const result = { authenticity_level: params.authenticity_level, performance: params.authenticity_level === 'basic' ? '70%' : '94% (requires commercial license)', audio_description: params.audio_description, processing_applied: { breathing_patterns: params.add_breathing, voice_naturalness: params.voice_naturalness, basic_filtering: params.authenticity_level === 'basic', advanced_voice_modeling: params.authenticity_level === 'advanced' }, output: params.authenticity_level === 'basic' ? 'Basic audio filtering and simple naturalness applied' : 'Advanced voice tract modeling requires commercial license' }; if (params.authenticity_level === 'advanced') { result['upgrade_info'] = { message: 'Advanced audio authenticity (94%) requires a commercial license', features: ['Voice tract modeling', 'Breathing pattern injection', 'Spectral humanization'], pricing: 'Starting at $297/month for Developer license', contact: 'licensing@aegntic.com' }; } return { content: [ { type: 'text', text: `**Audio Authenticity Processing**\n\n${JSON.stringify(result, null, 2)}\n\n${this.getCommunityMessage()}` } ] }; } private async handleCommunityJoin(args: any) { const signup: CommunitySignup = { email: args.email, platforms: args.platforms, timestamp: new Date().toISOString(), authenticity_needs: args.authenticity_needs }; this.signups.push(signup); const communityLinks = { x: 'https://x.com/aegntic', telegram: 'https://t.me/aegntic', youtube: 'https://youtube.com/@aegntic', discord: 'https://discord.gg/aegntic' }; const result = { status: 'success', message: 'Welcome to the aegnt-27 community!', next_steps: [ 'Follow us on your selected platforms for updates', 'Star the GitHub repo: https://github.com/aegntic/aegnt27', 'Try the open source components (MIT licensed)', 'Join discussions about AI authenticity challenges' ], community_links: args.platforms.reduce((links, platform) => { links[platform] = communityLinks[platform]; return links; }, {}), benefits: [ 'Free access to open source framework', 'Community tutorials and examples', 'Early access to new features', 'Direct feedback channel to development team' ] }; return { content: [ { type: 'text', text: `**Community Registration Successful!**\n\n${JSON.stringify(result, null, 2)}` } ] }; } private async handleCommercialInfo(args: any) { const { use_case, team_size = 1, expected_volume = 'unknown' } = args; // Recommend appropriate tier based on input let recommendedTier = 'Developer'; let monthlyPrice = 297; if (team_size > 3) { recommendedTier = 'Professional'; monthlyPrice = 697; } if (team_size > 15 || use_case.toLowerCase().includes('enterprise')) { recommendedTier = 'Enterprise'; monthlyPrice = 1497; } const result = { use_case: use_case, team_size: team_size, expected_volume: expected_volume, recommended_tier: recommendedTier, pricing: { developer: { monthly: '$297', annual: '$3,564 (save $1,000)', features: ['Single app', '3 developers', 'Email support', 'Commercial use'] }, professional: { monthly: '$697', annual: '$8,364 (save $2,000)', features: ['Multiple apps', '15 developers', 'Priority support', 'Redistribution rights'] }, enterprise: { monthly: '$1,497', annual: '$17,964 (save $4,000)', features: ['Unlimited apps/devs', 'Dedicated support', 'Source access', 'Custom patterns'] } }, performance_upgrade: { mouse_authenticity: '75% → 96%', typing_authenticity: '70% → 95%', ai_detection_resistance: '60-70% → 98%+', audio_processing: '70% → 94%' }, next_steps: [ '30-day free commercial trial available', 'Schedule demo: licensing@aegntic.com', 'Custom enterprise pricing for 10+ licenses', 'Integration support included' ], contact: { email: 'licensing@aegntic.com', website: 'https://aegntic.ai', demo_booking: 'https://aegntic.ai/demo' } }; return { content: [ { type: 'text', text: `**Commercial Licensing Information**\n\n${JSON.stringify(result, null, 2)}` } ] }; } // Helper methods for basic implementations private generateBasicMousePath(params: any) { const points = []; const steps = Math.max(5, Math.floor(Math.random() * 10 + 10)); for (let i = 0; i <= steps; i++) { const t = i / steps; const x = params.startX + (params.endX - params.startX) * t; const y = params.startY + (params.endY - params.startY) * t; // Add basic randomness const noiseX = (Math.random() - 0.5) * 2; const noiseY = (Math.random() - 0.5) * 2; points.push({ x: Math.round(x + noiseX), y: Math.round(y + noiseY), timestamp: i * 20 + Math.random() * 10 }); } return points; } private generateBasicTypingSequence(params: any) { const keystrokes = []; const baseDelay = 60000 / (params.wpm || 60) / 5; // Convert WPM to ms per keystroke for (let i = 0; i < params.text.length; i++) { const char = params.text[i]; const delay = baseDelay + (Math.random() - 0.5) * baseDelay * 0.3; const hold = 50 + Math.random() * 30; keystrokes.push({ character: char, delay: Math.round(delay), hold: Math.round(hold), timestamp: Date.now() + i * delay }); } return keystrokes; } private calculateBasicAuthenticityScore(content: string): number { let score = 50; // Base score // Basic heuristics if (content.length > 100) score += 10; if (content.includes('.') || content.includes('!') || content.includes('?')) score += 5; if (content.split(' ').length > 20) score += 10; if (/[a-z]/.test(content) && /[A-Z]/.test(content)) score += 5; if (content.includes(',') || content.includes(';')) score += 5; return Math.min(70, Math.max(50, score)); } private getBasicDetectedPatterns(content: string): string[] { const patterns = []; if (content.length < 50) patterns.push('Content too short'); if (!/[.!?]/.test(content)) patterns.push('No sentence endings'); if (content.split(' ').length < 10) patterns.push('Limited vocabulary diversity'); return patterns; } private getBasicRecommendations(content: string): string[] { const recs = []; if (content.length < 100) recs.push('Increase content length'); if (!/[,;]/.test(content)) recs.push('Add natural punctuation'); if (content.split(' ').length < 20) recs.push('Expand vocabulary diversity'); return recs; } private getCommunityMessage(): string { return `\n---\n**🚀 Join the aegnt-27 Community!**\n\nFor free access to open source components and community support:\n- GitHub: https://github.com/aegntic/aegnt27\n- Website: https://aegntic.ai\n- X: https://x.com/aegntic\n- Discord: https://discord.gg/aegntic\n\nUse the 'join_community' tool to get started!`; } async run(): Promise<void> { const transport = new StdioServerTransport(); await this.server.connect(transport); console.error('aegnt-27 MCP Server running on stdio'); } } const server = new Aegnt27MCPServer(); server.run().catch(console.error);

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/aegntic/aegntic-MCP'

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