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

amcjt-mcp-server

v0.0.6

Published

amcjt MCP server with stdio transport

Downloads

82

Readme

amcjt-mcp-server

一个基于 Model Context Protocol (MCP) 的服务器项目,使用 TypeScript 开发,通过标准输入输出(stdio) 进行通信。该项目提供了多个实用的工具功能,包括 Moonshot AI 余额查询、企业微信消息发送和彩票服务。

主要特性

  • 🤖 Moonshot AI 余额查询: 查询 Moonshot AI 账户余额信息
  • 📨 企业微信消息发送: 通过企业微信机器人发送消息
  • 🎱 彩票服务: 双色球开奖查询、OCR识别、中奖核对、开奖提醒、图片扫描核对
  • 📦 stdio 传输: 通过标准输入输出进行通信
  • 🔒 TypeScript: 使用 TypeScript 开发,提供更好的类型安全性

技术栈

  • TypeScript: 强类型 JavaScript,提供更好的开发体验和代码质量
  • MCP SDK: Model Context Protocol 官方 SDK,用于构建 MCP 服务器
  • Zod: 类型安全的模式验证库,用于参数验证
  • dotenv: 环境变量管理
  • Node.js: 运行时环境(要求 >= 18.0.0)

快速开始

安装

# 全局安装
npm install -g amcjt-mcp-server

# 或直接运行
npx amcjt-mcp-server

作为 Claude Desktop 的 MCP 服务器

在 Claude Desktop 配置中添加:

{
  "mcpServers": {
    "amcjt-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "amcjt-mcp-server"
      ]
    }
  }
}

配置环境变量

或直接

{
  "mcpServers": {
    "amcjt-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "amcjt-mcp-server"
      ],
      "env": {
        "MOONSHOT_API_KEY": "******",
        "WECHAT_WEBHOOK_KEY": "******"
      }
    }
  }
}

可用工具

1. query_moonshot_balance - Moonshot 余额查询

查询 Moonshot AI 账户余额信息

参数:

环境变量:

  • MOONSHOT_API_KEY: Moonshot AI API 密钥(必需)

2. send_wechat_work_message - 企业微信消息发送

通过企业微信机器人发送消息

参数:

  • message (string, 必需): 要发送的消息内容
  • message_type (string, 可选): 消息类型 - "text"(默认), "markdown"
  • webhook_key (string, 可选): 企业微信机器人 webhook key(默认使用环境变量)

环境变量:

  • WECHAT_WEBHOOK_KEY: 企业微信机器人 webhook key

3. 彩票服务工具组

3.1 get_lottery_result - 获取彩票开奖结果

获取双色球等彩票的开奖结果信息,包括中奖号码、奖池金额、中奖详情等

参数:

  • issueNo (string, 必需): 彩票期号,例如:2026020
  • lottoType (string, 可选): 彩票类型代码,101表示双色球(默认)

示例:

{
  "issueNo": "2026020",
  "lottoType": "101"
}

3.2 ocr_lottery_ticket - 彩票图片OCR识别

识别彩票图片中的号码信息,支持双色球等彩票类型。支持多种图片输入方式:本地文件路径、图片URL或Base64编码数据。使用 Moonshot API (Kimi k2.5) 进行图像识别

识别内容:

  • 期号(7位数字)
  • 开奖日期
  • 投注号码(红球和蓝球)
  • 倍数
  • 金额

