Skip to main content
Glama

get_available_connections

List SSH-capable machines available for connection through the SSH MCP Server to execute remote commands securely.

Instructions

List every SSH-capable machine this server knows about (but is NOT yet connected).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the 'get_available_connections' tool within the CallToolRequestSchema handler. It returns a text content block with JSON-stringified list of available machines (machine_id, label, os, source) from the global availableMachines array.
    // get_available_connections if (name === "get_available_connections") { return { content: [ { type: "text", text: JSON.stringify( availableMachines.map(({ machine_id, label , os , source }) => ({ machine_id, label , os , source })), null, 2 ), }, ], }; }
  • src/index.ts:142-146 (registration)
    Registration of the 'get_available_connections' tool in the ListToolsRequestSchema handler, including its name, description, and input schema (empty object since no parameters).
    { name: "get_available_connections", description: "List every SSH-capable machine this server knows about (but is NOT yet connected).", inputSchema: { type: "object", properties: {}, additionalProperties: false },
  • Global availableMachines array configuration and loading logic from MACHINES_PATH environment variable, which provides the data source for the get_available_connections tool.
    const machinesPath = process.env.MACHINES_PATH ; console.log(`Loading machines from: ${machinesPath}`); const availableMachines = [ ]; // read machines from file if MACHINES_PATH is set if (machinesPath) { try { const machinesData = readFileSync(machinesPath, "utf8"); const machinesFromFile = JSON.parse(machinesData); availableMachines.push(...machinesFromFile); } catch (err) { console.error(`Failed to read machines from ${machinesPath}:`, err); } }

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

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