Skip to main content
Glama
ooples

MCP Console Automation Server

test-local.ts1.53 kB
import { ConsoleManager } from './core/ConsoleManager.js'; async function testLocal() { console.log('Testing local shell functionality...'); try { const manager = new ConsoleManager(); console.log('ConsoleManager created successfully'); // Test creating a PowerShell session const sessionId = await manager.createSession({ command: 'powershell', args: ['-NoProfile', '-Command', 'Write-Host "PowerShell test successful"'], consoleType: 'powershell' }); console.log(`PowerShell session created with ID: ${sessionId}`); // Get session to check status const session = manager.getSession(sessionId); if (session) { console.log(`Session status: ${session.status}`); } // Wait a bit for output await new Promise(resolve => setTimeout(resolve, 1000)); // Get output const output = await manager.getOutput(sessionId); console.log('Session output:', output); // Send another command await manager.sendInput(sessionId, 'Get-Date\n'); // Wait for response await new Promise(resolve => setTimeout(resolve, 1000)); // Get new output const newOutput = await manager.getOutput(sessionId); console.log('New output:', newOutput); // Close session await manager.stopSession(sessionId); console.log('Session closed successfully'); console.log('\nLocal shell test completed successfully!'); } catch (error) { console.error('Local test failed:', error); } } testLocal().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/ooples/mcp-console-automation'

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