@adminforth/mcp

中文文档
3.5.0发布于 2026/10/30MITTypeScriptES Module近 30 天下载 2896

Expose AdminForth APIs as an authenticated MCP server

原始使用文档

AdminForth MCP

@adminforth/mcp exposes the AdminForth API tool surface as an authenticated remote MCP server. Agents connect through OAuth sign-in or with an auth secret, and act as the AdminForth user who connected them, so resource permissions and hooks are preserved.

The required adminPanelOrigin is the public origin agents connect to; the plugin combines it with the AdminForth baseUrl to build the MCP URL and the OAuth issuer.

With internalOnly: true the plugin serves only the in-process connections of @adminforth/agent and needs neither adminPanelOrigin nor the auth secret table.

Security: an MCP auth secret carries the full permissions of the user who created it. An agent holding it can do everything that user can do in the admin panel, including destructive actions and changes to that user's security settings. Issue one secret per agent, treat it like a password, and revoke it as soon as the agent or its machine is compromised.

Install with:

pnpm add @adminforth/mcp

See the AdminForth MCP documentation for the auth secret table and plugin configuration.

版本与发布记录

@adminforth/mcp 共发布 25 个版本,首次发布于 2026/09/16;过去 12 个月发布了 25 个版本。

版本发布日期距今
3.5.0latest2026/10/308 天前
3.4.02026/10/299 天前
3.3.02026/10/2810 天前
3.2.12026/10/2612 天前
3.2.02026/10/2117 天前
3.1.32026/10/1919 天前

关于 @adminforth/mcp 的常见问题

@adminforth/mcp 是什么?

Expose AdminForth APIs as an authenticated MCP server

如何安装 @adminforth/mcp?

在项目目录运行 npm install @adminforth/mcp,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:express(^4.21.0 || ^5.0.0)、adminforth(^4.7.3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@adminforth/mcp 支持 TypeScript 吗?

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

@adminforth/mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adminforth/mcp 需要什么版本的 Node.js?

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

@adminforth/mcp 可以商用吗?

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

@adminforth/mcp 的下载量有多少?

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

@adminforth/mcp 还在维护吗?

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