@atlasauth/pca-mcp-rs

中文文档
0.4.3发布于 2026/10/28MITTypeScriptCommonJS近 30 天下载 1715

MCP授权资源服务器2026-07-28 spec:服务RFC 9728 PRM + 客户端-ID元数据文档,执行RFC 8707资源指标 + RFC 9207 发行者验证 + 范围积累,并电线将PAC FROST分级提升到MCP分级挑战中

中文使用文档
文档目录5 节
  1. 安装
  2. 使用量
  3. API 密码
  4. 状态
  5. 许可证

@atlasauth/pca-mcp-rs (英语)

MCP授权资源服务器用于2026-07-28 MCP授权修改,由Proof-Crying Authority(PCA)支持. 何处 @atlasauth/pca-mcp 将工具处理器包裹在客户端上,所以每个呼叫都携带PCActn,这个包使接收这些呼叫的服务器成为正确的OAuth 2.1资源服务器:它服务于RFC 9728保护资源元数据,验证客户端ID元数据文档,执行RFC 8707资源绑定和RFC 9207发行者验证,在授权链下积累范围,并发布RFC 9470分步挑战. 当局是PCAKN,不是无记名标志:它的签名 aud 是资源约束.

安装

npm i @atlasauth/pca-mcp-rs @atlasauth/pca

所有东西都是纯和运行时间中立的(没有节点内建,没有框架),因此它挂载在快取,快取,Hono,Next.js,取取取处理器或任何路由器上.

使用量

import { prmHandler, authorizeRequest } from '@atlasauth/pca-mcp-rs';

const resource = 'https://mcp.example.com';
const authorizationServers = ['https://as.example.com'];

// 1. Serve the Protected Resource Metadata (RFC 9728) at the returned path.
const prm = prmHandler({ resource, authorizationServers, scopesSupported: ['refund:write'] });
// GET prm.path  ->  JSON prm.body

// 2. Admit each tool call.
const result = await authorizeRequest(req /* { headers, body? } */, {
  resource,                                   // must equal the PCActn's signed `aud`
  authorizationServers,                       // allowed grant issuers (RFC 9207)
  resolveGrant: async (ref) => grants.get(ref) ?? null,
  prmUrl: `${resource}${prm.path}`,
  tool: 'refund',
  toolScopes: { refund: 'refund:write' },
  toolStepUp: { refund: 2 },                  // optional: require a guardian (2) or principal (3) co-sign
});

if (!result.ok) {
  // result.status is 401 or 403; send the challenge header with the response.
  return new Response(JSON.stringify({ error: result.error }), {
    status: result.status,
    headers: { 'WWW-Authenticate': result.wwwAuthenticate },
  });
}
result.pcactn; result.grantedScopes; result.checks;

authorizeRequest 从中读取 PCActn PCA-Action 头(基数64url)或JSON体 { pcactn },且未关闭:任何缺失、不匹配或无法核实的元素均以正确状态被拒绝 WWW-Authenticate 还有403个意外错误.

API 密码

  • protectedResourceMetadata(opts), (中文(简体) ), prmHandler(opts), (中文(简体) ), WELL_KNOWN_OAUTH_PRM - RFC 9728元数据.
  • authorizeRequest(req, opts), (中文(简体) ), extractPCActn(req) - 录取检查.
  • wwwAuthenticateChallenge(opts) - 建立一个 WWW-Authenticate: Bearer ... 数值.
  • clientIdMetadataDocument(opts), (中文(简体) ), verifyCimd(input, opts?) - 客户ID元数据文档(https) client_id,重定向URI检查).
  • accumulateScopes(caveats, base?), (中文(简体) ), isScopeCaveat - 缩小范围 scope 戒备.
  • requiredRolesForTier, (中文(简体) ), verifyStepUp, (中文(简体) ), StepUpChallenge - 站出来帮手.

状态

升级是通过加密核实的,没有缺省存在检查。 当适用几个层级源时(requiredTier, (中文(简体) ), toolStepUp[tool],则 riskTiers 有效层级是其最大层级,以及 toolStepUp 无 tool 未关闭( R3-08) 。 当某一层级适用时(toolStepUp, (中文(简体) ), requiredTier,或 riskTiers,通过 stepUpSignerSet (代理人、监护人和主要公用钥匙):每股按规定分级核实 t (第2级=t 2, 第3级=t 3,因此第3级需要经核实的主要份额),通过五氯苯甲醚阈值核查器。 或者通过自己的 stepUpSatisfied,它必须验证股票本身。 两者都一样 电话都关了. riskTiers 需要一个 serverRisk(pcactn, grant) 从服务器持有的数据中重新计算风险的回调; 代理签名 risk_claim.r 从未使用. authorizeRequest 仅与赠款和观众联系PCA核心核查员;它不需要重播商店或撤销列表,所以如果需要,请加入周围的列表。 PCA密码学没有经过独立审计.

许可证

麻省理工学院 - 见LICENSE

版本与发布记录

@atlasauth/pca-mcp-rs 共发布 8 个版本,首次发布于 2026/10/08;过去 12 个月发布了 8 个版本。

版本发布日期距今
0.4.3latest2026/10/2813 天前
0.4.22026/10/2614 天前
0.4.12026/10/1228 天前
0.4.02026/10/1228 天前
0.3.02026/10/091 个月前
0.2.02026/10/091 个月前

关于 @atlasauth/pca-mcp-rs 的常见问题

@atlasauth/pca-mcp-rs 是什么?

MCP授权资源服务器2026-07-28 spec:服务RFC 9728 PRM + 客户端-ID元数据文档,执行RFC 8707资源指标 + RFC 9207 发行者验证 + 范围积累,并电线将PAC FROST分级提升到MCP分级挑战中

如何安装 @atlasauth/pca-mcp-rs?

在项目目录运行 npm install @atlasauth/pca-mcp-rs,或使用 pnpm add / yarn add / bun add。

@atlasauth/pca-mcp-rs 支持 TypeScript 吗?

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

@atlasauth/pca-mcp-rs 支持 ESM 还是 CommonJS?

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

@atlasauth/pca-mcp-rs 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@atlasauth/pca-mcp-rs 可以商用吗?

@atlasauth/pca-mcp-rs 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@atlasauth/pca-mcp-rs 的下载量有多少?

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

@atlasauth/pca-mcp-rs 还在维护吗?

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