参数:

  • image (string, 必需): 图片输入,支持三种格式:
    1. 本地文件路径(如:C:/Users/xxx/lottery.jpg
    2. 图片URL(以 http://https:// 开头)
    3. Base64编码(以 data:image 开头)
  • lottoType (string, 可选): 彩票类型代码,101表示双色球(默认)

环境变量:

  • MOONSHOT_API_KEY: Moonshot AI API 密钥(必需)

示例(本地文件路径 - 推荐):

{
  "image": "C:/Users/xxx/Desktop/lottery.jpg",
  "lottoType": "101"
}

示例(图片URL):

{
  "image": "https://example.com/lottery.jpg",
  "lottoType": "101"
}

示例(Base64编码):

{
  "image": "data:image/jpeg;base64,/9j/4AAQ...",
  "lottoType": "101"
}

返回示例:

📸 彩票识别结果

期号: 第2026020期
开奖时间: 2026年3月11日 21:15

红球: 05 06 10 18 25 28
蓝球: 09
倍数: 1倍
金额: 10元

识别状态: ✅ 成功

3.3 check_lottery_win - 彩票中奖核对

核对彩票号码与开奖结果,计算是否中奖及中奖金额。支持批量核验多注

参数:

  • issueNo (string, 必需): 彩票期号,例如:2026020
  • bets (array, 必需): 投注列表,支持单注或多注
    • redNumbers (string[]): 红球号码数组
    • blueNumbers (string[]): 蓝球号码数组
  • multiple (number, 可选): 投注倍数,默认为1
  • lottoType (string, 可选): 彩票类型代码,101表示双色球(默认)

示例(单注):

{
  "issueNo": "2026020",
  "bets": [
    {
      "redNumbers": ["01", "13", "14", "21", "24", "30"],
      "blueNumbers": ["02"]
    }
  ],
  "multiple": 1
}

示例(多注):

{
  "issueNo": "2026020",
  "bets": [
    {"redNumbers": ["05", "06", "10", "18", "25", "28"], "blueNumbers": ["09"]},
    {"redNumbers": ["01", "06", "07", "14", "24", "29"], "blueNumbers": ["06"]},
    {"redNumbers": ["12", "18", "19", "27", "28", "30"], "blueNumbers": ["16"]}
  ],
  "multiple": 1
}

3.4 scan_lottery_ticket - 扫描彩票图片核对中奖

一站式彩票扫描核对工具,传入彩票图片自动识别号码、查询开奖结果并核对中奖情况,返回完整的开奖信息和中奖结果

特性:

  • 自动识别开奖日期,未到开奖时间(21:15)会提示用户等待
  • 支持从图片中提取期号并推算开奖时间
  • 自动核对所有投注号码的中奖情况

参数:

  • image (string, 必需): 图片输入,支持三种格式:
    1. 本地文件路径(如:C:/Users/xxx/lottery.jpg
    2. 图片URL(以 http://https:// 开头)
    3. Base64编码(以 data:image 开头)
  • lottoType (string, 可选): 彩票类型代码,101表示双色球(默认)

环境变量:

  • MOONSHOT_API_KEY: Moonshot AI API 密钥(必需)

示例:

{
  "image": "C:/Users/xxx/Desktop/lottery.jpg",
  "lottoType": "101"
}

返回内容:

  • 彩票基本信息(期号、开奖时间、倍数、金额、注数)
  • 开奖结果(号码、开奖时间、奖池金额)
  • 每注号码的中奖核对结果
  • 中奖汇总(中奖注数、总奖金)
  • 本期销售数据及各奖项中奖情况

未到开奖时间提示示例:

⏰ 还未到开奖时间

您购买的第2026020期双色球彩票
开奖时间:2026年3月11日 21:15

请耐心等待,开奖后(2026年3月11日 21:15之后)再来查询核对吧!

📝 已识别号码:
第1注: 红球 05 06 10 18 25 28 蓝球 09

3.5 get_lottery_countdown - 获取开奖倒计时

获取距离下次双色球开奖的倒计时信息

参数:

3.6 get_lottery_calendar - 获取开奖日历

获取未来7天的双色球开奖日历

参数:

环境变量配置

在使用需要API密钥的功能前,请设置以下环境变量:

# Moonshot AI API 密钥
export MOONSHOT_API_KEY="your-moonshot-api-key"

# 企业微信机器人 webhook key
export WECHAT_WEBHOOK_KEY="your-wechat-webhook-key"

或在项目根目录创建 .env 文件:

MOONSHOT_API_KEY=your-moonshot-api-key
WECHAT_WEBHOOK_KEY=your-wechat-webhook-key

开发指南

安装依赖

npm install

开发模式

npm run dev

构建项目

npm run build

运行构建后的服务器

npm start

测试 MCP 服务器

npm run inspector
# 或
npx @modelcontextprotocol/inspector npm run dev

发布到 NPM

准备工作

  1. 确保已登录 npm 账户:

    npm login
  2. 或者配置 .npmrc 文件进行无登录发布(配置环境变量方式)

发布步骤

# 构建项目
npm run build

# 发布到 NPM
npm publish

项目结构

src/
├── index.ts              # 主入口文件,创建和启动 MCP 服务器
└── tools/                # 工具模块目录
    ├── index.ts          # 工具导出模块
    ├── moonshot-balance.ts # Moonshot AI 余额查询工具
    ├── wechat-work.ts    # 企业微信消息发送工具
    └── lottery/          # 彩票服务模块
        ├── index.ts      # 彩票工具注册
        ├── api.ts        # 开奖数据获取API
        ├── ocr.ts        # 彩票图片OCR识别
        ├── checker.ts    # 中奖核对计算
        ├── reminder.ts   # 开奖提醒功能
        └── types.ts      # 类型定义

注意事项

  1. 安全性: 环境变量中可能包含敏感信息(API 密钥等),请妥善保管
  2. 网络依赖: Moonshot、企业微信和彩票工具需要网络连接
  3. 错误处理: 所有工具都有完善的错误处理,但实际使用中仍需注意异常情况
  4. 国际化: 目前主要支持中文界面和错误信息
  5. 彩票数据: 彩票开奖数据来源于第三方API,可能存在延迟或不准确的情况
  6. OCR图片输入: 推荐使用本地文件路径方式,避免命令行长度限制问题
  7. 开奖时间: 双色球每周二、四、日 21:15 开奖,scan_lottery_ticket 会在开奖前提示用户等待

更新日志

v0.0.6

  • 新增开奖日期识别和提取功能
  • scan_lottery_ticket 新增开奖时间判断,未到开奖时间自动提示
  • ocr_lottery_ticket 返回开奖日期信息
  • 新增根据期号推算双色球开奖日期的功能

v0.0.5

  • 移除计算器工具
  • 新增一站式彩票扫描核对功能 (scan_lottery_ticket)

v0.0.4

  • 支持多种图片输入格式的彩票OCR识别(本地文件、URL、Base64)

许可证

MIT

作者

jint

关键词

mcp, server, stdio, tools, moonshot, wechat, lottery, typescript