Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_ssh_key_pairs

Use this tool to list SSH key pairs on the CloudStack MCP Server, enabling efficient management of cloud resources by filtering results based on key pair names or fingerprints.

Instructions

List SSH key pairs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fingerprintNoKey fingerprint to filter
nameNoKey pair name to filter

Implementation Reference

  • Main handler function that executes the list_ssh_key_pairs tool by calling CloudStack API, processing key pairs data, and returning formatted MCP response.
    async handleListSSHKeyPairs(args: any) { const result = await this.cloudStackClient.listSSHKeyPairs(args); const keyPairs = result.listsshkeypairsresponse?.sshkeypair || []; const keyPairList = keyPairs.map((keyPair: any) => ({ name: keyPair.name, fingerprint: keyPair.fingerprint, account: keyPair.account, domain: keyPair.domain })); return { content: [ { type: 'text', text: `Found ${keyPairList.length} SSH key pairs:\n\n${keyPairList .map((keyPair: any) => `• ${keyPair.name}\n Fingerprint: ${keyPair.fingerprint}\n Account: ${keyPair.account}\n Domain: ${keyPair.domain}\n` ) .join('\n')}` } ] }; }
  • Tool definition including name, description, and input schema for list_ssh_key_pairs.
    name: 'list_ssh_key_pairs', description: 'List SSH key pairs', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Key pair name to filter', }, fingerprint: { type: 'string', description: 'Key fingerprint to filter', }, }, additionalProperties: false, }, },
  • src/server.ts:200-201 (registration)
    Registration in the MCP server switch statement that routes calls to list_ssh_key_pairs to the security handler.
    case 'list_ssh_key_pairs': return await this.securityHandlers.handleListSSHKeyPairs(args);
  • Helper method in CloudStack client that makes the underlying API request for listing SSH key pairs.
    async listSSHKeyPairs(params: CloudStackParams = {}): Promise<CloudStackResponse> { return this.request('listSSHKeyPairs', params); }

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/phantosmax/cloudstack-mcp-server'

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