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

gonline-mcp

v1.0.8

Published

Gonline MCP Server - Blog/Forum/Columns Document Publish, Update, Image Upload & Query

Readme

gonline-mcp

Gonline MCP Server,为 Cursor、Claude Code 等 Agent 提供博客/论坛/专栏文档草稿发布、内容修改、图片上传与查询能力。

| 工具 | 后端 API | |------|----------| | image_upload | POST /mcp/file/upload | | blog_publish | POST /mcp/blog/publish | | blog_update | POST /mcp/blog/update | | blog_query | 有 idPOST /mcp/blog/detail;无 idPOST /mcp/blog/search | | forum_publish | POST /mcp/forum/publish | | forum_update | POST /mcp/forum/update | | forum_query | 有 idPOST /mcp/forum/detail;无 idPOST /mcp/forum/search | | columns_query | 有 idPOST /mcp/columns/detail;无 idPOST /mcp/columns/search | | columns_document_publish | POST /mcp/columns/document/publish | | columns_document_update | POST /mcp/columns/document/update | | columns_document_query | 有 idPOST /mcp/columns/document/detail;无 idPOST /mcp/columns/document/search |

博客落库 ForumPosts,论坛帖子落库 question_library,专栏文档落库 documents(须指定专栏 sourceId)。
blog_* / forum_* / columns_document_* 新建草稿日限额分开统计(各 10 篇/用户/自然日);修改不占限额

鉴权与 智忆 zhiyi-mcp 对齐:环境变量 BIGAPP_API_KEY / BIGAPP_API_BASE,请求头 Authorization: Bearer bigapp_… + X-Trace-Id。主站 BaseResult 成功码为 200(智忆 Memory API 为 0;客户端兼容两者)。

摘要/标签由主站自动生成,链路对齐智忆 MCP:

Cursor → gonline-mcp → gonline-core-server → ai-gateway(summary-default / deepseek-v4-flash)→ 模型

