npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lofter-admin/mcp-backend

v0.1.1

Published

LOFTER Admin MCP Server

Readme

LOFTER Admin MCP Server

将 LOFTER 管理后台的核心能力封装为 AI 可直接调用的工具集,让 AI 能够查询文章、创作者、IP、标签等内容数据,辅助运营决策和内容分析。

快速接入

环境要求

  • Node.js >= 20

stdio 模式(本地集成)

.mcp.jsonmcp 字段中添加:

"LOFTER-admin": {
  "type": "stdio",
  "command": "pnpx",
  "args": ["@lofter-admin/mcp-backend", "start", "-t", "stdio"],
  "enabled": true,
  "timeout": 60000
}

LOFTER_ADMIN_SECRET 为 LOFTER 管理后台鉴权密钥,向管理员申请。

也可通过 lofter-admin-cli 写入本地配置,无需在 MCP 配置中重复填写:

lofter-admin-cli config --set secret=<你的密钥>

写入后保存在 ~/.lofter-micro/config,mcp-backend 会自动读取。

HTTP 模式(远程服务 / 多用户)

启动 HTTP MCP Server(可选配默认密钥作为 fallback):

LOFTER_ADMIN_SECRET=<默认密钥> npx @lofter-admin/mcp-backend start -t http -p 3000

Secret 优先级:请求 header > 环境变量 LOFTER_ADMIN_SECRET > lofter-admin-cli config --set secret=xxx 写入的本地配置(~/.lofter-micro/config)。多用户并发场景下,每个请求独立使用自己的 secret,互不干扰。未提供 header 时依次 fallback 到环境变量和本地配置;三者均未设置则返回错误。


技术信息

  • 包名@lofter-admin/mcp-backend
  • 协议:MCP(Model Context Protocol)
  • 传输模式:stdio(本地集成)/ HTTP SSE(远程集成)
  • 上游服务https://lofter.hz.netease.com
  • 认证方式:Header lofter-micro-secret;HTTP 模式支持通过请求 header LOFTER_ADMIN_SECRET 动态传入;也可通过 lofter-admin-cli config --set secret=xxx 写入本地配置