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

@xrxs-plugin/plugin-mcp

v0.1.6

Published

XRXS Plugin MCP npm bridge

Readme

plugin-mcp

@xrxs-plugin/plugin-mcp 是一个可通过 npx 直接启动的本地 MCP bridge。

它负责:

  1. 通过标准输入输出向 TraeCodexClaude Code 等支持 stdio MCP 的开发工具暴露本地 MCP Server
  2. 将工具调用桥接到远程 HTTP plugin-mcp 服务
  3. 自动追加 X-Plugin-Dev-KeyX-Request-Id

目录

plugin-mcp/
  package.json
  README.md
  src/
    index.js

环境要求

  1. Node.js 18+
  2. 远程 plugin-mcp 服务可访问

环境变量

  • MCP_BASE_URL
  • MCP_DEV_KEY
  • MCP_TIMEOUT_SECONDS

支持的工具

  1. plugin_mcp_health
    • 调用 GET /health
  2. plugin_mcp_initialize
    • 调用 POST /initialize
  3. plugin_mcp_feasibility_pointcuts_search
    • 调用 POST /feasibility/pointcuts/search
  4. plugin_mcp_feasibility_apis_search
    • 调用 POST /feasibility/apis/search
  5. plugin_mcp_feasibility_analyze
    • 调用 POST /feasibility/analyze
  6. plugin_mcp_support_ticket_create
    • 调用 POST /support-ticket/create
  7. plugin_mcp_support_ticket_query
    • 调用 POST /support-ticket/query
  8. plugin_mcp_support_ticket_update
    • 调用 POST /support-ticket/update
  9. plugin_mcp_support_ticket_close
    • 调用 POST /support-ticket/close
  10. plugin_mcp_support_ticket_recovery_check
  • 调用 POST /support-ticket/recovery-check
  1. plugin_mcp_workflow_state_get
  • 调用 POST /workflow/state/get
  1. plugin_mcp_workflow_state_update
  • 调用 POST /workflow/state/update
  1. plugin_mcp_workflow_block
  • 调用 POST /workflow/block
  1. plugin_mcp_workflow_resume
  • 调用 POST /workflow/resume
  1. plugin_mcp_workflow_history_query
  • 调用 POST /workflow/history/query
  1. plugin_mcp_build_source_upload
  • 调用 POST /build/source/upload
  1. plugin_mcp_build_static_analysis
  • 调用 POST /build/static-analysis
  1. plugin_mcp_build_compile
  • 调用 POST /build/compile
  1. plugin_mcp_build_security_scan
  • 调用 POST /build/security-scan
  1. plugin_mcp_build_package
  • 调用 POST /build/package
  1. plugin_mcp_release_projects_create
  • 调用 POST /release/projects/create
  1. plugin_mcp_release_test_deploy
  • 调用 POST /release/test/deploy
  1. plugin_mcp_release_status_get
  • 调用 POST /release/status/get
  1. plugin_mcp_release_log_query
  • 调用 POST /release/log/query

Trae 配置示例

{
  "mcpServers": {
    "xrxs-plugin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@xrxs-plugin/plugin-mcp@latest"
      ],
      "env": {
        "MCP_BASE_URL": "http://s124.devtest.vip:19087/jeecg-boot/api/v1/mcp",
        "MCP_DEV_KEY": "xrxs-plugin-mcp-dev",
        "MCP_TIMEOUT_SECONDS": "30"
      }
    }
  }
}

本地调试

安装依赖:

npm install

检查语法:

npm run check

本地启动:

npm start

发布步骤

  1. 登录 npm
npm login
  1. 检查当前账号
npm whoami
  1. 首次发布公开包
npm publish --access public
  1. 后续升级版本
npm version patch
npm publish

build 上传执行调用示例

上传源码包:

{
  "workflowId": "wf_build_upload_001",
  "projectName": "XRXS插件构建联调",
  "projectPath": "C:/workspace/plugin-demo",
  "pluginType": "frontend",
  "operator": "trae"
}

执行静态分析:

{
  "workflowId": "wf_build_upload_001",
  "requestId": "req_build_exec_001",
  "stage": "implementation",
  "state": "implementation_in_progress",
  "projectName": "XRXS插件构建联调",
  "sourcePackageId": "sp_demo_001",
  "codeSnapshot": "snap_demo_001",
  "operator": "trae"
}