本 MCP 进程直连 ai-gateway,只转发主站 /mcp/*
博客封面默认不生成;仅当调用方显式传 generateCover=true 时,主站经 ai-gateway(Seedream)生成 16:9 横版封面。论坛无封面字段。

前置条件

  1. 已能访问 gonline 主站 API
  2. Node.js 18+(需支持原生 fetch
  3. 在个人中心「空间管理」签发个人空间 Agent API Key(bigapp_…

安装与构建

cd gonline-mcp
npm install
npm run build              # 本地开发
npm run build:test         # 测试环境
npm run build:production   # 生产环境

构建时会按命令读取对应 .env.*,将 BIGAPP_API_BASE 写入 dist。Cursor MCP 配置一般无需再填该地址;需要指向其他环境时可在 MCP env 中覆盖。

发布 npm:npm publishlatest,bake 生产);npm run publish:testtest 标签,bake .env.test,须带 :3913)。

环境文件

| 文件 | 构建命令 | 说明 | |------|----------|------| | .env.development | npm run build | 本地,…:3902/api | | .env.test | npm run build:test | 测试环境(须用 …:3913/api;无端口会被 nginx 302 到生产) | | .env.production | npm run build:production | 生产 https://www.atbigapp.com/api |

运行时环境变量(Cursor MCP 配置)

| 变量 | 说明 | 是否必填 | 默认 | |------|------|----------|------| | BIGAPP_API_KEY | 个人空间签发的 Agent 密钥 | 是 | — | | BIGAPP_API_BASE | 主站 API 根地址;未配置时使用构建 bake 值 | 否 | bake 值 |

MCP 工具

| 工具 | 后端 API | 说明 | |------|----------|------| | image_upload | POST /mcp/file/upload | 上传图片到 OSS,返回 url;正文配图必用 | | blog_publish | POST /mcp/blog/publish | 保存博客草稿;日限额 10 篇/用户(与论坛/专栏文档分开) | | blog_update | POST /mcp/blog/update | 修改本人博客;不占限额;草稿保持草稿,已发布改文按 C 端规则可能重审 | | blog_query | detail / search | 查询博客:有 id 查详情,否则按条件检索列表 | | forum_publish | POST /mcp/forum/publish | 保存论坛草稿到 question_library;日限额 10 篇/用户 | | forum_update | POST /mcp/forum/update | 修改本人论坛帖;不占限额;草稿保持草稿,已发布改文进入审核 | | forum_query | detail / search | 查询论坛帖 | | columns_query | detail / search | 查询专栏,用于拿到 sourceId | | columns_document_publish | POST /mcp/columns/document/publish | 保存专栏文档草稿(必填 sourceId;可选 parentId) | | columns_document_update | POST /mcp/columns/document/update | 修改本人专栏文档;不占限额;不改变挂载与状态 | | columns_document_query | detail / search | 查询专栏文档(可按 sourceId+title 定位父节点) |

image_upload(正文配图)

发布/修改带图内容时,先上传再写正文

  1. image_uploadlocalPath / imageUrl / imageBase64 三选一)→ 得到 OSS url
  2. 在 Markdown 中写入 ![说明](url)
  3. 再调用 blog_publish / forum_publish / columns_document_publish(或对应 update)

| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | localPath | string | 三选一 | 本机图片路径 | | imageUrl | string | 三选一 | 远程图片 URL(下载后转存 OSS) | | imageBase64 | string | 三选一 | base64 或 data URL | | fileName | string | 否 | 原始文件名 |

单张不超过 5MB。成功返回 url(必用)、fileIdoriginalName
仅请求主站 POST /mcp/file/upload(个人空间 Agent API Key 鉴权),不再回退 /file/upload

blog_publish / forum_publish

入参与行为大体一致(路径与文案不同)。博客额外支持可选封面开关。

必填参数

| 参数 | 类型 | 说明 | |------|------|------| | title | string | 标题(须由 AI 生成;页面单独展示) | | content | string | 正文 Markdown(须由 AI 生成;不要在正文写一级标题 # ...,避免与页面标题重复;小节可用 ##) |

可选参数(仅 blog_publish)

| 参数 | 类型 | 默认 | 说明 | |------|------|------|------| | generateCover | boolean | false | 为 true 时用 AI 生成 16:9 横版封面;未要求生成时不要传 true |

服务端入库前会自动剥离正文开头的 # 一级标题。成功后返回草稿 id 等字段(博客若生成封面会带 articlePic / coverGenerated)。博客请到「我的博客」、论坛请到「我的论坛」找到草稿,选择归属组织后再发布。

blog_update / forum_update / columns_document_update

修改本人已有内容。仅作者可改;不占日限额。

| 资源 | 草稿 | 已发布 / 非草稿 | |------|------|-----------------| | 博客 / 论坛 | 保持草稿,不触发审核 | 对齐 C 端修改链路:有内容审核节点时重新进入审核(博客正文未变可保持展示) | | 专栏文档 | 保持草稿 | 直接更新展示内容(专栏文档无独立内容审核节点);不改变 sourceId / parentId |

必填参数

| 参数 | 类型 | 说明 | |------|------|------| | id | string | 目标内容 id(先用对应 *_queryscope=mine 定位) | | title | string | 新标题 | | content | string | 新正文 Markdown(不要写 # 一级标题) |

可选参数(仅 blog_update)

| 参数 | 类型 | 默认 | 说明 | |------|------|------|------| | generateCover | boolean | false | 为 true 时用 AI 重新生成 16:9 横版封面;失败则保留原封面 |

平台默认重新生成摘要与标签;封面仅在显式开启时生成。

columns_query

用于在「我的专栏 / 切换列表」中定位专栏 id。

| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | id | string | 否 | 专栏 ID;传入则查详情 | | keyword | string | 否 | 匹配标题或描述 | | title | string | 否 | 标题模糊匹配 | | scope | string | 否 | public(默认)| mine(我的专栏,含草稿) | | statusType | number | 否 | 仅 mine1 草稿 2 展示 | | pageNum / pageSize | number | 否 | 分页 |

columns_document_publish

必填sourceIdtitlecontent可选parentId(默认挂根)。

| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | sourceId | string | 是 | 目标专栏 id(来自 columns_query) | | parentId | string | 否 | 父文档 id;不传/0=专栏根;传入则挂到该节点下 | | title | string | 是 | 文档标题 | | content | string | 是 | Markdown 正文(不要写 # 一级标题) |

签发人须为该专栏创建者。草稿 status=1(与博客 DocumentStatus 一致)。

columns_document_query

blog_query 同构,并支持 sourceId 限定专栏。

| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | id | string | 否 | 文档 ID;传入则查详情 | | sourceId | string | 否 | 限定专栏 | | keyword / title | string | 否 | 检索条件 | | scope | string | 否 | public | mine | | statusType | number | 否 | 仅 mine1 草稿 2 展示 3 审核中 4 审核失败 | | pageNum / pageSize | number | 否 | 分页 |

blog_query / forum_query

统一查询工具(参数一致):

  • id:返回该篇完整内容(含正文),忽略其余检索参数
  • 不传 id:按关键词/标题分页检索;列表项含标题、摘要、作者昵称与巨人号等,不含正文

| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | id | string | 否 | 文章/帖子 ID;传入则查详情 | | keyword | string | 否 | 匹配标题或正文(无 id 时生效) | | title | string | 否 | 标题模糊匹配(无 id 时生效) | | scope | string | 否 | public(默认,全站已发布公开)| mine(自己的内容,可含草稿) | | statusType | number | 否 | 仅 mine1 草稿 2 已发布 3 审核中 4 审核失败 | | pageNum | number | 否 | 页码,默认 1 | | pageSize | number | 否 | 每页条数,默认 10,最大 50 |

详情访问规则:公开已发布可读;私密/草稿仅作者;付费内容非作者仅返回摘要(contentReadable=false)。

带图发布(推荐调用顺序)

场景 E:博客/论坛/专栏文档插入 OSS 图片

帮我发布一篇主题为「普通人如何使用 AI」的博客,文中增加合适的场景图片

  1. 准备图片(本地生成 / 远程 URL / base64)
  2. 对每张图调用 image_upload → 得到 OSS url
  3. 撰写 Markdown,在合适段落插入 ![场景说明](url)(不要用未转存的临时外链)
  4. blog_publish / forum_publish / columns_document_publish 保存草稿

专栏文档两场景(推荐调用顺序)

场景 A:专栏根下新建

帮我在切换列表专栏中增加一篇主题为「mcp 使用教程」的文档

  1. columns_query(scope=mine, title=切换列表) → 得到 sourceId
  2. columns_document_publish(sourceId, title=mcp 使用教程, content=…)(不传 parentId)

场景 B:指定父文档下新建

帮我在切换列表专栏的「新建Markdown」文档下创建一篇主题为「如何使用 skill」的文档

  1. columns_query(scope=mine, title=切换列表)sourceId
  2. columns_document_query(scope=mine, sourceId, title=新建Markdown)parentId
  3. columns_document_publish(sourceId, parentId, title=如何使用 skill, content=…)

修改场景(推荐调用顺序)

场景 C:修改博客 / 论坛

帮我把我那篇「mcp 使用教程」博客草稿改成更完整的版本

  1. blog_query(scope=mine, title=mcp 使用教程)(或 statusType=1)→ 得到 id
  2. 需要时再 blog_query(id) 读原文
  3. blog_update(id, title, content)

论坛同理,把工具换成 forum_query / forum_update

场景 F:为已有博客生成封面

帮我给这篇博客生成一张封面

  1. blog_query(id=…) → 拿到当前 titlecontent
  2. blog_update(id, title, content, generateCover=true) → 主站生成 16:9 封面并写回

场景 D:修改专栏文档

帮我更新切换列表专栏里「mcp 使用教程」这篇文档

  1. columns_query(scope=mine, title=切换列表)sourceId(可选,便于缩小检索)
  2. columns_document_query(scope=mine, sourceId, title=mcp 使用教程)id
  3. columns_document_update(id, title, content)

Cursor 接入

本地 dist(使用构建 bake 的 API 地址)

{
  "mcpServers": {
    "gonline": {
      "command": "node",
      "args": ["/path/to/gonline-mcp/dist/index.js"],
      "env": {
        "BIGAPP_API_KEY": "粘贴个人空间签发的密钥"
      }
    }
  }
}

覆盖 API 地址(可选)

{
  "mcpServers": {
    "gonline": {
      "command": "node",
      "args": ["/path/to/gonline-mcp/dist/index.js"],
      "env": {
        "BIGAPP_API_KEY": "粘贴个人空间签发的密钥",
        "BIGAPP_API_BASE": "http://localhost:3902"
      }
    }
  }
}

配置位置:.cursor/mcp.json 或全局 MCP 设置。本地需先 npm run build

发布流程(端到端)

  1. 个人中心 → 空间管理 → 签发个人空间 Agent API Key
  2. 将明文 Key 配到 Cursor BIGAPP_API_KEY
  3. Agent 调用 blog_publish / forum_publish / columns_document_publish
  4. 主站保存草稿;摘要/标签经 ai-gateway 生成;各渠道超日限 10 篇会拒绝
  5. 用户在 C 端确认:博客/论坛选组织后正式发布;专栏文档在专栏树中打开草稿并保存后升为展示态

本地联调需先启动 ai-gateway(默认 4502),再启动主站;主站 gonline.model-gateway.mode=remote

修改流程(端到端)

  1. Agent 用对应 *_queryscope=mine)定位 id
  2. 调用 blog_update / forum_update / columns_document_update 写入新标题与正文
  3. 主站更新内容并可选重新生成摘要/标签;不占日限额
  4. 草稿仍保持草稿;博客/论坛已发布内容改文对齐 C 端:有审核节点则重新进入审核(博客正文未变可保持展示)

查询流程(端到端)

  1. Agent 调用对应 *_query(如 keyword + scope=public)拿到列表与 id
  2. 需要阅读正文时再调用同一工具,传入 id
  3. 查自己的草稿/内容时使用 scope=mine,可配合 statusType=1 只看草稿