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

@imbear/summarycard

v1.1.1

Published

这是一个基于 Model Context Protocol (MCP) 的工具服务,专为大语言模型 (LLM) 设计。它能够将结构化的文本数据转化为精美的可视化总结卡片,并以图片形式返回。

Downloads

22

Readme

总结卡片生成器 MCP (Summary Card MCP)

npm version

这是一个基于 Model Context Protocol (MCP) 的工具服务,专为大语言模型 (LLM) 设计。它能够将结构化的文本数据转化为精美的可视化总结卡片,并以图片形式返回。

✨ 核心功能

  • 智能排版: 基于 HTML/CSS 的精美卡片模板,自动适配内容。
  • 多模态输出:
    • 🖼️ Base64: 直接返回图片数据,适合直接在聊天窗口展示。
    • ☁️ S3 存储: 自动上传至 AWS S3 (或兼容存储),返回访问链接。
    • 📂 本地文件: 支持保存到本地指定目录。
  • 灵活部署:
    • 📦 NPM/NPX: 支持本地快速启动。
    • 🐳 Docker: 支持服务器端 SSE (Server-Sent Events) 部署。

🚀 快速开始

1. 本地运行 (npx)

无需安装,直接使用 npx 启动服务 (需确保本地已安装 Node.js 和 Chrome/Chromium):

npx @imbear/summarycard

2. 配置说明

可以通过环境变量配置服务行为:

| 变量名 | 描述 | 必填 | 默认值 | | :--- | :--- | :--- | :--- | | AWS_ACCESS_KEY_ID | S3 访问密钥 ID | 否 | - | | AWS_SECRET_ACCESS_KEY | S3 访问密钥 Secret | 否 | - | | AWS_REGION | S3 区域 | 否 | us-east-1 | | S3_BUCKET_NAME | S3 存储桶名称 | 否 | - | | S3_ENDPOINT | 自定义 S3 端点 (如 MinIO/OSS) | 否 | - | | OUTPUT_DIR | 本地图片保存路径 | 否 | (临时目录) | | TRANSPORT_MODE | 传输模式 (stdiosse) | 否 | stdio | | PORT | SSE 服务端口 (仅 sse 模式有效) | 否 | 3000 |

3. 在 MCP 客户端中使用

在你的 MCP 配置文件 (如 Claude Desktop Config) 中添加:

{
  "mcpServers": {
    "summary-card": {
      "command": "npx",
      "args": ["-y", "@imbear/summarycard"],
      "env": {
        "S3_BUCKET_NAME": "my-cards",
        "AWS_ACCESS_KEY_ID": "..."
      }
    }
  }
}

3. 在 MCP 客户端中使用 (如 Cherry Studio)

在你的 MCP 客户端配置文件中添加以下内容 (请根据实际路径调整):

{
  "mcpServers": {
    "summary-card": {
      "command": "node",
      "args": ["your-summarycard-path/dist/src/index.js"],
      "env": {
        "PUPPETEER_EXECUTABLE_PATH": "C:\\Users\\Administrator\\.cache\\puppeteer\\chrome-headless-shell\\win64-143.0.7499.40\\chrome-headless-shell-win64\\chrome-headless-shell.exe"
      }
    }
  }
}

🛠️ 工具定义 (Tool Definition)

本服务提供一个核心工具:generate_card

输入参数 (Schema):

{
  "title": "卡片标题",
### 4. Docker 部署 (推荐用于 SSE)
   
1. 在项目根目录创建 `.env` 文件并填入 AWS 凭证 (参考 `.env.example` 或直接在 `docker-compose.yml` 中配置)。
2. 运行:

```bash
docker-compose up -d --build

此时服务将在 http://localhost:3000/sse 提供 SSE 接口。

手动构建

# 构建镜像
docker build -t xjbear/summarycard .

# 运行容器 (SSE 模式)
docker run -d -p 3000:3000 \
  -e TRANSPORT_MODE=sse \
  -e S3_BUCKET_NAME=my-bucket \
  xjbear/summarycard

📦 开发指南

  1. 安装依赖:

    npm install
  2. 本地调试:

    npm run dev
  3. 构建:

    npm run build

📄 许可证

MIT