Skip to main content
Glama

AxonHub MCP Server

一个面向 AxonHub 管理数据的只读 MCP 服务器。AI 客户端可通过自然语言查询实例状态、项目、渠道、模型、请求和用量统计。

能力

  • axonhub_status:总请求数、失败请求、延迟、Token 汇总、渠道成功率

  • axonhub_list_projects:项目列表

  • axonhub_list_channels:渠道状态、模型、限流和配额状态,不返回凭据

  • axonhub_list_models:模型能力、价格、上下文限制和渠道关联数

  • axonhub_list_requests:请求状态、延迟、执行、Token 和成本,不返回请求/响应正文

  • axonhub_usage:按渠道、模型、API Key 或用户统计用量

  • axonhub_schema:查看当前实例的 GraphQL 类型,兼容不同 AxonHub 版本

  • axonhub_graphql_query:执行自定义只读 GraphQL 查询

所有 GraphQL 文档都会被解析并拒绝 mutation 和 subscription。返回数据会递归脱敏 API Key、密码、令牌、Cookie 和凭据字段。

Related MCP server: VortexIQ MCP Connector

安装

需要 Node.js 20 或更高版本。

npm install
npm run build

配置

管理端 GraphQL API 位于 <AXONHUB_URL>/admin/graphql,使用管理端登录令牌进行 Bearer 认证。不要把令牌写入仓库或 MCP 配置文件;建议通过启动环境注入。

已登录管理端时,可在该站点的浏览器开发者工具 Console 中执行下面的表达式取得当前会话令牌。令牌属于敏感凭据,不要粘贴到聊天、提交到 Git,或发送给他人;会话失效后需要重新获取。

localStorage.getItem('axonhub_access_token')
AXONHUB_URL=https://ai.neo7.cn
AXONHUB_TOKEN=<你的 AxonHub 管理端登录令牌>
AXONHUB_PROJECT_ID=<可选的默认项目 ID>

Codex/Claude Desktop 等支持 stdio MCP 的客户端可使用以下配置形式:

{
  "mcpServers": {
    "axonhub": {
      "command": "node",
      "args": ["C:/absolute/path/to/axonhub-mcp/dist/index.js"],
      "env": {
        "AXONHUB_URL": "https://ai.neo7.cn",
        "AXONHUB_TOKEN": "${AXONHUB_TOKEN}",
        "AXONHUB_PROJECT_ID": "${AXONHUB_PROJECT_ID}"
      }
    }
  }
}

不同客户端对环境变量插值的支持不同。若客户端不支持 ${...},请从一个已设置这些环境变量的 shell 启动客户端,或使用操作系统的安全凭据注入机制。

开发与验证

npm test
npm run check
npm run build

本项目依据 AxonHub unstable 分支前端使用的 /admin/graphql 契约实现。常用工具固定选择安全字段;实例升级后如字段有变化,可先调用 axonhub_schema 检查实际 schema,再使用 axonhub_graphql_query 查询新增的只读数据。

Available Tools

8 tools
axonhub_graphql_queryRun a read-only AxonHub GraphQL queryA

Run a custom query against /admin/graphql. Mutations and subscriptions are rejected; sensitive fields are redacted.

Inputs: query (required), projectId, variables.

axonhub_list_channelsList AxonHub channelsA

List channels and their health, quota, model, and limiter status. Credentials are never returned.

Inputs: after, first, model, where, +2 more.

axonhub_list_modelsList AxonHub modelsA

List configured models, capabilities, costs, limits, and associated channel counts.

Inputs: after, first, where, projectId.

axonhub_list_projectsList AxonHub projectsB

List AxonHub projects with status and pagination information.

Inputs: after, first.

axonhub_list_requestsList AxonHub requestsA

List recent requests with status, latency, executions, token usage, and cost. Request/response payloads are excluded.

Inputs: after, first, where, projectId.

axonhub_schemaInspect AxonHub GraphQL schemaB

Inspect one GraphQL type so an AI client can adapt to the installed AxonHub version.

Inputs: typeName.

axonhub_statusAxonHub statusC

Get request totals, latency, token totals, and channel success rates from the AxonHub dashboard.

Inputs: projectId, timeWindow, channelLimit.

axonhub_usageAxonHub usage breakdownA

Get token and cost usage grouped by channel, model, API key, or user.

Inputs: dimension (required), projectId, timeWindow.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clear, distinct purpose: status, listing projects/channels/models/requests, schema inspection, usage analytics, and a generic query. No overlap or ambiguity.

    Naming Consistency5/5

    All tools follow the 'axonhub_verb_noun' pattern (e.g., list_projects, get_status, run_query). Consistent and predictable.

    Tool Count5/5

    8 tools cover the core monitoring and admin operations without redundancy. The count is well-scoped for the domain.

    Completeness4/5

    The surface covers status, listing, schema introspection, usage, and a flexible query escape hatch. It lacks per-entity detail getters, but for an admin/metrics gateway this is sufficient.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables querying your team's work (stats, overdue, workload, active members, etc.) via natural language, scoped to your department with read-only signed-token access.
      500 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Gives AI agents read-only access to any QuestDB instance, enabling schema discovery, time-series querying, and monitoring of partitions, WAL state, symbols, and ingestion health through MCP.
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables natural-language querying of Postgres and MongoDB databases in read-only mode, with PII masking and row/timeout guardrails, from any MCP client.
      -