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.

概覽

AI 產生的概覽

本機 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 的網路。
安裝前請注意
需要金鑰憑證:ALEPHANT_PAT(工作區層級 Manager 權限)或 ALEPHANT_VIRTUAL_KEY;兩者同時存在時以 PAT 優先。Manager 模式可建立、撤銷虛擬金鑰並修改預算政策,助理的操作會改變工作區設定。每個憑證範圍應使用個別的伺服器項目,避免把權杖寫進共用專案設定。不提供請求日誌。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Alephant Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

ModeEnvironmentTools
VKALEPHANT_VIRTUAL_KEYCockpit-scoped usage + 3 VK tools (8 tools total incl. shared)
ManagerALEPHANT_PAT + ALEPHANT_WORKSPACE_IDWorkspace-wide management (27 tools total incl. shared)

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:

powershell
npm start# ornode .\bin\alephant-mcp.js

To verify npx the same way end users do, run it from any other directory (e.g. the parent folder):

powershell
cd ..npx -y @alephantai/mcp

From a normal project folder (after npm install @alephantai/mcp), you can also run:

powershell
node .\node_modules\@alephantai\mcp\bin\alephant-mcp.js

If npx -y @alephantai/mcp still fails outside the clone, try:

powershell
npx --yes --package=@alephantai/mcp alephant-mcp

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):

json
{  "mcpServers": {    "alephant": {      "command": "npx",      "args": ["-y", "@alephantai/mcp"],      "env": {        "ALEPHANT_API_BASE_URL": "https://alephant.io",        "ALEPHANT_VIRTUAL_KEY": "vk-..."      }    }  }}

Personal Access Token (manager):

json
{  "mcpServers": {    "alephant-workspace-a": {      "command": "npx",      "args": ["-y", "@alephantai/mcp"],      "env": {        "ALEPHANT_API_BASE_URL": "https://alephant.io",        "ALEPHANT_PAT": "pat_...",        "ALEPHANT_WORKSPACE_ID": "00000000-0000-0000-0000-000000000000"      }    }  }}

Use separate mcpServers entries per workspace when you have multiple PATs.

Codex

Add a stdio MCP server in ~/.codex/config.toml:

toml
[mcp_servers.alephant]command = "npx"args = ["-y", "@alephantai/mcp"]env = {  ALEPHANT_API_BASE_URL = "https://alephant.io",  ALEPHANT_VIRTUAL_KEY = "vk-..."}startup_timeout_sec = 20tool_timeout_sec = 120

For Manager mode, replace the VK env with:

toml
env = {  ALEPHANT_API_BASE_URL = "https://alephant.io",  ALEPHANT_PAT = "pat_...",  ALEPHANT_WORKSPACE_ID = "00000000-0000-0000-0000-000000000000"}

Verify with:

bash
codex mcp listcodex mcp get alephant

OpenCode

Add a local MCP server under mcp in your OpenCode config, for example opencode.json:

json
{  "$schema": "https://opencode.ai/config.json",  "mcp": {    "alephant": {      "type": "local",      "command": ["npx", "-y", "@alephantai/mcp"],      "enabled": true,      "environment": {        "ALEPHANT_API_BASE_URL": "https://alephant.io",        "ALEPHANT_VIRTUAL_KEY": "vk-..."      }    }  }}

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:

bash
claude mcp add-json alephant '{"type":"stdio","command":"npx","args":["-y","@alephantai/mcp"],"env":{"ALEPHANT_API_BASE_URL":"https://alephant.io","ALEPHANT_VIRTUAL_KEY":"vk-..."}}' --scope userclaude mcp listclaude mcp get alephant

For a shared project config, create .mcp.json in the project root:

json
{  "mcpServers": {    "alephant": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@alephantai/mcp"],      "env": {        "ALEPHANT_API_BASE_URL": "https://alephant.io",        "ALEPHANT_VIRTUAL_KEY": "vk-..."      }    }  }}

For Manager mode, replace the VK env with ALEPHANT_PAT and ALEPHANT_WORKSPACE_ID.

CLI audit

bash
npx --yes --package=@alephantai/mcp alephant-mcp --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

Development

bash
npm installnpm testnpm run build

Package

Published as @alephantai/mcp (alephant-mcp binary).

來源:README.md,提交 c4f4a1f

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.3最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。