hvip-mcp-server 0.2.54 → 0.2.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +63 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -35379,6 +35379,7 @@ function registerAgentUtils(server, auth) {
35379
35379
  async ({ domain }) => {
35380
35380
  try {
35381
35381
  const detail = DOMAIN_DETAILS[domain];
35382
+ const hasAuth = auth !== null;
35382
35383
  if (!detail) {
35383
35384
  return toResult({
35384
35385
  found: false,
@@ -35388,9 +35389,14 @@ function registerAgentUtils(server, auth) {
35388
35389
  tsIso: (/* @__PURE__ */ new Date()).toISOString()
35389
35390
  });
35390
35391
  }
35392
+ const needsKey = detail.authRequired && !hasAuth;
35391
35393
  return toResult({
35392
35394
  found: true,
35393
35395
  domain,
35396
+ authRequired: detail.authRequired,
35397
+ keyAvailable: hasAuth,
35398
+ usable: !detail.authRequired || hasAuth,
35399
+ _authWarning: needsKey ? "\u26A0\uFE0F \u6B64\u57DF\u9700\u8981 API Key\uFF0C\u5F53\u524D\u672A\u914D\u7F6E\u3002\u544A\u8BC9\u7528\u6237\u53BB OKX \u5B98\u7F51\u521B\u5EFA Key \u540E\u91CD\u8FDE\u3002" : null,
35394
35400
  ...detail,
35395
35401
  tsIso: (/* @__PURE__ */ new Date()).toISOString()
35396
35402
  });
@@ -37990,6 +37996,50 @@ function resolveTransportMode() {
37990
37996
  if (arg === "start:stdio" || arg === "" || arg.startsWith("-")) return "stdio";
37991
37997
  return "stdio";
37992
37998
  }
37999
+ function printHelpAndExit(version2) {
38000
+ process.stdout.write([
38001
+ ``,
38002
+ ` hvip-mcp v${version2} \u2014 OKX MCP \u670D\u52A1\u5668\uFF08\u975E OKX \u5B98\u65B9\u4EA7\u54C1\uFF09`,
38003
+ ``,
38004
+ ` \u{1F517} \u4ED3\u5E93: https://github.com/okx-wallet-H/hvip-mcp`,
38005
+ ``,
38006
+ ` \u26A0\uFE0F \u8FD9\u4E0D\u662F\u547D\u4EE4\u884C\u5DE5\u5177\uFF0C\u800C\u662F MCP (Model Context Protocol) \u670D\u52A1\u5668\u3002`,
38007
+ ` \u4F60\u4E0D\u80FD\u76F4\u63A5\u5728\u7EC8\u7AEF\u91CC\u8FD0\u884C\u5B83\u2014\u2014\u9700\u8981\u914D\u7F6E\u5230 MCP \u5BA2\u6237\u7AEF\uFF08Claude Desktop\u3001VS Code\u3001Cline \u7B49\uFF09\u4E2D\u3002`,
38008
+ ``,
38009
+ ` \u2500\u2500 \u5FEB\u901F\u5F00\u59CB \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`,
38010
+ ``,
38011
+ ` Claude Desktop\uFF08\u63A8\u8350\uFF09:`,
38012
+ ` 1. \u6253\u5F00 Claude Desktop \u2192 \u8BBE\u7F6E \u2192 Developer \u2192 Edit Config`,
38013
+ ` 2. \u5728 mcpServers \u4E2D\u6DFB\u52A0:`,
38014
+ ``,
38015
+ ` {`,
38016
+ ` "hvip": {`,
38017
+ ` "command": "npx",`,
38018
+ ` "args": ["-y", "hvip-mcp-server"]`,
38019
+ ` }`,
38020
+ ` }`,
38021
+ ``,
38022
+ ` VS Code / Cline:`,
38023
+ ` \u5728 MCP \u914D\u7F6E\u4E2D\u6DFB\u52A0\u540C\u6837\u7684 JSON\u3002`,
38024
+ ``,
38025
+ ` \u2500\u2500 \u53EF\u7528\u53C2\u6570 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`,
38026
+ ``,
38027
+ ` npx hvip-mcp-server \u542F\u52A8 MCP stdio \u670D\u52A1\u5668`,
38028
+ ` npx hvip-mcp-server start:http \u542F\u52A8 HTTP \u6A21\u5F0F (localhost:3000)`,
38029
+ ` npx hvip-mcp-server --help \u663E\u793A\u6B64\u5E2E\u52A9`,
38030
+ ` npx hvip-mcp-server --version \u663E\u793A\u7248\u672C\u53F7`,
38031
+ ``,
38032
+ ` \u2500\u2500 \u73AF\u5883\u53D8\u91CF \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`,
38033
+ ``,
38034
+ ` OKX_API_KEY API Key\uFF08\u83B7\u53D6\uFF1AOKX \u5B98\u7F51 \u2192 \u4E2A\u4EBA\u4E2D\u5FC3 \u2192 API\uFF09`,
38035
+ ` OKX_SECRET_KEY Secret Key`,
38036
+ ` OKX_PASSPHRASE Passphrase`,
38037
+ ` PORT=3000 HTTP \u6A21\u5F0F\u7AEF\u53E3\uFF08\u9ED8\u8BA4 3000\uFF09`,
38038
+ ` HOST=127.0.0.1 HTTP \u6A21\u5F0F\u7ED1\u5B9A\u5730\u5740`,
38039
+ ``
38040
+ ].join("\n") + "\n");
38041
+ process.exit(0);
38042
+ }
37993
38043
  function registerAllTools(server, auth, readOnly) {
37994
38044
  let skipped = 0;
37995
38045
  const skipLog = [];
@@ -38162,7 +38212,14 @@ async function startStdio(server, version2, auth, readOnly, skipped, skipLog) {
38162
38212
  await server.connect(transport);
38163
38213
  }
38164
38214
  async function main() {
38165
- const VERSION = "0.2.54";
38215
+ const VERSION = "0.2.55";
38216
+ const argv = process.argv.slice(2);
38217
+ if (argv.includes("--help") || argv.includes("-h")) printHelpAndExit(VERSION);
38218
+ if (argv.includes("--version") || argv.includes("-v")) {
38219
+ process.stdout.write(`hvip-mcp v${VERSION}
38220
+ `);
38221
+ process.exit(0);
38222
+ }
38166
38223
  const auth = getAuth();
38167
38224
  const mode = resolveTransportMode();
38168
38225
  const exec = resolveExecutionMode();
@@ -38176,6 +38233,11 @@ async function main() {
38176
38233
  if (mode === "http") {
38177
38234
  await startHttp(server, VERSION, auth, readOnly, skipped);
38178
38235
  } else {
38236
+ if (process.stdin.isTTY && process.env.NODE_ENV !== "production") {
38237
+ process.stderr.write("\n[hint] \u68C0\u6D4B\u5230\u4F60\u5728\u7EC8\u7AEF\u76F4\u63A5\u8FD0\u884C hvip-mcp\u3002\n");
38238
+ process.stderr.write("[hint] hvip-mcp \u662F MCP \u670D\u52A1\u5668\uFF0C\u9700\u8981\u5728 MCP \u5BA2\u6237\u7AEF\uFF08\u5982 Claude Desktop\uFF09\u4E2D\u914D\u7F6E\u3002\n");
38239
+ process.stderr.write("[hint] \u8FD0\u884C npx hvip-mcp-server --help \u67E5\u770B\u914D\u7F6E\u65B9\u6CD5\u3002\n\n");
38240
+ }
38179
38241
  await startStdio(server, VERSION, auth, readOnly, skipped, skipLog);
38180
38242
  }
38181
38243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvip-mcp-server",
3
- "version": "0.2.54",
3
+ "version": "0.2.55",
4
4
  "description": "hvip MCP Server — 365 工具覆盖 97.7% OKX REST API,含交易/行情/资金/策略/预测市场/技术指标/Smart Money(非 OKX 官方产品)",
5
5
  "homepage": "https://github.com/okx-wallet-H/hvip-mcp",
6
6
  "repository": {