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

@iaps/magic-mcp

v0.1.38

Published

Iaps MCP standalone service

Readme

Iaps Magic MCP

Iaps Magic MCP 是一个独立的 MCP(Model Context Protocol)服务,旨在连接 排产数据 与 AI 模型。它使 AI 模型能够直接从 集团工作台 获取排产相关的 数据。

主要特性

  • 从集团工作台获取排产相关数据
  • 可直接通过 npx 运行
  • 仅需 Node.js 环境,无需其他外部依赖

使用方法

命令行选项

npx @iaps/magic-mcp --workbench-app-key=YOUR_kEY --workbench-app-secret=YOUR_SECRET --workbench-url=API_URL [--rule=RULE_NAME] [--no-rule] [--debug]

参数:

  • --workbench-app-key=YOUR_kEY (必需): 集团工作台appKey
  • --workbench-app-secret=YOUR_SECRET (必需): 集团工作台appSecret
  • --workbench-url=API_URL (必需): 集团工作台OpenApi域名(基础URL)
  • --rule=RULE_NAME (可选): 添加要应用的设计规则,可多次使用
  • --debug (可选): 启用调试模式,提供详细错误信息
  • --no-rule (可选): 禁用默认规则

你也可以使用空格分隔的参数格式:

npx @iaps/magic-mcp --workbench-app-key YOUR_kEY --workbench-app-secret YOUR_SECRET --workbench-url API_URL --rule RULE_NAME --debug

环境变量

您也可以使用环境变量代替命令行参数:

  • WORKBENCH_APP_KEY: 集团工作台appKey
  • WORKBENCH_APP_SECRET: 集团工作台appSecret
  • WORKBENCH_URL: 集团工作台OpenApi域名(基础URL)
  • RULES: 规则的 JSON 数组 (例如: '["rule1", "rule2"]')

LINGMA 使用方法

您可以使用命令行参数或环境变量来配置 MCP 服务:

方式一:使用命令行参数

{
  "mcpServers": {
    "iaps-magic-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@iaps/magic-mcp",
        "--workbench-app-key=<YOUR_kEY>",
        "--workbench-app-secret=<YOUR_SECRET>",
        "--workbench-url=<API_URL>"
      ],
      "env": {}
    }
  }
}

方式二:使用环境变量

{
  "mcpServers": {
    "iaps-magic-mcp": {
      "command": "npx",
      "args": ["-y", "@iaps/magic-mcp"],
      "env": {
        "WORKBENCH_APP_KEY": "<YOUR_kEY>",
        "WORKBENCH_APP_SECRET": "<YOUR_SECRET>"
        "WORKBENCH_URL": "<API_URL>"
      }
    }
  }
}

cline 使用方法

方式一:使用命令行参数

{
  "mcpServers": {
    "@iaps/magic-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@iaps/magic-mcp",
        "--workbench-app-key=<YOUR_kEY>",
        "--workbench-app-secret=<YOUR_SECRET>",
        "--workbench-url=<API_URL>"
      ],
      "env": {}
    }
  }
}

方式二:使用环境变量

{
  "mcpServers": {
    "@iaps/magic-mcp": {
      "command": "npx",
      "args": ["-y", "@iaps/magic-mcp"],
      "env": {
        "WORKBENCH_APP_KEY": "<YOUR_kEY>",
        "WORKBENCH_APP_SECRET": "<YOUR_SECRET>"
        "WORKBENCH_URL": "<API_URL>"
      }
    }
  }
}

项目结构

src 目录

src 目录包含 Iaps Magic MCP 服务的核心实现:

  • index.ts:应用程序入口点,初始化 MCP 服务器并注册所有工具
  • http-util.ts:处理与 集团工作台OpenApi 通信的 HTTP 请求工具

src/types

项目的 TypeScript 类型定义

src/tools

包含 MCP 工具的实现:

  • base-tool.ts:所有 MCP 工具的基类

本地开发

  1. 运行 yarnyarn build,安装依赖并构建代码(或者使用npm命令)
  2. 查看 dist/index.js 的绝对路径
  3. 在 MCP 配置中添加本地 MCP 配置
"iaps-mcp-local": {
  "command": "node",
  "args": [
    "dist/index.js绝对路径地址",
    "--workbench-app-key=<YOUR_kEY>",
    "--workbench-app-secret=<YOUR_SECRET>",
    "--workbench-url=<API_URL>",
    "--debug"
  ],
  "env": {}
}
  1. 重启编辑器,确认本地 MCP 已开启

运行成功后,就可以基于本地运行的结果进行调试。您可以基于自己的修改构建自己的 MCP 服务。

特别说明

  • 执行npm run inspector,打开MCP Inspector,进行本地测试。
  • 如果出现报错,不能自动打开浏览器,可以先执行如下代码,关闭自动打开浏览器的功能 set MCP_AUTO_OPEN_ENABLED=false