util-mcp-server

v0.2.0
@zjlab-fe/util-mcp-server Checked 3 days ago Published 19 days ago

MCP server that exposes @zjlab-fe/util metadata to code-review clients.

@zjlab-fe/util-mcp-server An stdio MCP server that exposes the reviewed metadata shipped by @zjlab-fe/util. Tools - get_utils: returns the complete utils.yaml content as JSON. - get_category: returns the complete category.yaml content as JSON. - get_utils_by_category: takes a stable category ID and returns { version, entries }, with complete matching entries. An unknown category returns an empty entries array. - get_util_signature: takes an exact name from get_utils and returns all matching public TypeScript declaration signatures from that package version.

Summary extracted from the README.

@zjlab-fe/util-mcp-server

An stdio MCP server that exposes the reviewed metadata shipped by @zjlab-fe/util.

Tools

  • get_utils: returns the complete utils.yaml content as JSON.
  • get_category: returns the complete category.yaml content as JSON.
  • get_utils_by_category: takes a stable category ID and returns { version, entries }, with complete matching entries. An unknown category returns an empty entries array.
  • get_util_signature: takes an exact name from get_utils and returns all matching public TypeScript declaration signatures from that package version. It supports functions, classes, and class methods such as BrowserLogger.logAPI.

Install and configure

The server can be invoked through npx:

{
  "mcpServers": {
    "zjlab-util": {
      "command": "npx",
      "args": ["-y", "@zjlab-fe/util-mcp-server"],
      "env": {
        "ZJLAB_UTIL_MCP_LOG_LEVEL": "info"
      }
    }
  }
}

It also supports a direct built CLI path:

{
  "command": "node",
  "args": ["C:/path/to/zjlab-fe-util-mcp-server/dist/bin/cli.js"],
  "env": {
    "ZJLAB_UTIL_MCP_LOG_LEVEL": "info"
  }
}

Metadata refresh

The npm registry resolves @zjlab-fe/util@latest; the corresponding immutable metadata and dist/types/index.d.ts declaration file are then fetched from cdn.jsdmirror.com. A validated metadata snapshot is stored in the user's cache directory and refreshed at most every two hours. If refresh fails, the server uses the previous snapshot; if no snapshot exists, it uses the metadata bundled with this package.

Change remote package, mirror, paths, cache namespace, or refresh interval in src/config.ts.

Logs go to stderr. Set ZJLAB_UTIL_MCP_LOG_LEVEL to silent, error, info, or debug.