Skip to main content
Glama

OrgFlow MCP

by sujalpat1810
interactive.js•6.1 kB
#!/usr/bin/env node import { spawn } from 'child_process'; import readline from 'readline'; import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); console.log('šŸš€ Organizational Data Manager'); console.log('==============================='); console.log('This is your interactive data management system!'); console.log('You can perform CRUD operations on your organizational data using natural language.'); console.log(''); console.log('Available datasets:'); console.log('šŸ“Š employees, companies, departments, domains, projects, customers'); console.log('šŸ“Š assets, policies, roles, accesslogs, training, performance'); console.log('šŸ“Š tickets, vendors, locations, and many more...'); console.log(''); console.log('Example commands:'); console.log('• "Show me all employees"'); console.log('• "Add a new customer with name John Doe"'); console.log('• "Update project status to completed"'); console.log('• "Find all vendors in California"'); console.log('• "Delete old access logs"'); console.log(''); console.log('Type "help" for more commands or "exit" to quit.'); console.log('==============================='); function ask(question) { return new Promise((resolve) => { rl.question(question, resolve); }); } async function processCommand(command) { const lowerCommand = command.toLowerCase().trim(); if (lowerCommand === 'exit') { console.log('šŸ‘‹ Goodbye!'); rl.close(); process.exit(0); } if (lowerCommand === 'help') { console.log('\nšŸ“– Available Commands:'); console.log(''); console.log('šŸ“Š DATA QUERIES:'); console.log(' • "show employees" - List all employees'); console.log(' • "show projects" - List all projects'); console.log(' • "show companies" - List all companies'); console.log(' • "count employees" - Count total employees'); console.log(''); console.log('šŸ” SEARCH & FILTER:'); console.log(' • "find employees at Google" - Filter employees by company'); console.log(' • "search projects containing web" - Search in project names'); console.log(' • "filter vendors by location California" - Filter by location'); console.log(''); console.log('āž• ADD DATA:'); console.log(' • "add employee John Doe, Engineering, Senior Developer"'); console.log(' • "add project Website Redesign, Active, High Priority"'); console.log(''); console.log('āœļø UPDATE DATA:'); console.log(' • "update employee id 123 salary to 75000"'); console.log(' • "update project status to completed"'); console.log(''); console.log('šŸ—‘ļø DELETE DATA:'); console.log(' • "delete employee id 456"'); console.log(' • "delete old access logs"'); console.log(''); console.log('šŸ“ˆ ANALYTICS:'); console.log(' • "analyze employee performance"'); console.log(' • "summary of projects by status"'); console.log(' • "department statistics"'); console.log(''); return; } // For now, we'll show available data files and basic operations if (lowerCommand.includes('show') && lowerCommand.includes('datasets')) { console.log('\nšŸ“‚ Available Datasets:'); console.log(''); console.log('šŸ‘„ People & Organizations:'); console.log(' • employees.json - Employee records and details'); console.log(' • companies.json - Company information'); console.log(' • departments.json - Department structure'); console.log(' • teams.json - Team compositions'); console.log(''); console.log('šŸ’¼ Projects & Work:'); console.log(' • projects.json - Project tracking'); console.log(' • project_assignments.json - Project assignments'); console.log(' • project_management.json - Project management data'); console.log(''); console.log('šŸ¢ Assets & Resources:'); console.log(' • assets.json - Company assets'); console.log(' • office_spaces.json - Office space information'); console.log(' • vendors.json - Vendor relationships'); console.log(''); console.log('šŸ“Š Performance & Analytics:'); console.log(' • performance.json - Performance metrics'); console.log(' • feedback.json - Feedback data'); console.log(' • training.json - Training records'); console.log(''); console.log('šŸŽ« Operations:'); console.log(' • tickets.json - Support tickets'); console.log(' • accesslogs.json - Access logs'); console.log(' • policies.json - Company policies'); console.log(''); return; } console.log(`\nšŸ¤– Processing: "${command}"`); console.log('šŸ“” Connecting to MCP server...'); // Here we would connect to the MCP server and process the command // For now, we'll simulate the response if (lowerCommand.includes('show') || lowerCommand.includes('list')) { console.log('āœ… Query executed successfully!'); console.log('šŸ“Š Sample results would appear here...'); } else if (lowerCommand.includes('add') || lowerCommand.includes('create')) { console.log('āœ… Record added successfully!'); } else if (lowerCommand.includes('update') || lowerCommand.includes('modify')) { console.log('āœ… Record updated successfully!'); } else if (lowerCommand.includes('delete') || lowerCommand.includes('remove')) { console.log('āœ… Record deleted successfully!'); } else { console.log('šŸ” Understanding your request...'); console.log('šŸ’” Tip: Try commands like "show employees", "add customer", or "help" for more options.'); } } async function main() { while (true) { try { const command = await ask('\nšŸ’¬ Enter your command: '); if (command.trim() === '') { continue; } await processCommand(command); } catch (error) { console.error('āŒ Error:', error.message); } } } main().catch(console.error);

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/sujalpat1810/Orgflow_MCP'

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