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

@ktbtw/verify-mcp

v0.2.6

Published

MCP server for Verify ApiToken public APIs

Readme

verify_mcp

基于 TypeScript 的 MCP 服务,用于把现有 ApiToken 公共接口封装成可供智能体直接调用的 MCP tools。

已发布 npm 包名:

@ktbtw/verify-mcp

目标

  • 运行形态:stdio
  • 后端来源:现有 /api/app-token/* 公共接口与旧加固提交接口。
  • 鉴权方式:VERIFY_API_TOKEN 用于配置/编译工具,VERIFY_PROTECT_TOKEN 用于 VMP、混淆、Dex2C、SO、注入等加固工具;两者可以只配置一个,调用未配置 token 的工具时会返回明确错误。
  • 当前已接入:
    • 上下文查询
    • 应用列表查询
    • 应用 apiKey / secretKey 查询
    • 验证接口签名规则与调用示例查询
    • 配置列表/详情/创建/更新/删除
    • dex/zip 文件读取与更新
    • 云端代码读取与推送
    • 编译配置修改
    • 云端代码编译
    • 编译任务列表/详情/下载/删除
    • 编译配额查询
    • VMP / 混淆 / Dex2C / SO / 注入加固任务提交、列表、详情、下载、删除
    • 高阶流程工具:推送并编译、等待编译结果、获取完整配置快照

最近更新

0.2.6

  • 新增 list_apps,ACCOUNT 级 ApiToken 可列出账号下全部应用,不再依赖配置列表反推应用。
  • get_app_credentialsget_verification_examples 支持 ACCOUNT 级 ApiToken 不传 appId 时返回全部应用。

0.2.5

  • 新增 get_app_credentials,通过 ApiToken 权限读取应用 apiKey / secretKey
  • 新增 get_verification_examples,返回验证接口签名规则和 curl / JavaScript / Python 调用示例。
  • APP 级 Token 可直接读取绑定应用;ACCOUNT 级 Token 需传 appId;CONFIG 级 Token 不允许读取应用密钥。

0.2.4

  • create_config 支持账号级 ApiToken 传入 appId,用于在“全部应用”Token 下指定新配置归属应用。
  • get_context 说明补充账号级 ApiToken 上下文。

0.2.2

  • 默认 MCP 服务名改为 verify,与前端复制出的配置保持一致。
  • 更新 README 与 .env.example 中的客户端配置示例,移除 verify-api-token 旧命名。

0.2.1

  • 新增 VERIFY_PROTECT_TOKEN,加固工具复用旧加固提交接口,不使用独立 /api/protect-token/* 接口。
  • MCP 允许只配置 VERIFY_API_TOKENVERIFY_PROTECT_TOKEN 其中一个;调用未配置 token 的工具时返回明确错误。
  • server_info 区分返回 apiTokenMaskedprotectTokenMasked

0.2.0

  • 新增 list_runtime_api_classes
  • 新增 get_runtime_api_doc
  • 运行时文档按真实源码区分 xposedinject
  • 可准确识别 HookHelper.getModuleContext() 只属于 Xposed,不再把它误判为 InjectHelper 可用方法
  • smoke 测试已覆盖新增工具,并验证 injectincludeInternal=false 时不会返回 getModuleContext
  • 新增迁移知识层、生命周期、资源与编译语义说明工具
  • 新增 validate_cloud_runtimesimulate_resource_layoutvalidate_cloud_code_layout
  • push_cloud_code / publish_cloud_code 改为强校验模式,缺少 fileTreecurrentFilePath 会直接拒绝

升级后,如果你希望 MCP 客户端立即使用这版,建议显式指定:

{
  "mcpServers": {
    "verify": {
      "command": "npx",
      "args": ["-y", "@ktbtw/[email protected]"],
      "env": {
        "VERIFY_BASE_URL": "https://www.xyapi.top/verfiy",
        "VERIFY_API_TOKEN": "vat_xxx_replace_me",
        "VERIFY_PROTECT_TOKEN": "vpt_xxx_replace_me",
        "VERIFY_TIMEOUT_MS": "30000"
      }
    }
  }
}

安装

直接给 MCP 客户端使用时,优先走 npx,不需要单独安装:

{
  "mcpServers": {
    "verify": {
      "command": "npx",
      "args": ["-y", "@ktbtw/verify-mcp"],
      "env": {
        "VERIFY_BASE_URL": "https://www.xyapi.top/verfiy",
        "VERIFY_API_TOKEN": "vat_xxx_replace_me",
        "VERIFY_TIMEOUT_MS": "30000"
      }
    }
  }
}

如果你要本地开发,再使用下面的方式:

cd /Users/yuminghao/Downloads/verfiy/verify_mcp
cp .env.example .env
pnpm install

然后修改 .env

VERIFY_BASE_URL=https://www.xyapi.top/verfiy
VERIFY_API_TOKEN=你的_api_token
VERIFY_TIMEOUT_MS=30000

运行

开发模式:

pnpm dev

构建:

pnpm build

生产运行:

pnpm start

回归测试

先构建,再执行 smoke test:

pnpm build
pnpm -s smoke

smoke 会通过 MCP stdio 客户端实际连接当前服务,并验证:

  • list_runtime_api_classes
  • get_runtime_api_doc
  • tools 列表
  • get_context
  • list_apps
  • list_configs
  • get_quota
  • publish_cloud_code
  • wait_compile_result
  • get_full_config_snapshot

Inspector 调试

pnpm build
pnpm inspect

工具列表

  • list_runtime_api_classes
  • get_runtime_api_doc
  • get_runtime_migration_guide
  • get_runtime_lifecycle_guide
  • get_resource_and_native_rules
  • get_compile_semantics
  • get_card_verification_guide
  • validate_cloud_runtime
  • simulate_resource_layout
  • validate_cloud_code_layout
  • server_info
  • submit_vmp_protect_task
  • submit_obfuscate_protect_task
  • submit_dex2c_protect_task
  • submit_so_protect_task
  • submit_inject_protect_task
  • list_protect_tasks
  • get_protect_task
  • download_protect_task
  • delete_protect_task
  • get_context
  • list_configs
  • get_app_credentials
  • get_verification_examples
  • get_config
  • create_config
  • update_config
  • delete_config
  • get_config_files
  • update_config_files
  • get_cloud_code
  • push_cloud_code
    • 严格要求同时传 filesfileTreecurrentFilePath
    • 不会自动补树;布局不对会直接拒绝
  • update_compile_settings
  • compile_config
  • list_compile_tasks
  • get_compile_task
  • download_compile_task
  • delete_compile_task
  • get_quota
  • get_compile_quota
  • wait_compile_result
  • publish_cloud_code
    • 严格要求同时传 filesfileTreecurrentFilePath
    • 会先校验编辑器兼容布局,再推送与编译
  • get_full_config_snapshot

运行时文档工具

为了让智能体准确区分 Xposed HookHelper 和 DEX InjectHelper 的真实能力,MCP 里额外提供了两类本地文档工具:

  • list_runtime_api_classes
    • 列出 xposed / inject 各自有哪些运行时工具类
    • 返回每个类的常用方法名和框架内部公开方法名摘要
  • get_runtime_api_doc
    • 支持按 runtimeclassNamemethodName 精确查询
    • 例如可查 HookHelper.getModuleContext
    • 也可查 InjectHelper 全类说明,确认它并不提供 getModuleContext

除此之外,又补了一组“迁移知识层 / 运行时语义层”工具:

  • get_runtime_migration_guide
    • 说明入口类/入口方法写法
    • 说明当前云端代码支持 files[] 多文件上传
    • 说明 Xposed / Inject 在 Helper 能力上的差异
  • get_runtime_lifecycle_guide
    • 说明初始化时机
    • 说明 main() 不等于资源已就绪
    • 说明 ActivityTask / ResourceTask 的晚提交兜底语义
  • get_resource_and_native_rules
    • 说明 resHook.zip 固定命名、解压目录、缓存行为
    • 说明 findFileInUnzipDir* 的真实搜索语义
    • 说明 native 建议如何结合 ResourceTaskManager
  • get_compile_semantics
    • 说明 hasDexFile
    • 说明 cloudCode.exists
    • 说明编译任务 SUCCESS
    • 说明 downloaded
  • get_card_verification_guide
    • 说明 requireCardVerification / exitOnVerificationFailure
    • 说明平台卡密门禁与业务自带卡密逻辑如何共存
  • validate_cloud_runtime
    • 在编译前静态检查入口方法、运行时 API 混用、资源/native 风险
  • simulate_resource_layout
    • 根据 resHook.zip 内部条目模拟 findFileInUnzipDir* 会命中什么
  • validate_cloud_code_layout
    • 校验 files / fileTree / currentFilePath 是否满足编辑器恢复要求
    • 只做检查,不会自动补任何字段

推荐调用顺序:

  1. 不确定某个运行时有哪些工具类时,先调用 list_runtime_api_classes
  2. 确认目标类存在后,再调用 get_runtime_api_doc
  3. 需要确认“用户代码能不能直接调”时,get_runtime_api_doc 建议加 includeInternal=false
  4. 真正开始迁移项目时,再调用 get_runtime_migration_guide / get_runtime_lifecycle_guide
  5. 涉及图片、配置、.so 时,再调用 get_resource_and_native_rules
  6. 提交编译前,先调用 validate_cloud_runtime
  7. 推送云端代码前,先调用 validate_cloud_code_layout

典型调用示例:

  1. 列出 DEX Inject 运行时有哪些工具类
{
  "name": "list_runtime_api_classes",
  "arguments": {
    "runtime": "inject"
  }
}
  1. 同时查看 xposedinject 两边的工具类摘要
{
  "name": "list_runtime_api_classes",
  "arguments": {}
}
  1. 查询 Xposed 下 HookHelper.getModuleContext() 是否存在
{
  "name": "get_runtime_api_doc",
  "arguments": {
    "runtime": "xposed",
    "className": "HookHelper",
    "methodName": "getModuleContext"
  }
}
  1. 查询 DEX 下 InjectHelper 的可直接调用方法,并排除框架内部回填方法
{
  "name": "get_runtime_api_doc",
  "arguments": {
    "runtime": "inject",
    "className": "InjectHelper",
    "includeInternal": false
  }
}
  1. 查询 ActivityTaskManager 的整类说明,确认 submitTask(...) 等能力
{
  "name": "get_runtime_api_doc",
  "arguments": {
    "runtime": "inject",
    "className": "ActivityTaskManager"
  }
}
  1. 使用完整包名查询也可以
{
  "name": "get_runtime_api_doc",
  "arguments": {
    "runtime": "inject",
    "className": "com.xy.verfiy_inject.Util.InjectHelper",
    "methodName": "getHostContext"
  }
}
  1. 读取 DEX Inject 的迁移指南
{
  "name": "get_runtime_migration_guide",
  "arguments": {
    "runtime": "inject"
  }
}
  1. 读取 Xposed 的生命周期说明
{
  "name": "get_runtime_lifecycle_guide",
  "arguments": {
    "runtime": "xposed"
  }
}
  1. 编译前静态校验云端入口和资源风险
{
  "name": "validate_cloud_runtime",
  "arguments": {
    "runtime": "inject",
    "dexClassName": "com.example.cloud.Entry",
    "dexMethodName": "main",
    "files": [
      {
        "path": "src/com/example/cloud/Entry.java",
        "content": "package com.example.cloud;\\npublic final class Entry {\\n  public static void main() {}\\n}"
      },
      {
        "path": "src/com/example/cloud/Helper.java",
        "content": "package com.example.cloud;\\npublic final class Helper {}"
      }
    ],
    "resourceEntries": [
      "lib/arm64-v8a/libdemo.so",
      "images/logo.png"
    ],
    "requireCardVerification": false
  }
}
  1. 模拟 resHook.zip 解压后查找 libdemo.so
{
  "name": "simulate_resource_layout",
  "arguments": {
    "entries": [
      "lib/arm64-v8a/libdemo.so",
      "images/logo.png",
      "config/app.json"
    ],
    "exactFileNames": ["libdemo.so"],
    "containsFileNames": ["logo"]
  }
}
  1. 推送前先校验编辑器布局是否完整
{
  "name": "validate_cloud_code_layout",
  "arguments": {
    "files": [
      {
        "path": "src/com/example/cloud/Entry.java",
        "content": "package com.example.cloud;\\npublic final class Entry {\\n  public static void main() {}\\n}"
      },
      {
        "path": "src/com/example/cloud/Helper.java",
        "content": "package com.example.cloud;\\npublic final class Helper {}"
      }
    ],
    "fileTree": {
      "name": "root",
      "type": "folder",
      "path": "",
      "children": [
        {
          "name": "src",
          "type": "folder",
          "path": "src",
          "children": [
            {
              "name": "com",
              "type": "folder",
              "path": "src/com",
              "children": [
                {
                  "name": "example",
                  "type": "folder",
                  "path": "src/com/example",
                  "children": [
                    {
                      "name": "cloud",
                      "type": "folder",
                      "path": "src/com/example/cloud",
                      "children": [
                        {
                          "name": "Entry.java",
                          "type": "file",
                          "path": "src/com/example/cloud/Entry.java"
                        },
                        {
                          "name": "Helper.java",
                          "type": "file",
                          "path": "src/com/example/cloud/Helper.java"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    "currentFilePath": "src/com/example/cloud/Entry.java"
  }
}
  1. 通过校验后再推送/发布;如果 fileTree 缺失、currentFilePath 不命中真实文件,工具会直接拒绝
{
  "name": "publish_cloud_code",
  "arguments": {
    "configId": 39,
    "cacheKey": "verify_mcp_example",
    "files": [
      {
        "path": "src/com/example/cloud/Entry.java",
        "content": "package com.example.cloud;\\npublic final class Entry {\\n  public static void main() {}\\n}"
      }
    ],
    "fileTree": {
      "name": "root",
      "type": "folder",
      "path": "",
      "children": [
        {
          "name": "src",
          "type": "folder",
          "path": "src",
          "children": [
            {
              "name": "com",
              "type": "folder",
              "path": "src/com",
              "children": [
                {
                  "name": "example",
                  "type": "folder",
                  "path": "src/com/example",
                  "children": [
                    {
                      "name": "cloud",
                      "type": "folder",
                      "path": "src/com/example/cloud",
                      "children": [
                        {
                          "name": "Entry.java",
                          "type": "file",
                          "path": "src/com/example/cloud/Entry.java"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    "currentFilePath": "src/com/example/cloud/Entry.java",
    "compileSettings": {
      "dexClassName": "com.example.cloud.Entry",
      "dexMethodName": "main",
      "dexMethodParamTypes": []
    },
    "waitForResult": false
  }
}

AI 调用建议:

  • 写 DEX 代码前,优先查 inject
  • 写 Xposed 代码前,优先查 xposed
  • 如果 AI 不确定 InjectHelper.getModuleContext() 这类方法是否真实存在,应先调用 get_runtime_api_doc,不要只凭补全文案猜测
  • 开始迁移旧项目前,优先查 get_runtime_migration_guide
  • 涉及 main() 时序、Activity 可见阶段、native 资源回调时,优先查 get_runtime_lifecycle_guideget_resource_and_native_rules
  • 编译前先跑 validate_cloud_runtime,比等到运行时再猜问题更稳
  • 推送前先跑 validate_cloud_code_layout,确保“能编译”和“能完整拉回编辑器树”同时成立
  • 不要只传 filespush_cloud_code / publish_cloud_code 现在会把缺失的 fileTree、错误的 currentFilePath 直接判错

MCP 客户端配置示例

以本地 npx 方式为例,客户端配置通常类似:

{
  "mcpServers": {
    "verify": {
      "command": "npx",
      "args": [
        "-y",
        "@ktbtw/verify-mcp"
      ],
      "env": {
        "VERIFY_BASE_URL": "https://www.xyapi.top/verfiy",
        "VERIFY_API_TOKEN": "vat_xxx_replace_me",
        "VERIFY_TIMEOUT_MS": "30000"
      }
    }
  }
}

如果你已经把仓库拉到本地,也可以直接指向构建产物:

{
  "mcpServers": {
    "verify": {
      "command": "node",
      "args": [
        "/Users/yuminghao/Downloads/verfiy/verify_mcp/dist/index.js"
      ],
      "env": {
        "VERIFY_BASE_URL": "https://www.xyapi.top/verfiy",
        "VERIFY_API_TOKEN": "vat_xxx_replace_me",
        "VERIFY_TIMEOUT_MS": "30000"
      }
    }
  }
}