说明:

  • source/upload 仍然是本地目录压缩后上传到 Java 服务端。
  • static-analysiscompilesecurity-scanpackage 现在按纯 Java 模式执行。
  • compile 不再依赖 npm/node,而是基于解压目录读取 manifest + endpoints + src,复用服务端现有代码检查能力。

执行编译:

{
  "workflowId": "wf_build_upload_001",
  "requestId": "req_build_exec_002",
  "stage": "implementation",
  "state": "implementation_in_progress",
  "projectName": "XRXS插件构建联调",
  "sourcePackageId": "sp_demo_001",
  "codeSnapshot": "snap_demo_001",
  "buildProfile": "test",
  "operator": "trae"
}

执行安全扫描:

{
  "workflowId": "wf_build_upload_001",
  "requestId": "req_build_exec_003",
  "stage": "quality",
  "state": "implementation_in_progress",
  "projectName": "XRXS插件构建联调",
  "sourcePackageId": "sp_demo_001",
  "codeSnapshot": "snap_demo_001",
  "targetScopes": ["source", "dependency"],
  "operator": "trae"
}

release 调用示例

创建项目:

{
  "workflowId": "wf_release_demo_001",
  "requestId": "req_release_project_001",
  "stage": "release",
  "state": "implementation_ready",
  "projectName": "员工返聘校验插件",
  "pluginName": "employee-rehire-validate",
  "pluginVersion": "1.0.0",
  "pluginType": "main",
  "pluginMoudle": "plugin",
  "pluginRemark": "员工返聘校验发布联调",
  "operator": "trae"
}

说明:

  • 返回 result = created,项目已写入数据库,可直接用 projectId 继续发布。

发布测试环境:

{
  "workflowId": "wf_release_demo_001",
  "requestId": "req_release_deploy_001",
  "stage": "release",
  "state": "release_in_progress",
  "projectId": "proj_1740000000000_ab12cd",
  "projectName": "员工返聘校验插件",
  "pluginName": "employee-rehire-validate",
  "pluginVersion": "1.0.0",
  "artifactRef": "C:/workspace/plugin-output/employee-rehire-validate.zip",
  "codeSnapshot": "snap_release_001",
  "targetEnv": "test",
  "testCompanyId": "cb77f668b2c8458fb4af8af4fa5ba4e2",
  "operator": "trae",
  "deployNotes": "build 产物发布到测试环境"
}

说明:

  • 推荐优先使用 artifactRef 作为发布主链路。
  • 若只提供 sourcePackageId,服务端会优先复用已存在的 extractRoot;当 extractRoot 为空或失效时,会按 storagePath 自动解压源码包后继续发布。

查询发布状态:

{
  "workflowId": "wf_release_demo_001",
  "requestId": "req_release_status_001",
  "runId": "run_release_001",
  "includeContext": true
}

查询发布日志:

{
  "workflowId": "wf_release_demo_001",
  "requestId": "req_release_log_001",
  "runId": "run_release_001",
  "limit": 20
}

feasibility 调用示例

查询织入点:

{
  "workflowId": "wf_demo_001",
  "stage": "feasibility",
  "state": "feasibility_pending",
  "keywords": ["account.login.ip.restriction"],
  "limit": 3
}

查询业务 API:

{
  "workflowId": "wf_demo_001",
  "stage": "feasibility",
  "state": "feasibility_pending",
  "methodName": "getEmployeeBasic",
  "limit": 3
}

执行可行性分析:

{
  "workflowId": "wf_demo_001",
  "stage": "feasibility",
  "state": "feasibility_pending",
  "projectName": "登录 IP 限制增强",
  "pluginType": "hook",
  "featureItems": [
    {
      "featureName": "登录 IP 限制校验",
      "requiredPointcuts": ["account.login.ip.restriction"],
      "requiredActions": ["登录前校验"],
      "keywords": ["登录", "IP限制"]
    }
  ]
}

support-ticket 调用示例

创建工单:

{
  "workflowId": "wf_demo_001",
  "stage": "support-ticket",
  "state": "feasibility_blocked",
  "projectName": "员工同步增强",
  "ticketType": "pointcut-support",
  "title": "缺少员工列表批量同步织入点",
  "description": "员工列表批量同步能力缺少织入点,阻塞进入开发",
  "gapItems": [
    {
      "gapType": "POINTCUT",
      "featureName": "员工列表批量同步",
      "requiredCapability": "employee.list.operation.menu",
      "impactLevel": "HIGH",
      "reason": "当前缺少可用织入点"
    }
  ],
  "impactLevel": "HIGH",
  "blocking": true,
  "operator": "trae"
}

