亚马逊 VPC Lattice
STDIOAWS VPC Lattice资源管理服务器
AWS VPC Lattice资源管理服务器
A Model Context Protocol (MCP) server for source listing, providing tools for accessing and managing AWS VPC Lattice resources and related documentation.
The server provides five main tools:
list_sources
: Lists all available sources with their URLs and sample promptsget_source_prompts
: Gets sample prompts for a specific sourcelist_amazon_vpc_lattice_prompts
: Lists all available prompt templatesget_amazon_vpc_lattice_prompts
: Gets details of a specific prompt templatevpc_lattice_cli
: Execute AWS CLI VPC Lattice commands for managing VPC Lattice resourcesThis project is built with TypeScript and uses ES modules. Note that installing github-mcp-server is also strongly recommended to assist with development prompts.
git clone https://github.com/awslabs/amazon-vpc-lattice-mcp-server.git cd amazon-vpc-lattice-mcp-server
npm install
npm run build
The build script will compile the TypeScript code and set the appropriate executable permissions.
Add the server to your MCP settings file (located at ~/Library/Application Support/Code/User/globalStorage/asbx.amzn-cline/settings/cline_mcp_settings.json
):
{ "mcpServers": { "amazon-vpc-lattice": { "command": "node", "args": ["/path/to/amazon-vpc-lattice-mcp-server/build/index.js"], "disabled": false, "autoApprove": [], "env": {} } } }
Once configured, you can use the MCP tools in your conversations. Note that you should use list_amazon_vpc_lattice_prompts
to discover available prompts as these are not automatically discoverable like tools.
use_mcp_tool({ server_name: "amazon-vpc-lattice", tool_name: "list_sources", arguments: {} })
use_mcp_tool({ server_name: "amazon-vpc-lattice", tool_name: "get_source_prompts", arguments: { source_name: "AWS Documentation" } })
use_mcp_tool({ server_name: "amazon-vpc-lattice", tool_name: "list_amazon_vpc_lattice_prompts", arguments: {} })
use_mcp_tool({ server_name: "amazon-vpc-lattice", tool_name: "get_amazon_vpc_lattice_prompts", arguments: { prompt_name: "setup_eks_controller" } })
The vpc_lattice_cli
tool provides a programmatic interface to AWS VPC Lattice operations through the AWS CLI.
List service networks:
use_mcp_tool({ server_name: "amazon-vpc-lattice", tool_name: "vpc_lattice_cli", arguments: { command: "list-service-networks", region: "us-west-2" } })
Create a service network:
use_mcp_tool({ server_name: "amazon-vpc-lattice", tool_name: "vpc_lattice_cli", arguments: { command: "create-service-network", args: { name: "my-network", authType: "NONE" } } })
Create a service with tags:
use_mcp_tool({ server_name: "amazon-vpc-lattice", tool_name: "vpc_lattice_cli", arguments: { command: "create-service", args: { name: "my-service", serviceNetworkIdentifier: "sn-12345", tags: [ { key: "Environment", value: "Production" } ] } } })
Create a target group:
use_mcp_tool({ server_name: "amazon-vpc-lattice", tool_name: "vpc_lattice_cli", arguments: { command: "create-target-group", args: { name: "my-target-group", type: "INSTANCE", config: { port: 80, protocol: "HTTP", healthCheck: { enabled: true, protocol: "HTTP", path: "/health" } } } } })
The server includes these sources:
AWS Documentation (docs.aws.amazon.com)
AWS Gateway API Controller for VPC Lattice (aws/aws-application-networking-k8s)
Kubernetes Gateway API (gateway-api.sigs.k8s.io)
The project is organized as follows:
src/index.ts
: Main server setup and initializationsrc/tools.ts
: Tool definitions and handlerssrc/data/
: Data files
prompts.ts
: Prompt templates and parameterssources.ts
: Source definitions and their promptspackage.json
: Project configuration and dependenciestsconfig.json
: TypeScript configuration.gitignore
: Git ignore rulesbuild/
: Compiled JavaScript outputTo add new sources, modify the sources
array in src/data/sources.ts
:
export const sources = [ { name: 'Your Source', url: 'https://your-source-url.com', prompts: [ 'Sample prompt 1 {placeholder}', 'Sample prompt 2 {placeholder}' ] } // ... existing sources ];
To add new prompt templates, modify the prompts
array in src/data/prompts.ts
:
export const prompts = [ { name: 'Your Prompt Template', description: 'Description of what the prompt does', template: 'Your prompt template with {parameter} placeholders', parameters: ['parameter'] } // ... existing prompts ];
npm run build
: Build the server and set executable permissionsnpm run watch
: Watch mode for developmentnpm test
: Run tests (currently not implemented)