AWS定价计算器MCP服务器
MCP服务器,提供自动化AWS定价计算器估算生成的工具。
特性
- 发现服务:从AWS定价计算器获取服务模式
- 构建_估计:根据规范构建完整的估计JSON
- 保存_估计:将估算保存到AWS并获取可共享的URL
- 获取区域名称:将AWS地区代码转换为显示名称
安装
先决条件
- Python 3.10或更高版本
- 紫外线 包管理器
安装uv
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Or via pip
pip install uv运行MCP服务器
服务器设计为通过以下方式运行 uvx 直接从GitHub(无需安装):
uvx --from git+https://github.com/elchanio-76/aws-pricing-calculator-mcp aws-pricing-calculator-mcp或者全局安装:
uv tool install git+https://github.com/elchanio-76/aws-pricing-calculator-mcp一旦发布到PyPI,您可以使用更简单的形式:
uvx aws-pricing-calculator-mcp使用Kiro
此MCP服务器旨在与 AWS定价计算器功能 为了基洛。
配置
添加到您的Kiro MCP配置(.kiro/settings/mcp.json):
{
"mcpServers": {
"aws-pricing-calculator": {
"command": "uvx",
"args": ["--from", "git+https://github.com/elchanio-76/aws-pricing-calculator-mcp", "aws-pricing-calculator-mcp"],
"disabled": false
}
}
}或者,如果发布到PyPI:
{
"mcpServers": {
"aws-pricing-calculator": {
"command": "uvx",
"args": ["aws-pricing-calculator-mcp"],
"disabled": false
}
}
}或安装 基洛电力 其自动包括该配置。
工具
发现服务
获取AWS定价计算器服务模式。
参数:
service_codes(可选):要发现的服务代码数组
例子:
{
"service_codes": ["ec2Enhancement", "amazonS3"]
}构建_估计
根据规范构建完整的估计JSON。
参数:
spec(必填):估算团体和服务的规格
例子:
{
"spec": {
"name": "My Estimate",
"groups": [
{
"name": "Production",
"services": [...]
}
]
}
}保存_估计
将估计值保存到AWS并获取可共享的URL。
参数:
estimate(必填):从build_estimate中完成JSON估算
获取区域名称
将AWS地区代码转换为显示名称。
参数:
region_code(必填):AWS地区代码(例如“us-east-1”)
发展
设置
# Clone the repository
git clone https://github.com/elchanio-76/aws-pricing-calculator-mcp.git
cd aws-pricing-calculator-mcp
# Install dependencies
uv pip install -e .测试
# Run tests
python3 test_mcp_server.py
# Test via stdio
python3 test_mcp_stdio.py本地运行
python3 -m mcp_server.server建筑
MCP服务器封装了现有的Python脚本,这些脚本处理:
- CloudFront API调用服务定义
- 估计JSON生成
- AWS保存API集成
所有脚本都使用 curl 避免CloudFront出现Python SSL问题的子流程。
许可证
麻省理工学院
积分
受启发于 aws定价计算器 作者:秦。 工具是通过转换该仓库中的脚本而创建的。 Power.md和指导文档基于原始仓库,并进行了细微更改,使其与Kiro Powers兼容。
