Major refactor: Multi-user Chrome MCP extension with remote server architecture

This commit is contained in:
nasir@endelospay.com
2025-08-21 20:09:57 +05:00
parent d97cad1736
commit 5d869f6a7c
125 changed files with 16249 additions and 11906 deletions

View File

@@ -0,0 +1,49 @@
/**
* Simple test client to verify the remote server is working
*/
import WebSocket from 'ws';
const SERVER_URL = 'ws://localhost:3001/mcp';
console.log('🔌 Connecting to MCP Remote Server...');
const ws = new WebSocket(SERVER_URL);
ws.on('open', () => {
console.log('✅ Connected to remote server!');
// Test listing tools
console.log('📋 Requesting available tools...');
ws.send(
JSON.stringify({
method: 'tools/list',
params: {},
}),
);
});
ws.on('message', (data) => {
try {
const message = JSON.parse(data.toString());
console.log('📨 Received response:', JSON.stringify(message, null, 2));
} catch (error) {
console.error('❌ Error parsing message:', error);
}
});
ws.on('close', () => {
console.log('🔌 Connection closed');
process.exit(0);
});
ws.on('error', (error) => {
console.error('❌ WebSocket error:', error);
process.exit(1);
});
// Close connection after 5 seconds
setTimeout(() => {
console.log('⏰ Closing connection...');
ws.close();
}, 5000);