Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

create_ssh_key_pair

Generate or upload an SSH key pair on the CloudStack MCP Server to securely access and manage virtual machines and cloud resources.

Instructions

Create a new SSH key pair

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesKey pair name
publickeyNoPublic key string (optional - generates if not provided)

Implementation Reference

  • The main handler function that executes the create_ssh_key_pair tool. It calls the CloudStack client to create the key pair and formats the response with fingerprint and private key.
    async handleCreateSSHKeyPair(args: any) {
      const result = await this.cloudStackClient.createSSHKeyPair({ name: args.name });
      
      return {
        content: [
          {
            type: 'text',
            text: `Created SSH key pair: ${args.name}\nFingerprint: ${result.createsshkeypairresponse?.fingerprint}\nPrivate Key:\n${result.createsshkeypairresponse?.privatekey}`
          }
        ]
      };
    }
  • The tool schema definition including input schema for name (required) and optional publickey.
    {
      name: 'create_ssh_key_pair',
      description: 'Create a new SSH key pair',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Key pair name',
          },
          publickey: {
            type: 'string',
            description: 'Public key string (optional - generates if not provided)',
          },
        },
        required: ['name'],
        additionalProperties: false,
      },
    },
  • src/server.ts:202-203 (registration)
    MCP server registration: dispatches the tool call to the security handler.
    case 'create_ssh_key_pair':
      return await this.securityHandlers.handleCreateSSHKeyPair(args);
  • CloudStack client helper method that makes the API request to createSSHKeyPair.
    async createSSHKeyPair(params: CloudStackParams): Promise<CloudStackResponse> {
      return this.request('createSSHKeyPair', 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