Skip to main content
Glama
Crescender MCP Server

Crescender MCP Server

by lincalinca

Crescender MCP 服务器

用于 Crescender 公共只读 API 的模型上下文协议 (MCP) 服务器。它将 AI 客户端(Claude Desktop、Cursor、自定义代理)连接到学校的资产、借用、成员和资产通信线程——所有操作均为只读、通过范围令牌认证,且每个令牌绑定到一所学校。

状态:0.0.x — 发布前版本。 此包尚未发布到 npm 或推送到 GHCR。发布流水线已存在,但仅限手动触发;首个版本将在源代码经过本地压力测试后发布。目前,请从克隆版本或使用 pnpm link 运行(参见下方的 本地开发)。

它为 AI 提供了什么

六个只读工具,每个工具均由 /api/v1/* 端点支持:

MCP 工具

返回值

list_schools

令牌绑定的唯一学校(单项数组)

get_asset

按 ID 获取完整资产详情 — 型号、序列号、位置、角色、当前借用情况

search_assets

最多 50 个匹配 q / item_class / category / status 的资产

get_loans_for_asset

单个资产的借用历史(当前 + 过去)

list_members

成员目录 — ID、角色、状态、external_id(无个人隐私信息 PII)

list_asset_threads

带有状态过滤器的资产通信线程(只读 — 供应商令牌颁发不通过 MCP 公开)

仅限读取。v1 版本中没有 update_* / create_* 工具。

Related MCP server: OfficeRnD MCP Server

配置

两个环境变量,其中一个是必需的:

变量

默认值

说明

CRESCENDER_API_TOKEN

—

必需。 从 https://app.crescender.com.au/school/<id>/settings/integrations(学校设置下的“集成”磁贴)获取。格式为 crsc_<random>。

CRESCENDER_API_URL

https://app.crescender.com.au

仅在指向非生产环境部署时覆盖。

CRESCENDER_MCP_LOG_LEVEL

info

debug / info / warn / error 之一。日志输出到 stderr(stdout 保留给 MCP 协议)。

CRESCENDER_MCP_HEALTH

0

在容器部署中设置为 1,以在 PORT(默认为 3030)上启用 GET /health HTTP 端点。

CRESCENDER_API_TIMEOUT_MS

15000

每个请求的上游超时时间。

连接 Claude Desktop(发布后)

一旦第一个版本发布到 npm:

// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
  "mcpServers": {
    "crescender": {
      "command": "npx",
      "args": ["-y", "@crescender/mcp-server"],
      "env": {
        "CRESCENDER_API_TOKEN": "crsc_..."
      }
    }
  }
}

然后重启 Claude Desktop。这六个工具应该会出现在 MCP 选择器中。

连接 Cursor(发布后)

Cursor 从工作区中的 .cursor/mcp.json 或全局设置中读取 MCP 配置。其结构与 Claude Desktop 的 mcpServers 块相同。

本地开发

# Install
git clone https://github.com/lincalinca/crescender-mcp-server.git
cd crescender-mcp-server
pnpm install

# Build
pnpm build

# Smoke test (talks to stdin/stdout — Claude Desktop / Cursor will spawn it
# the same way)
CRESCENDER_API_TOKEN=crsc_... node dist/index.js

要在不发布的情况下将本地克隆版本连接到 Claude Desktop:

{
  "mcpServers": {
    "crescender-local": {
      "command": "node",
      "args": ["/absolute/path/to/crescender-mcp-server/dist/index.js"],
      "env": {
        "CRESCENDER_API_TOKEN": "crsc_..."
      }
    }
  }
}

容器

# Build (the published image is built by .github/workflows/publish-image.yml)
docker build -t crescender-mcp-server:dev .

# Run with the in-container /health endpoint enabled
docker run --rm -i \
  -e CRESCENDER_API_TOKEN=crsc_... \
  -e CRESCENDER_MCP_HEALTH=1 \
  -p 3030:3030 \
  crescender-mcp-server:dev

发布后,镜像将可在 ghcr.io/lincalinca/crescender-mcp-server 获取。

无状态契约

  • 无内存令牌缓存:验证在每次调用时都会访问上游 API(撤销是即时的)。

  • 无文件系统状态:仅限 stdout/stderr。

  • 配置由环境变量驱动,在启动时解析一次并冻结。

  • /health(启用时)返回 { ok, api_reachable, version } 并探测上游 /api/v1/health 以验证可达性 — 而不仅仅是“此进程存活”。

  • 优雅关闭:SIGTERM / SIGINT 触发 30 秒的排空期,然后强制退出。

这就是使容器无需任何 k8s 特定代码即可实现 k8s 就绪的原因。当最终做出编排决策(ASK / AKS / GKE / Fly / Railway 等)时,此处无需更改任何内容。

许可证

MIT — 参见 LICENSE。

相关

  • @crescender/crescender-core — 平台本身,提供此 MCP 封装的 /api/v1 端点。

  • OpenAPI 规范:https://app.crescender.com.au/api/v1/openapi.json

Available Tools

6 tools
get_assetA

Get full detail for a single asset (instrument, equipment, sub-item) by id. Includes model, serial, location, role, and the current loan if any.

Inputs: asset_id (required).

get_loans_for_assetA

Get the loan history for a single asset. Currently returns whatever loans field is embedded on the asset detail; in a future version may paginate independently.

Inputs: asset_id (required).

list_asset_threadsA

List asset-comms threads (vendor / repair / service conversations attached to assets). Read-only — vendor-token issuance is NOT exposed via this MCP.

Inputs: status, cursor.

list_membersA

List the school's members. Returns id, role, status, external_id only — no PII (email/phone are intentionally excluded from the public API).

Inputs: role, status, cursor.

list_schoolsA

List schools accessible to the calling token. Each token is bound to exactly one school, so this returns a single-item array. Useful for the AI to confirm which school it's looking at before making other calls.

Inputs: no named parameters.

search_assetsA

Search the school's assets by free-text query and/or filters. Returns up to 50 matches per page. Use the cursor field from the response to fetch the next page.

Inputs: q, item_class, category, status, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct resource or action: get_asset and search_assets are clearly different (detail vs. search), and loan history, threads, members, and schools are all separate concerns. No overlapping purposes.

    Naming Consistency5/5

    All tools consistently follow the 'verb_noun' pattern in lowercase snake_case (e.g., get_asset, list_asset_threads, search_assets). The naming is uniform and predictable.

    Tool Count5/5

    6 tools is well-scoped for an asset management server. Each tool covers a core area without being overwhelming or insufficient.

    Completeness2/5

    The tool surface is heavily read-only: assets have get and search but no create/update/delete; loans only show history; threads only list; members and schools only list. Missing basic write operations for the domain.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A read-only MCP server that provides access to Charles Schwab account data and market information, including portfolio positions, real-time quotes, options chains, price history, and account balances through AI assistants.
      9
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Read-only MCP server that lets a verified client connect their own AI to their trading account to read account data without order execution.
      -