查询工单:

{
  "workflowId": "wf_demo_001",
  "ticketId": "ticket_demo_001",
  "includeHistory": true
}

更新工单:

{
  "workflowId": "wf_demo_001",
  "stage": "support-ticket",
  "state": "support_ticket_open",
  "ticketId": "ticket_demo_001",
  "status": "resolved",
  "progressComment": "支持团队已完成处理",
  "resolutionSummary": "缺失点位已补齐",
  "operator": "support-owner"
}

恢复检查:

{
  "workflowId": "wf_demo_001",
  "stage": "support-ticket",
  "state": "support_ticket_resolved",
  "ticketId": "ticket_demo_001",
  "recheckTargetStage": "feasibility"
}

workflow 调用示例

初始化或推进到可行性阶段:

{
  "workflowId": "wf_demo_100",
  "requestId": "req_wf_init_001",
  "toState": "feasibility_pending",
  "reason": "PRD 已完成,进入可行性阶段",
  "operator": "trae"
}

标记阻塞态:

{
  "workflowId": "wf_demo_100",
  "requestId": "req_wf_block_001",
  "currentState": "feasibility_pending",
  "blockedState": "feasibility_blocked",
  "reasonCode": "POINTCUT_MISSING",
  "reason": "缺少关键织入点",
  "blockingCategory": "ticket",
  "requiredActions": ["create_support_ticket"],
  "operator": "trae"
}

恢复到工单阶段:

{
  "workflowId": "wf_demo_100",
  "requestId": "req_wf_resume_001",
  "fromState": "feasibility_blocked",
  "toState": "support_ticket_open",
  "recoveryReason": "已创建工单,进入工单协同阶段",
  "resolvedBy": "support-ticket",
  "requireRecheck": false,
  "operator": "trae",
  "evidence": {
    "attributes": {
      "ticketId": "ticket_demo_001",
      "ticketType": "pointcut-support",
      "source": "support-ticket"
    }
  }
}

查询当前状态:

{
  "workflowId": "wf_demo_100",
  "includeContext": true,
  "includeAvailableActions": true
}

build 调用示例

静态分析:

{
  "workflowId": "wf_build_demo_001",
  "requestId": "req_build_001",
  "stage": "implementation",
  "state": "implementation_in_progress",
  "projectName": "XRXS插件构建联调",
  "projectPath": "/workspace/plugin-demo",
  "codeSnapshot": "snap_001",
  "operator": "trae",
  "result": "passed",
  "logs": ["eslint completed"],
  "reportRef": "report://static-analysis/001",
  "findings": []
}

编译:

{
  "workflowId": "wf_build_demo_001",
  "requestId": "req_build_002",
  "stage": "implementation",
  "state": "implementation_in_progress",
  "projectName": "XRXS插件构建联调",
  "projectPath": "/workspace/plugin-demo",
  "codeSnapshot": "snap_001",
  "operator": "trae",
  "result": "passed",
  "buildProfile": "test",
  "artifacts": [
    {
      "artifactName": "plugin.jar",
      "artifactType": "jar",
      "artifactRef": "oss://demo/plugin.jar"
    }
  ]
}

安全扫描:

{
  "workflowId": "wf_build_demo_001",
  "requestId": "req_build_003",
  "stage": "implementation",
  "state": "implementation_in_progress",
  "projectName": "XRXS插件构建联调",
  "projectPath": "/workspace/plugin-demo",
  "codeSnapshot": "snap_001",
  "operator": "trae",
  "result": "passed",
  "artifactRefs": ["oss://demo/plugin.jar"],
  "targetScopes": ["artifact"],
  "findings": []
}

打包:

{
  "workflowId": "wf_build_demo_001",
  "requestId": "req_build_004",
  "stage": "quality",
  "state": "implementation_ready",
  "projectName": "XRXS插件构建联调",
  "projectPath": "/workspace/plugin-demo",
  "codeSnapshot": "snap_001",
  "operator": "trae",
  "result": "passed",
  "artifactName": "plugin.zip",
  "packageType": "zip",
  "artifacts": [
    {
      "artifactName": "plugin.zip",
      "artifactType": "zip",
      "artifactRef": "oss://demo/plugin.zip"
    }
  ]
}