Skip to main content
Glama

MCP SSH Server

by shaike1
install.js1.43 kB
#!/usr/bin/env node const fs = require('fs'); const path = require('path'); const { execSync } = require('child_process'); const os = require('os'); // Determine user's home directory const homeDir = os.homedir(); const configPath = path.join(homeDir, 'claude', 'claude_desktop_config.json'); function installServer() { try { // Install dependencies console.log('Installing dependencies...'); execSync('npm install', { stdio: 'inherit' }); // Build the project console.log('Building project...'); execSync('npm run build', { stdio: 'inherit' }); // Update Claude config if (fs.existsSync(configPath)) { console.log('Updating Claude config...'); const config = JSON.parse(fs.readFileSync(configPath, 'utf8')); config.mcpServers = config.mcpServers || {}; config.mcpServers.ssh = { command: 'node', args: [path.join(__dirname, 'dist', 'server.js')], env: { SSH_PORT: '8889', SSH_LOG_LEVEL: 'info' } }; fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); } console.log('Installation complete! Server ready to use.'); } catch (error) { console.error('Installation failed:', error); process.exit(1); } } installServer();

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/shaike1/mcp-server-ssh'

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