aws-billing-mcp

aws-billing-mcp

Enables MCP clients to query AWS Billing and Cost Management data via local AWS CLI, including cost usage, forecasts, anomalies, budgets, and commitment utilization for analysis.

Category
Visit Server

README

aws-billing-mcp

MCP server(stdio)——通过本机 AWS CLI 访问 <目标AWS 账号> 的Billing and Cost Management 数据,供 Quick Desktop 等 MCP 客户端做消费用量分析。

前置条件

  • Node.js ≥ 18(本机已装 v24)
  • AWS CLI v2,且 default profile(或 AWS_PROFILE 指定的 profile)的凭证属于<目标AWS 账号>
  • IAM 权限:ce:Get*、budgets:ViewBudget、sts:GetCallerIdentity

服务器在第一次调用工具时会用 sts get-caller-identity 校验当前凭证确实属于<目标AWS 账号>,不匹配时直接报错,防止误查其他账号。

安装

cd ~/aws-billing-mcp
npm install

冒烟测试

node test-client.mjs

会列出全部工具、查询本月按服务分组的成本 Top5,并做一次月末成本预测。

接入 Quick Desktop

在 Quick Desktop 的 MCP 服务器配置(Settings → 集成/MCP servers,或其 JSON 配置文件)中添加:

{
  "mcpServers": {
    "aws-billing": {
      "command": "node",
      "args": ["~/aws-billing-mcp/index.mjs"],
      "env": {
        "AWS_PROFILE": "default"
      }
    }
  }
}

注意:node 通过 nvm 安装(~/.nvm/versions/node/v24.8.0/bin/node)。如果 Quick Desktop 启动时找不到 node 或 aws,把 command 换成 node 的绝对路径,并在 env 里加 "PATH": "/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin"(包含 aws 所在目录)。

工具列表

工具 用途
get_cost_and_usage 核心查询:任意时间段的成本/用量,支持按 SERVICE、USAGE_TYPE、REGION、TAG 等分组(最多 2 个),支持 Cost Explorer filter 表达式,自动翻页
get_dimension_values 枚举某维度实际产生费用的取值(服务名、区域等),用于确定精确的过滤值
get_cost_forecast 未来时间段的成本预测(含 80% 置信区间)
get_cost_anomalies Cost Anomaly Detection 检测到的成本异常及根因
describe_budgets 账号下的 Budgets 及实际/预测执行情况
get_cost_allocation_tags 计费数据中的成本分配标签 key/value,配合 TAG 分组使用
get_commitment_utilization Savings Plans / RI 的 utilization 与 coverage

典型分析提问(在 Quick Desktop 中)

  • “这个账号本月花了多少钱?按服务排一下 Top 10。”
  • “最近 30 天每天的 Bedrock 消费趋势,有没有异常尖峰?”
  • “预测一下 8 月底的总账单。”
  • “EC2 的费用按 usage type 拆开看,哪部分涨得最快?”

环境变量

变量 默认值 说明
EXPECTED_ACCOUNT <目标AWS 账号> 允许访问的 AWS 账号,凭证不匹配即拒绝
AWS_PROFILE (系统默认) 使用的 AWS CLI profile
AWS_CLI_BIN aws AWS CLI 可执行文件路径

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured