New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

joybuzz

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joybuzz

MCP Server with cat images, jokes and quotes APIs

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
11
-47.62%
Maintainers
1
Weekly downloads
 
Created
Source

JoyBuzz MCP Server

JoyBuzz是一个Model Context Protocol (MCP) 服务器,提供三个有趣的API:

  • 猫猫图片API - 获取随机猫猫图片
  • 随机笑话API - 获取随机笑话
  • 名人名言API - 获取随机名人名言

项目结构

joybuzz/
├── dist/               # 编译后的JavaScript文件
├── src/                # 源代码
│   ├── index.ts        # 主入口文件
│   └── services/       # API服务实现
│       ├── catImageApi.ts
│       ├── jokeApi.ts
│       └── quoteApi.ts
├── package.json        # 项目配置
└── tsconfig.json       # TypeScript配置

依赖项

  • Node.js (>= 16)
  • TypeScript
  • @modelcontextprotocol/sdk
  • node-fetch
  • zod

安装与使用

安装依赖

npm install

构建项目

npm run build

启动服务器

# 使用标准输入/输出流方式(适用于本地与Claude Desktop、Cursor等集成)
npm start

# 使用HTTP服务器方式(适用于云服务部署)
npm run start:http

环境变量配置

当使用HTTP服务器模式时,可以通过以下环境变量配置服务器:

  • PORT: 服务器监听端口(默认为3000)
  • USE_HTTP: 设置为"true"启用HTTP服务器模式

示例:

PORT=8080 USE_HTTP=true npm start

工具说明

1. 猫猫图片API (get-cat-image)

获取随机猫猫图片URL。

参数:

  • tag: (可选) 猫猫图片标签,例如:cute, funny等

2. 随机笑话API (get-joke)

获取随机笑话。

参数:

  • category: (可选) 笑话类别,可选值:any, programming, misc, dark, pun, spooky, christmas

3. 名人名言API (get-quote)

获取随机名人名言。

参数:

  • category: (可选) 名言类别,例如:inspirational, happiness等

与Claude Desktop配合使用

  • 打开Claude Desktop配置文件:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • 添加JoyBuzz服务器配置:

{
  "mcpServers": {
    "joybuzz": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/JOYBUZZ/dist/index.js"]
    }
  }
}
  • 重启Claude Desktop即可使用JoyBuzz提供的工具。

与Cursor配合使用

  • 在Cursor中,打开设置 -> MCP
  • 添加新的MCP服务器,命令为:
    node /ABSOLUTE/PATH/TO/JOYBUZZ/dist/index.js
    
  • 保存配置后即可在Cursor中使用JoyBuzz提供的工具。

云服务部署

如果要部署到云服务(如阿里云百炼平台),请使用HTTP模式:

  • 通过npm发布包:

    npm publish
    
  • 在云服务配置中,选择npx方式部署,并指定:

    • 包名:joybuzz
    • 参数:--http(以启用HTTP服务器模式)

许可证

MIT

Keywords

mcp

FAQs

Package last updated on 24 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts