A

Amazon VPC Lattice MCP服务器(模型上下文协议服务器)

@rlymbur/amazon-vpc-lattice-mcp-server
0 Stars 327 次浏览 rlymbur 更新于 2026-08-23

一种模型上下文协议服务器,提供用于访问和管理AWS VPC Lattice信息的工具,允许用户列出来源并检索与AWS网络文档相关的样本提示。

该服务暂未提供标准配置,请参考 README 手动接入

可用工具 (2 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

list_sources

List all available sources with their URLs and sample prompts

该工具无需必填参数,直接调用即可

get_source_prompts 1 个参数 需填 1 项

Get sample prompts for a specific source

必填参数:source_name

服务介绍

Amazon VPC Lattice MCP 服务器

这是一个提供工具以访问和管理源信息的模型上下文协议(MCP)服务器。

功能

该服务器提供了五个主要工具:

  1. list_sources: 列出所有可用的源及其URL
  2. get_source_prompts: 获取特定源的示例提示
  3. list_prompts: 列出所有可用的提示模板
  4. get_prompts: 获取特定提示模板的详细信息
  5. vpc_lattice_cli: 执行AWS CLI VPC Lattice命令以管理VPC Lattice资源

安装

  1. 克隆仓库:
    bash
    git clone https://github.com/yourusername/amazon-vpc-lattice-mcp-server.git
    cd amazon-vpc-lattice-mcp-server

  2. 安装依赖项:
    bash
    npm install

  3. 构建服务器:
    bash
    npm run build

配置

将服务器添加到您的MCP设置文件中(位于~/Library/Application Support/Code/User/globalStorage/asbx.amzn-cline/settings/cline_mcp_settings.json):

json
{
"mcpServers": {
"amazon-vpc-lattice-mcp": {
"command": "node",
"args": ["/path/to/amazon-vpc-lattice-mcp-server/build/index.js"],
"disabled": false,
"autoApprove": [],
"env": {}
}
}
}

使用

配置完成后,您可以在对话中使用MCP工具:

列出源

typescript
use_mcp_tool({
server_name: "amazon-vpc-lattice-mcp",
tool_name: "list_sources",
arguments: {}
})

获取源提示

typescript
use_mcp_tool({
server_name: "amazon-vpc-lattice-mcp",
tool_name: "get_source_prompts",
arguments: {
source_name: "AWS Documentation"
}
})

列出提示

typescript
use_mcp_tool({
server_name: "amazon-vpc-lattice-mcp",
tool_name: "list_prompts",
arguments: {}
})

获取提示详情

typescript
use_mcp_tool({
server_name: "amazon-vpc-lattice-mcp",
tool_name: "get_prompts",
arguments: {
prompt_name: "EKS Controller Setup"
}
})

VPC Lattice CLI

vpc_lattice_cli 工具通过AWS CLI为AWS VPC Lattice操作提供了一个编程接口。

特性

  • 支持所有主要的VPC Lattice CLI操作
  • 接受作为JavaScript对象的命令参数
  • 自动将camelCase参数转换为CLI风格的kebab-case
  • 处理布尔标志、数组和复杂值
  • 支持AWS配置文件和地区配置
  • 返回解析后的JSON响应

可用命令

  • 服务网络: create-service-network, delete-service-network, get-service-network, list-service-networks, update-service-network
  • 服务: create-service, delete-service, get-service, list-services, update-service
  • 监听器: create-listener, delete-listener, get-listener, list-listeners, update-listener
  • 规则: create-rule, delete-rule, get-rule, list-rules, update-rule
  • 目标组: create-target-group, delete-target-group, get-target-group, list-target-groups, update-target-group
  • 目标管理: register-targets, deregister-targets, list-targets
  • 资源标签: list-tags-for-resource, tag-resource, untag-resource

示例

列出服务网络:
typescript
use_mcp_tool({
server_name: "amazon-vpc-lattice-mcp",
tool_name: "vpc_lattice_cli",
arguments: {
command: "list-service-networks",
region: "us-west-2"
}
})

创建服务网络:
typescript
use_mcp_tool({
server_name: "amazon-vpc-lattice-mcp",
tool_name: "vpc_lattice_cli",
arguments: {
command: "create-service-network",
args: {
name: "my-network",
authType: "NONE"
}
}
})

创建带有标签的服务:
typescript
use_mcp_tool({
server_name: "amazon-vpc-lattice-mcp",
tool_name: "vpc_lattice_cli",
arguments: {
command: "create-service",
args: {
name: "my-service",
serviceNetworkIdentifier: "sn-12345",
tags: [
{ key: "Environment", value: "Production" }
]
}
}
})

创建目标组:
typescript
use_mcp_tool({
server_name: "amazon-vpc-lattice-mcp",
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"
}
}
}
}
})注册目标:
typescript
use_mcp_tool({
server_name: "amazon-vpc-lattice-mcp",
tool_name: "vpc_lattice_cli",
arguments: {
command: "register-targets",
args: {
targetGroupIdentifier: "tg-12345",
targets: [
{ id: "i-1234567890abcdef0", port: 80 }
]
}
}
})

可用资源

服务器包括以下资源:

  1. AWS 文档 (docs.aws.amazon.com)
  2. AWS Gateway API Controller for VPC Lattice 的 GitHub 仓库 (aws/aws-application-networking-k8s)
  3. Kubernetes Gateway API (gateway-api.sigs.k8s.io)

开发

项目结构

  • src/index.ts: 主服务器实现
  • package.json: 项目配置和依赖项
  • tsconfig.json: TypeScript 配置
  • .gitignore: Git 忽略规则

可用提示模板

服务器包括以下提示模板:

  1. EKS 控制器设置

    • 设置 AWS Application Networking Controller for Kubernetes 的指南
    • 参数:cluster_name, region, k8s_version
  2. EKS 控制器测试

    • 运行 AWS Application Networking Controller 的单元测试和集成测试
    • 参数:test_type, test_suite, test_filter, verbosity
    • 支持单元测试和使用 e2e-clean 的集成测试
  3. EKS 控制器问题解决方案

    • 为 GitHub 问题创建解决方案,并进行适当的测试和 PR 创建
    • 参数:issue_number, branch_name
    • 包括预提交检查和草稿 PR 创建
  4. 代码审查

    • 审查代码更改并提供反馈
    • 参数:code
  5. 错误分析

    • 分析错误信息并建议修复方法
    • 参数:error, context
  6. 架构审查

    • 审查系统架构并提供建议
    • 参数:design
  7. 文档生成器

    • 为代码或 API 生成文档
    • 参数:code
  8. 安全审查

    • 审查代码或架构的安全问题
    • 参数:target

添加新资源

要添加新的资源,请修改 src/index.ts 中的 sources 数组:

typescript
const sources = [
{
name: "您的资源名称" ,
url: "https://您的资源URL.com" ,
prompts: [
"示例提示 1 {占位符}" ,
"示例提示 2 {占位符}"
]
}
// ... 现有资源
];

添加新提示模板

要添加新的提示模板,请修改 src/index.ts 中的 prompts 数组:

typescript
const prompts = [
{
name: "您的提示模板名称" ,
description: "描述提示的作用" ,
template: "您的提示模板,包含 {参数} 占位符" ,
parameters: [ "参数" ]
}
// ... 现有提示模板
];

脚本

  • npm run build: 构建服务器
  • npm run watch: 开发模式下的监视模式

许可证

[在此处添加您的许可证信息]

相关 MCP 服务