Vantage MCP 服务器是一个开源工具,用 Go 语言编写,允许您通过 AI 助手和 MCP 客户端与您的云成本数据进行交互。作为 Vantage 现有 API 的桥梁,Vantage MCP 服务器让您能够使用自然语言查询云成本数据,并使成本分析更加直观。
📝 注意:Vantage MCP 服务器提供自托管和远程两种形式。此仓库支持自托管版本,它使用本地运行的 标准输入/输出 (stdio) 传输。对于远程替代方案,请参阅 Vantage MCP 文档。
目前,Vantage MCP 服务器公开了以下工具,这些工具可以被任何兼容的 MCP 客户端(例如 Claude、Cursor、Goose)调用:
query-costs
list-costs
list-cost-reports
get-cost-report-forecast
list-cost-integrations
list-cost-providers
list-cost-services
list-budgets
list-dashboards
list-tags
list-tag-values
list-anomalies
list-unit-costs
get-myself
submit-user-feedback
如果您是从源代码安装,确保安装了以下包(请参见 .tool-versions 中的确切版本):
您可以使用版本管理器(例如 asdf)或包管理器(例如 Homebrew)来安装这些依赖项。
您还需要创建一个 只读 的 Vantage API 令牌(写入功能暂时不可用)。请遵循 Vantage API 文档 中的说明。我们建议为 MCP 服务器创建一个全新的只读 API 令牌。
brew install vantage-sh/tap/vantage-mcp-server
git clone https://github.com/vantage-sh/vantage-m-服务器
go build -o vantage-mcp-server
chmod +x vantage-mcp-server
📝 注意:如果您从仓库拉取新更改,请务必重新运行
go build来重建服务器并确保您正在运行最新版本。
npx @modelcontextprotocol/inspector -e VANTAGE_BEARER_TOKEN=<token> ./vantage-mcp-server
设置说明因使用的 MCP 客户端而异。示例客户端包括:
请参阅 MCP 文档 以获取可用客户端列表。以下是针对桌面版 Claude、Cursor 和 Goose 的详细说明。
Command + ,)。~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json打开 claude_desktop_config.json 文件并更新其内容。确保替换占位符 <path_to_compiled_vantage_mcp_server_binary> 为您下载的 Vantage MCP 服务器二进制文件路径,以及 <personal_vantage_api_token> 为您自己的 Vantage API 令牌。
{
"mcpServers": {
"Vantage": {
"command": "<path_to_compiled_vantage_mcp_server_binary>",
"args": [],
"env": { "VANTAGE_BEARER_TOKEN": "<personal_vantage_api_token>" }
}
}
}
保存配置文件并重启 Claude。
在桌面版 Claude 输入框右下角,点击锤子图标以查看 Vantage MCP 服务器的可用工具。
设置好配置后,您可以开始提示 Claude。每次使用新工具时,Claude 都会请求您的批准后再继续。
下载 Cursor。
打开 Cursor 并从菜单栏点击 Cursor > 设置 > Cursor 设置。
在左侧窗格中,选择 MCP。
点击 添加新的全局 MCP 服务器。
更新打开的 mcp.json 文件的内容。确保替换占位符 <path_to_compiled_vantage_mcp_server_binary> 为您下载的 Vantage MCP 服务器二进制文件路径,以及 <personal_vantage_api_token> 为您自己的 Vantage API 令牌。
{
"mcpServers": {
"Vantage": {
"command": "<path_to_compiled_vantage_mcp_server_binary>",
"args": [],
"env": { "VANTAGE_BEARER_TOKEN": "<personal_vantage_api_token>" }
}
}
}
Command + ,)。vantage-mcp-server。Vantage。查询成本和使用数据。VANTAGE_BEARER_TOKEN 的新变量,并将其值设置为您自己的 Vantage API 令牌。如果您从我们的 GitHub 页面下载了一个发行版,但可执行文件因为“无法验证开发者”而无法运行,请打开您的系统设置。然后找到“隐私和安全”部分。向下滚动到底部,您应该会看到一条消息,说“vantage-mcp-server-macos”已被阻止,点击“仍然打开”按钮。完成这一流程后,可执行文件应该就可以正常运行了。
如果您想为此项目做出贡献:
git checkout -b feature/my-feature。我们欢迎社区贡献、改进和错误修复。如果您遇到任何问题,请通过此仓库的 GitHub Issues 提交错误报告。
请参阅 LICENSE.MD 文件以了解商业和非商业许可详情。