
Alephant Mcp
io.github.AlephantAI由 GitHub 帳號 AlephantAI 發布v0.1.3更新於 Oct 24, 2026
Alephant MCP server for AI cost control, BYO-key routing, 50+ providers, and 320+ models.
概覽
本機 stdio MCP 伺服器,用於 Alephant BYO-key 的 AI 成本控管,向助理提供用量、預算與工作區 FinOps 分析。
- 可以做什麼
- 檢查連線狀態,讀取用量摘要、每日成本、依模型成本與可用模型清單
- 檢視虛擬金鑰駕駛艙範圍、預算與最近請求(唯讀 VK 模式)
- 檢視工作區概覽、預算狀態、訂閱資訊、近 24 小時用量、時間序列與迷你趨勢圖
- 管理虛擬金鑰:列出、建立、調整預算與撤銷
- 分析代理、成員與部門,設定預算政策,診斷成本異常、下鑽支出、找出閒置資源並比較期間
- 執行成本稽核與成本最佳化提示詞
- 適用情境
- 適合需要讓助理回答 AI 花費、預算以及依模型或依團隊成本問題,或在 Cursor、Claude Desktop、Codex、Claude Code 等聊天用戶端中管理虛擬金鑰與預算政策的情境。
- 執行需求
- 透過 npx 執行 npm 套件 @alephantai/mcp,需要 Node.js。需設定 ALEPHANT_API_BASE_URL,並設定 ALEPHANT_VIRTUAL_KEY(唯讀 VK 模式)或 ALEPHANT_PAT 加 ALEPHANT_WORKSPACE_ID(Manager 模式);兩者皆未設定時程序會報錯結束。選用的 ALEPHANT_RATE_LIMIT_RPM 預設為 60。需要能連線至 Alephant API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Alephant Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Alephant MCP Server
Model Context Protocol server for Alephant BYO-KEY: FinOps metrics, virtual keys, and workspace analytics from Cursor, Claude Desktop, or any MCP host.
Modes
PAT takes precedence when ALEPHANT_PAT is non-empty. If neither VK nor PAT is set, the process exits with an error (no mock data).
Required (both modes): ALEPHANT_API_BASE_URL
Optional: ALEPHANT_RATE_LIMIT_RPM (default 60, use 0 to disable client-side throttling)
Windows / npx troubleshooting
From this repo’s root (alephant-mcp/): do not use npx -y @alephantai/mcp to “smoke test” the published package. npm treats the current directory as the local @alephantai/mcp project and does not link the root package’s bin into node_modules/.bin, so Windows then fails with 'alephant-mcp' is not recognized (or the Chinese CMD equivalent).
Use one of these instead while developing in the clone:
To verify npx the same way end users do, run it from any other directory (e.g. the parent folder):
From a normal project folder (after npm install @alephantai/mcp), you can also run:
If npx -y @alephantai/mcp still fails outside the clone, try:
Published packages 0.0.2+ include the bin/alephant-mcp.js shim for reliable npm bin resolution when installed from the registry.
MCP client config
Alephant MCP is a local stdio server. Use one server entry per credential scope. For multiple workspaces, create multiple entries with different names and environment variables.
Cursor / Claude Desktop
Virtual Key (read-only / scoped cockpit):
Personal Access Token (manager):
Use separate mcpServers entries per workspace when you have multiple PATs.
Codex
Add a stdio MCP server in ~/.codex/config.toml:
For Manager mode, replace the VK env with:
Verify with:
OpenCode
Add a local MCP server under mcp in your OpenCode config, for example opencode.json:
For Manager mode, use ALEPHANT_PAT and ALEPHANT_WORKSPACE_ID in environment instead of ALEPHANT_VIRTUAL_KEY.
Claude Code
Use the CLI to add Alephant as a local stdio server:
For a shared project config, create .mcp.json in the project root:
For Manager mode, replace the VK env with ALEPHANT_PAT and ALEPHANT_WORKSPACE_ID.
CLI audit
- VK: prints cockpit
scope+usage-summary(billing cycle). - Manager: prints workspace id +
GET /api/v1/analytics/overview.
Tools (summary)
Shared (both modes): check_alephant_connection, get_usage_summary, get_daily_costs, get_cost_by_model, list_available_models
VK only: get_my_scope, get_my_budget, get_my_recent_requests
Manager only: get_workspace_overview, get_workspace_budget_status, list_virtual_keys, create_virtual_key, update_key_budget, revoke_virtual_key, list_agents, get_agent_analytics, list_members, get_member_analytics, list_departments, get_department_analytics, get_subscription_info, set_budget_policy, get_live_24h, get_usage_timeseries, get_sparklines, diagnose_cost_anomaly, get_executive_dashboard, drill_down_spend, find_idle_resources, compare_entity_periods
get_request_logs is not included (JWT-only backend route).
Prompts & resources
- cost_audit_report — both modes
- cost_optimization — manager only
Documentation
- 中文:在 AI Agent 中如何使用 MCP — 自然语言提问示例、
/alephant-…快捷模板、工具对照表 - Marketplace submission: see
docs/marketplace-submission.mdfor official MCP Registry, Smithery, and Glama submission notes.
Development
Package
Published as @alephantai/mcp (alephant-mcp binary).
來源:README.md,提交 c4f4a1f
工具
0版本歷史
1- v0.1.3最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。