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

mcp-sap-assistant

v0.1.4

Published

MCP server providing read-only SAP ADT diagnostics for S/4HANA on-premise and ECC systems.

Readme

mcp-sap-assistant

一个跑在你本机的 MCP 服务器,把任意支持 MCP 的 AI 助手(Claude Desktop / Claude Code / WorkBuddy 等)接入真实的 SAP AS ABAP 系统,通过 ADT(ABAP Development Tools)提供只读的源码诊断、Dump 分析和系统日志查询能力。

Node.js

当前状态:🟢 v0.1.3 — 17 个工具,功能完整。


产品定位

  • 给谁用 — 使用支持 MCP 的 AI 助手(Claude、WorkBuddy、Cursor 等)作为辅助的 SAP ABAP 顾问、开发人员和运维工程师。
  • 做什么 — 让 AI 直接、安全、只读地访问客户的 SAP 系统,拉取真实的 ABAP 源码、短转储(ST22)、系统公告(SM02)、传输请求列表和对象元数据,从而给出有依据的诊断建议,而不是凭空猜测。
  • 为什么不直接把代码贴给 AI — 手动复制粘贴效率低,丢失交叉引用(where-used、调用链),做不了真正的 Dump 分析——AI 需要源码 + 调用栈 + 关联对象三者配合。

支持的 SAP 版本

| 版本 | 状态 | | ------------------- | ---------------------------------- | | S/4HANA OP(2021+) | ✅ 已支持 — 核心工具已验证 | | ECC 6.0(EHP7+) | ✅ 已支持 — 除 ATC 外核心工具可用 |

BTP ABAP Environment 不在当前支持范围内。


工具清单 — v0.1.3(17 个)

| # | 工具 | 类型 | 说明 | | -- | ---------------------------- | ------ | ------------------------------------------------------------- | | 1 | list_systems | 元信息 | 枚举所有已配置的 SAP 系统及其能力 | | 2 | set_active_systems | 会话 | 设置本次会话激活哪些系统(默认无激活,需显式启用) | | 3 | sap_system_info | 探活 | 连通性检查 + 内核/数据库/操作系统信息 | | 4 | search_repository_object | 搜索 | 按名称检索 ABAP 仓储对象(类/程序/接口/函数/表……) | | 5 | read_source_code | 读取 | 读取 ABAP 源码,支持 startLine/maxLines 分页 | | 6 | read_source_range | 读取 | 按行范围读取源码(使用内存缓存,无额外 SAP 请求) | | 7 | get_object_structure | 元信息 | 获取对象元数据——方法、属性、签名 | | 8 | where_used | 引用 | 查找对象的所有引用(唯一使用 POST 的工具,CSRF + cookie jar) | | 9 | list_dumps | 诊断 | 列出最近的 ABAP 运行时转储(ST22) | | 10 | read_dump_detail | 诊断 | 读取完整 Dump 详情——调用栈、源码摘录、各章节 | | 11 | read_system_messages | 诊断 | 读取 SM02 系统公告 | | 12 | read_table | 数据 | OpenSQL 查询表数据(JOIN/WHERE/GROUP BY/聚合,大表保护,硬限 500 行) | | 13 | read_table_structure | 数据 | 查看表结构:字段名/类型/长度/主键/描述 | | 14 | read_http_log | 诊断 | 读取 Gateway HTTP 错误日志(/IWFND/ERROR_LOG) | | 15 | list_transports | CTS | 列出 ABAP 传输请求 | | 16 | search_source | 搜索 | 按正则表达式搜索 ABAP 源码(客户端聚合工具) | | 17 | activate | 许可 | 输入激活码,解锁完整功能 |

所有工具均为只读where_used 是唯一的 POST 请求——使用 CSRF token + session cookie 机制。写操作(激活、创建、删除、传输释放)永久不做。详见 docs/PRD.md


快速开始

方式一:npm 安装(推荐)

新手用户请看图文安装手册:docs/install-guide.md

# 1. 安装
npm install -g mcp-sap-assistant

# 2. 验证
mcp-sap-assistant --version
mcp-sap-assistant --help

# 3. 查看配置路径,复制示例配置
mcp-sap-assistant doctor

# 4. 编辑 systems.yaml,填写你的 SAP 系统信息
#    模板参考安装目录下的 systems.example.yaml

# 5. 存储密码
mcp-sap-assistant login --system <系统ID>

# 6. 在支持 MCP 的 agent(Claude Desktop / Claude Code / WorkBuddy 等)中注册
#    参考 examples/claude-desktop-config.json

内测阶段如需线下安装,可改用 npm install -g ./mcp-sap-assistant-<版本号>.tgz


关于源码

本项目为闭源商业软件,源码不对外公开。你通过 npm install -g mcp-sap-assistant 安装的即为软件本体。

如需源码授权、定制开发或企业合作,请联系微信 YYSAI365


🔑 试用与激活

软件安装后自动开启 7 天免费试用,全部 13+ 工具均可使用,无需注册,无需激活码。

试用到期后,需要激活码才能继续使用全部功能。未激活状态下仅保留 list_systemsset_active_systemsactivate 三个基础工具。

获取激活码

加微信购买,备注 "mcp-sap 激活"

| 微信 | 说明 | | ------------ | ---------------------------------- | | YYSAI365 | 个人版 / 企业版 / 定制需求均可咨询 |

CLI 激活

# 查看本机机器码
mcp-sap-assistant get-machine-id

# 输入激活码
mcp-sap-assistant activate <激活码>

# 查看授权状态
mcp-sap-assistant doctor

📌 企业批量授权或自托管方案,请联系微信 YYSAI365,我们提供独立的激活码签发管理。


安全与合规

  • 客户的源码和业务数据绝不经过本服务器流出客户网络
  • 密码使用本地 AES-256-GCM 加密存储(~/.mcp-sap-assistant/credentials.json),不存明文,不入配置文件。
  • 默认无激活系统——用户必须通过 set_active_systems 显式启用。
  • 工具调用审计日志(本地 JSONL,脱敏后写入,按日轮转)。
  • 报错时透出 SAP 原始错误信息(如 ABAP OpenSQL 语法提示),而不是笼统的 HTTP 状态码,便于定位问题。
  • SAP 密码、token、cookie 绝不写入日志
  • TLS 证书校验由配置控制(不会硬编码 rejectUnauthorized: false)。

License

专有软件,保留所有权利。 未经书面许可,不得复制、分发、修改本软件。详见 LICENSE

需要商业授权,请通过仓库联系或私信获取。