ssh_help
Get help and usage examples for connecting to and managing remote servers via SSH. Learn how to configure connections, execute commands, authenticate, and use practical examples.
Instructions
Show help and usage examples for mcpHydroSSH
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | Specific topic to get help on (optional) |
Implementation Reference
- src/index.ts:299-310 (handler)The handler logic for 'ssh_help' which calls getHelpContent and returns the result in an MCP-compliant response.
case 'ssh_help': { const topic = args.topic as string | undefined; const helpContent = getHelpContent(topic); return { content: [ { type: 'text', text: helpContent, }, ], }; } - src/index.ts:562-615 (helper)The helper function that generates the actual help strings based on the provided topic.
function getHelpContent(topic?: string): string { if (topic === 'config') { return `# Config Help **Config file location:** \`~/.hydrossh/config.json\` **Server fields:** - \`id\` (required): Unique server identifier - \`name\` (required): Display name - \`host\` (required): Server hostname or IP - \`port\`: SSH port (default: 22) - \`username\`: SSH username - \`authMethod\`: "agent" | "key" | "password" (default: "agent") - \`privateKeyPath\`: Path to private key (for "key" auth) - \`password\`: Password (for "password" auth) **Example:** \`\`\`json { "id": "my-server", "name": "My Server", "host": "1.2.3.4", "username": "root", "authMethod": "key", "privateKeyPath": "~/.ssh/id_rsa" } \`\`\``; } if (topic === 'connect') { return `# Connection Help **Tools:** - \`ssh_list_servers\` - List configured servers - \`ssh_connect\` - Connect to a server (params: serverId, timeout?) - \`ssh_get_status\` - Check connection status - \`ssh_disconnect\` - Disconnect from server **Note:** \`connectionId\` is optional for most tools - uses most recent connection if not provided.`; } if (topic === 'exec') { return `# Command Execution Help **Tool:** \`ssh_exec\` **Params:** - \`command\` (required): Command to execute - \`connectionId\` (optional): Which connection to use - \`timeout\` (optional): Command timeout in ms - \`cwd\` (optional): Working directory **Example:** \`\`\`json - src/index.ts:134-146 (registration)The registration of the 'ssh_help' tool, defining its name, description, and input schema.
{ name: 'ssh_help', description: 'Show help and usage examples for mcpHydroSSH', inputSchema: { type: 'object', properties: { topic: { type: 'string', description: 'Specific topic to get help on (optional)', enum: ['config', 'connect', 'exec', 'auth', 'examples'], }, }, required: [],