@scorehub/mcp-server 0.1.0 → 0.1.2

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 +3 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  /**
@@ -13,7 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
14
  const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
14
15
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
15
16
  const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
16
- const REMOTE_MCP_URL = process.env.SCOREHUB_REMOTE_MCP_URL || "http://localhost:3100";
17
+ const REMOTE_MCP_URL = process.env.SCOREHUB_REMOTE_MCP_URL || "https://mcp.scorehub.cn";
17
18
  const TOKEN_ENDPOINT = `${REMOTE_MCP_URL}/token`;
18
19
  const AUTHORIZE_URL = `${REMOTE_MCP_URL}/authorize`;
19
20
  // ── Auth State ──────────────────────────────────────────────
@@ -132,7 +133,7 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
132
133
  catch { /* headless env: user opens manually */ }
133
134
  try {
134
135
  const { code } = await callbackPromise;
135
- const baseUrl = REMOTE_MCP_URL.replace(/\/mcp.*$/, "");
136
+ const baseUrl = new URL(REMOTE_MCP_URL).origin;
136
137
  const tokenResp = await fetch(`${baseUrl}/token`, {
137
138
  method: "POST",
138
139
  headers: { "Content-Type": "application/json" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scorehub/mcp-server",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "ScoreHub local MCP proxy — OAuth login, token caching, and tool forwarding to remote MCP endpoint",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "files": ["dist"],
10
10
  "scripts": {
11
- "build": "tsc",
11
+ "build": "tsc && node -e \"const fs=require('fs');const f='dist/index.js';fs.writeFileSync(f,'#!/usr/bin/env node\\n'+fs.readFileSync(f,'utf8'));fs.chmodSync(f,0o755)\"",
12
12
  "dev": "tsx src/index.ts",
13
13
  "start": "node dist/index.js"
14
14
  },