Back to MCP directory
publicPublicdnsLocal runtime

AWS EC2 Pricing

AWS EC2定价MCP服务器,提供实时EC2价格查询服务,支持通过Docker或Python直接使用。

article

README

🚀 AWS EC2 价格 MCP 服务器

AWS EC2 价格 MCP 服务器 能够让任意大语言模型(LLM)或自动化脚本通过一次调用,查询实时的 EC2 定价信息。它依托预解析的 AWS 定价目录,可回答诸如实例价格、配置等相关问题,为用户提供便捷的定价查询服务。

Docker 下载量 smithery 徽章

示例问题

  • What is the cheapest EC2 instance with 32GB RAM?
  • Which AMD instances have more than 3.5 Ghz CPUs?
  • What is the 3-yr All Upfront discount on r6g family in eu-west-1?
  • What is the cheapest instance to run Windows with SQL Server Enterprise?

🚀 快速开始

📦 使用 Docker

使用 Docker 镜像仓库

使用以下 mcp_config.json 文件来配置 Docker 镜像仓库:

{
  "mcpServers": {
    "AWS EC2 Pricing MCP": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "-q", "--network", "none", "ai1st/aws-pricing-mcp"]
    }
  }
}

参数说明

  • --rm:容器退出时自动删除容器,节省系统资源。
  • -i:启用交互模式,便于进行标准输入输出通信。
  • -q:抑制 Docker 关于下载镜像的消息,使输出更简洁。
  • --network none:完全断开容器与网络的连接,确保无数据外泄,保障数据安全。

使用本地镜像

构建镜像

docker build -t aws-pricing-mcp . --build-arg BUILD_DATE=$(date +%Y-%m-%d)

此命令会下载定价数据并构建镜像。BUILD_DATE 参数可确保在构建时下载到最新的定价数据。

示例 mcp_config.json 文件

{
  "mcpServers": { "AWS EC2 Pricing MCP": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "--network", "none", "aws-pricing-mcp"]
    }
  }
}

参数说明与使用 Docker 镜像仓库时相同。

💻 直接使用 Python

下载定价数据

curl https://cloudfix-public-aws-pricing.s3.us-east-1.amazonaws.com/pricing/ec2_pricing.json.gz | gunzip > ec2_pricing.json

下载的 ec2_pricing.json 文件需与 server.py 放在同一目录下。

示例 mcp_config.json 文件

{
  "mcpServers": { "AWS EC2 Pricing MCP": {
      "command": "python",
      "args": [
        "/path/to/server.py"
      ]
    }
  }
}

📚 详细文档

构建说明

有关构建和发布 Docker 镜像的详细说明,请参阅 BUILD.md

定价数据 JSON 格式

请参阅 PRICING.md

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client