@abgov/adsp-sdk-mcp-server

中文文档
1.20.1发布于 2026/11/07Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 1785

Government of Alberta - MCP server for ADSP documentation and Node SDK reference lookup.

原始使用文档
文档目录3 节
  1. Usage
  2. Using list_service_roles
  3. Development

@abgov/adsp-sdk-mcp-server

An MCP (Model Context Protocol) server that gives an AI coding assistant grounded, sourced answers about the Alberta Digital Service Platform (ADSP) and the Node SDK (@abgov/adsp-service-sdk), instead of guessing.

It bundles the ADSP documentation site content and a curated reference of every @abgov/adsp-service-sdk export, and exposes them over stdio via five tools:

  • search_adsp_docs — keyword search across ADSP platform docs (getting started, architecture, service concepts, tutorials).
  • read_adsp_doc — read the full content of a doc page found via search.
  • search_sdk_reference — search @abgov/adsp-service-sdk by symbol name, module, or keyword; returns full symbol details (kind, description, option/return shape, example, deprecated flag).
  • get_platform_quickstart — the canonical initializeService usage pattern (the common case for a tenant service built on top of ADSP) and a capabilities summary, for the most common question: how to start using ADSP from a Node service.
  • list_service_roles — the one tool that talks to a real ADSP environment, not bundled/offline data. Reads every platform service's registered RBAC role live from tenant-service configuration, so an agent can pick a least-privileged role instead of defaulting to an admin role. Requires logging in first (see below) — everything else in this package works fully offline with no setup.

This package covers the Node SDK only. Other language SDKs (.NET, Django, Flask, Spring) are out of scope for now.

The SDK has two entry points for two different kinds of service: initializeService for tenant services (the primary audience for this package — product teams building on top of ADSP) and initializePlatform for cross-tenant platform services (the ones that live in this monorepo, e.g. directory-service, configuration-service). Content here is weighted toward initializeService accordingly.

Usage

Add it to your MCP client's server config, run via npx:

{
  "mcpServers": {
    "adsp-sdk": {
      "command": "npx",
      "args": ["-y", "@abgov/adsp-sdk-mcp-server"]
    }
  }
}

Using list_service_roles

That one tool needs a real ADSP environment and a logged-in session (via @abgov/adsp-cli, a separate package this one depends on). One-time setup — no MCP client config changes needed:

npx @abgov/adsp-cli login --tenant "My Tenant"
# or --realm <realm> if you already know it, or no args to pick interactively from the full tenant list

login persists the resolved realm, so the MCP server just works after that — no env block required in the MCP client config. ADSP_TENANT_REALM remains available as an optional override (e.g. CI, or switching contexts).

The same role data is also available directly from a terminal, without an MCP client at all: npx @abgov/adsp-cli service-roles.

If list_service_roles is called without a valid login, it returns a clear, actionable error (telling you to run npx @abgov/adsp-cli login) rather than failing silently or hanging — it never opens a browser or blocks waiting for one itself.

Development

nx build adsp-sdk-mcp-server
nx test adsp-sdk-mcp-server
nx lint adsp-sdk-mcp-server

To try it locally against a real MCP client, point the client config's command/args at the built entry point instead of npx:

{
  "command": "node",
  "args": ["<repo>/dist/libs/adsp-sdk-mcp-server/src/main.js"]
}

版本与发布记录

@abgov/adsp-sdk-mcp-server 共发布 33 个版本,首次发布于 2026/07/07;过去 12 个月发布了 33 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.20.1latest2026/11/071 天前
1.20.02026/11/053 天前
1.19.12026/11/035 天前
1.19.02026/11/035 天前
1.18.02026/10/309 天前
1.17.02026/10/309 天前

关于 @abgov/adsp-sdk-mcp-server 的常见问题

@abgov/adsp-sdk-mcp-server 是什么?

Government of Alberta - MCP server for ADSP documentation and Node SDK reference lookup.

如何安装 @abgov/adsp-sdk-mcp-server?

在项目目录运行 npm install @abgov/adsp-sdk-mcp-server,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 adsp-sdk-mcp-server,可以用 npx adsp-sdk-mcp-server 直接运行。

@abgov/adsp-sdk-mcp-server 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@abgov/adsp-sdk-mcp-server 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@abgov/adsp-sdk-mcp-server 可以商用吗?

@abgov/adsp-sdk-mcp-server 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@abgov/adsp-sdk-mcp-server 的下载量有多少?

根据 npm 官方下载统计,@abgov/adsp-sdk-mcp-server 在 2026/10/05 – 2026/11/03 这 30 天内被下载 1,785 次,日均约 60 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@abgov/adsp-sdk-mcp-server 还在维护吗?

最新版本 1.20.1 发布于 2026/11/07(1 天前);至今共发布 33 个版本,其中过去 12 个月发布了 33 个;首次发布于 2026/07/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。