create_vpc
Create a Virtual Private Cloud (VPC) on Naver Cloud Platform to establish isolated network environments for cloud resources. Specify VPC name and IPv4 CIDR block to define network boundaries.
Instructions
새로운 VPC를 생성합니다
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vpcName | Yes | VPC 이름 | |
| ipv4CidrBlock | Yes | IPv4 CIDR 블록 (예: 10.0.0.0/16) |
Implementation Reference
- src/index.ts:625-632 (handler)MCP CallTool handler case for 'create_vpc' tool: validates arguments and delegates to NCPClient.createVpc method.
case "create_vpc": { const typedArgs = args as { vpcName: string; ipv4CidrBlock: string; }; result = await ncpClient.createVpc(typedArgs); break; } - src/index.ts:143-148 (handler)Core implementation of VPC creation in NCPClient class: constructs API request to NCP /createVpc endpoint.
async createVpc(params: { vpcName: string; ipv4CidrBlock: string; }) { return await this.request("GET", "/vserver/v2", "/createVpc", params); } - src/index.ts:373-383 (schema)Input schema and metadata definition for the 'create_vpc' tool returned in ListTools response.
name: "create_vpc", description: "새로운 VPC를 생성합니다", inputSchema: { type: "object", properties: { vpcName: { type: "string", description: "VPC 이름" }, ipv4CidrBlock: { type: "string", description: "IPv4 CIDR 블록 (예: 10.0.0.0/16)" }, }, required: ["vpcName", "ipv4CidrBlock"], }, }, - src/index.ts:290-566 (registration)Registration of all tools including 'create_vpc' via ListToolsRequestSchema handler which returns the tools array.
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ // Server 관련 { name: "list_servers", description: "NCP의 모든 서버 인스턴스 목록을 조회합니다", inputSchema: { type: "object", properties: { regionCode: { type: "string", description: "리전 코드 (예: KR, JP)" }, }, }, }, { name: "get_server_detail", description: "특정 서버 인스턴스의 상세 정보를 조회합니다", inputSchema: { type: "object", properties: { serverInstanceNo: { type: "string", description: "서버 인스턴스 번호" }, }, required: ["serverInstanceNo"], }, }, { name: "create_server", description: "새로운 서버 인스턴스를 생성합니다", inputSchema: { type: "object", properties: { serverName: { type: "string", description: "서버 이름" }, serverImageProductCode: { type: "string", description: "서버 이미지 상품 코드" }, serverProductCode: { type: "string", description: "서버 상품 코드" }, vpcNo: { type: "string", description: "VPC 번호" }, subnetNo: { type: "string", description: "서브넷 번호" }, loginKeyName: { type: "string", description: "로그인 키 이름" }, serverCreateCount: { type: "string", description: "생성할 서버 개수 (기본값: 1)" }, }, required: ["serverName", "serverImageProductCode", "serverProductCode"], }, }, { name: "delete_server", description: "서버 인스턴스를 삭제합니다", inputSchema: { type: "object", properties: { serverInstanceNo: { type: "string", description: "삭제할 서버 인스턴스 번호" }, }, required: ["serverInstanceNo"], }, }, { name: "stop_server", description: "실행 중인 서버 인스턴스를 중지합니다", inputSchema: { type: "object", properties: { serverInstanceNo: { type: "string", description: "중지할 서버 인스턴스 번호" }, }, required: ["serverInstanceNo"], }, }, { name: "start_server", description: "중지된 서버 인스턴스를 시작합니다", inputSchema: { type: "object", properties: { serverInstanceNo: { type: "string", description: "시작할 서버 인스턴스 번호" }, }, required: ["serverInstanceNo"], }, }, // VPC 관련 { name: "list_vpcs", description: "VPC 목록을 조회합니다", inputSchema: { type: "object", properties: {} }, }, { name: "create_vpc", description: "새로운 VPC를 생성합니다", inputSchema: { type: "object", properties: { vpcName: { type: "string", description: "VPC 이름" }, ipv4CidrBlock: { type: "string", description: "IPv4 CIDR 블록 (예: 10.0.0.0/16)" }, }, required: ["vpcName", "ipv4CidrBlock"], }, }, { name: "delete_vpc", description: "VPC를 삭제합니다", inputSchema: { type: "object", properties: { vpcNo: { type: "string", description: "VPC 번호" }, }, required: ["vpcNo"], }, }, // Subnet 관련 { name: "list_subnets", description: "서브넷 목록을 조회합니다", inputSchema: { type: "object", properties: { vpcNo: { type: "string", description: "VPC 번호 (선택사항)" }, }, }, }, { name: "create_subnet", description: "새로운 서브넷을 생성합니다", inputSchema: { type: "object", properties: { subnetName: { type: "string", description: "서브넷 이름" }, vpcNo: { type: "string", description: "VPC 번호" }, subnet: { type: "string", description: "서브넷 CIDR (예: 10.0.1.0/24)" }, zoneCode: { type: "string", description: "존 코드 (예: KR-1)" }, networkAclNo: { type: "string", description: "Network ACL 번호" }, subnetTypeCode: { type: "string", description: "서브넷 타입 코드 (PUBLIC/PRIVATE)" }, }, required: ["subnetName", "vpcNo", "subnet", "zoneCode", "networkAclNo", "subnetTypeCode"], }, }, { name: "delete_subnet", description: "서브넷을 삭제합니다", inputSchema: { type: "object", properties: { subnetNo: { type: "string", description: "서브넷 번호" }, }, required: ["subnetNo"], }, }, // ACG 관련 { name: "list_acgs", description: "ACG(Access Control Group) 목록을 조회합니다", inputSchema: { type: "object", properties: { vpcNo: { type: "string", description: "VPC 번호 (선택사항)" }, }, }, }, { name: "create_acg", description: "새로운 ACG를 생성합니다", inputSchema: { type: "object", properties: { accessControlGroupName: { type: "string", description: "ACG 이름" }, vpcNo: { type: "string", description: "VPC 번호" }, accessControlGroupDescription: { type: "string", description: "ACG 설명" }, }, required: ["accessControlGroupName", "vpcNo"], }, }, { name: "delete_acg", description: "ACG를 삭제합니다", inputSchema: { type: "object", properties: { accessControlGroupNo: { type: "string", description: "ACG 번호" }, }, required: ["accessControlGroupNo"], }, }, { name: "add_acg_rule", description: "ACG에 인바운드 규칙을 추가합니다", inputSchema: { type: "object", properties: { accessControlGroupNo: { type: "string", description: "ACG 번호" }, protocolTypeCode: { type: "string", description: "프로토콜 타입 (TCP/UDP/ICMP)" }, ipBlock: { type: "string", description: "IP 블록 (예: 0.0.0.0/0)" }, portRange: { type: "string", description: "포트 범위 (예: 80, 1-65535)" }, }, required: ["accessControlGroupNo", "protocolTypeCode"], }, }, // Load Balancer 관련 { name: "list_load_balancers", description: "로드 밸런서 목록을 조회합니다", inputSchema: { type: "object", properties: {} }, }, { name: "create_load_balancer", description: "새로운 로드 밸런서를 생성합니다", inputSchema: { type: "object", properties: { loadBalancerName: { type: "string", description: "로드 밸런서 이름" }, loadBalancerAlgorithmTypeCode: { type: "string", description: "알고리즘 타입 (RR/LC/SIPHS)" }, vpcNo: { type: "string", description: "VPC 번호" }, subnetNoList: { type: "string", description: "서브넷 번호 리스트" }, }, required: ["loadBalancerName", "loadBalancerAlgorithmTypeCode"], }, }, { name: "delete_load_balancer", description: "로드 밸런서를 삭제합니다", inputSchema: { type: "object", properties: { loadBalancerInstanceNo: { type: "string", description: "로드 밸런서 인스턴스 번호" }, }, required: ["loadBalancerInstanceNo"], }, }, { name: "add_load_balancer_target", description: "로드 밸런서에 타겟 서버를 추가합니다", inputSchema: { type: "object", properties: { loadBalancerInstanceNo: { type: "string", description: "로드 밸런서 인스턴스 번호" }, serverInstanceNoList: { type: "array", items: { type: "string" }, description: "서버 인스턴스 번호 리스트" }, }, required: ["loadBalancerInstanceNo", "serverInstanceNoList"], }, }, // Cloud DB 관련 { name: "list_cloud_dbs", description: "Cloud DB 인스턴스 목록을 조회합니다", inputSchema: { type: "object", properties: {} }, }, { name: "create_cloud_db", description: "새로운 Cloud DB 인스턴스를 생성합니다", inputSchema: { type: "object", properties: { cloudDBServiceName: { type: "string", description: "Cloud DB 서비스 이름" }, cloudDBServerNamePrefix: { type: "string", description: "서버 이름 접두사" }, cloudDBServerCount: { type: "string", description: "서버 개수" }, cloudDBProductCode: { type: "string", description: "상품 코드" }, cloudDBImageProductCode: { type: "string", description: "이미지 상품 코드" }, dataStorageTypeCode: { type: "string", description: "스토리지 타입 코드" }, vpcNo: { type: "string", description: "VPC 번호" }, subnetNo: { type: "string", description: "서브넷 번호" }, }, required: ["cloudDBServiceName", "cloudDBServerNamePrefix", "cloudDBServerCount", "cloudDBProductCode", "cloudDBImageProductCode", "dataStorageTypeCode"], }, }, { name: "delete_cloud_db", description: "Cloud DB 인스턴스를 삭제합니다", inputSchema: { type: "object", properties: { cloudDBInstanceNo: { type: "string", description: "Cloud DB 인스턴스 번호" }, }, required: ["cloudDBInstanceNo"], }, }, ], }; });