@xiawan-play/steam-tools-mcp 0.3.0 → 0.3.1
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.
- package/dist/server.js +94 -20
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -19504,8 +19504,8 @@ var require_subresource_integrity = __commonJS({
|
|
|
19504
19504
|
if (parsedMetadata.length === 0) {
|
|
19505
19505
|
return true;
|
|
19506
19506
|
}
|
|
19507
|
-
const
|
|
19508
|
-
for (const item of
|
|
19507
|
+
const metadata2 = getStrongestMetadata(parsedMetadata);
|
|
19508
|
+
for (const item of metadata2) {
|
|
19509
19509
|
const algorithm = item.alg;
|
|
19510
19510
|
const expectedValue = item.val;
|
|
19511
19511
|
const actualValue = applyAlgorithmToBytes(algorithm, bytes);
|
|
@@ -19544,9 +19544,9 @@ var require_subresource_integrity = __commonJS({
|
|
|
19544
19544
|
}
|
|
19545
19545
|
return result;
|
|
19546
19546
|
}
|
|
19547
|
-
function parseMetadata(
|
|
19547
|
+
function parseMetadata(metadata2) {
|
|
19548
19548
|
const result = [];
|
|
19549
|
-
for (const item of
|
|
19549
|
+
for (const item of metadata2.split(" ")) {
|
|
19550
19550
|
const expressionAndOptions = item.split("?", 1);
|
|
19551
19551
|
const algorithmExpression = expressionAndOptions[0];
|
|
19552
19552
|
let base64Value = "";
|
|
@@ -19558,11 +19558,11 @@ var require_subresource_integrity = __commonJS({
|
|
|
19558
19558
|
if (algorithmAndValue[1]) {
|
|
19559
19559
|
base64Value = algorithmAndValue[1];
|
|
19560
19560
|
}
|
|
19561
|
-
const
|
|
19561
|
+
const metadata3 = {
|
|
19562
19562
|
alg: algorithm,
|
|
19563
19563
|
val: base64Value
|
|
19564
19564
|
};
|
|
19565
|
-
result.push(
|
|
19565
|
+
result.push(metadata3);
|
|
19566
19566
|
}
|
|
19567
19567
|
return result;
|
|
19568
19568
|
}
|
|
@@ -34612,6 +34612,80 @@ function applyGeneratedToolTitles(spec2) {
|
|
|
34612
34612
|
return spec2;
|
|
34613
34613
|
}
|
|
34614
34614
|
|
|
34615
|
+
// package.json
|
|
34616
|
+
var package_default = {
|
|
34617
|
+
name: "@xiawan-play/steam-tools-mcp",
|
|
34618
|
+
version: "0.3.1",
|
|
34619
|
+
description: "A Steam MCP server with Chinese-friendly high-level tools for profiles, libraries, game snapshots, achievements, and app discovery.",
|
|
34620
|
+
type: "module",
|
|
34621
|
+
license: "MIT",
|
|
34622
|
+
main: "./dist/server.js",
|
|
34623
|
+
types: "./dist/server.d.ts",
|
|
34624
|
+
exports: {
|
|
34625
|
+
".": {
|
|
34626
|
+
types: "./dist/server.d.ts",
|
|
34627
|
+
default: "./dist/server.js"
|
|
34628
|
+
}
|
|
34629
|
+
},
|
|
34630
|
+
bin: {
|
|
34631
|
+
"steam-tools-mcp": "dist/server.js"
|
|
34632
|
+
},
|
|
34633
|
+
files: [
|
|
34634
|
+
"dist",
|
|
34635
|
+
"docs",
|
|
34636
|
+
"README.md",
|
|
34637
|
+
".env.example"
|
|
34638
|
+
],
|
|
34639
|
+
keywords: [
|
|
34640
|
+
"mcp",
|
|
34641
|
+
"model-context-protocol",
|
|
34642
|
+
"steam",
|
|
34643
|
+
"steam-tools",
|
|
34644
|
+
"steam-web-api",
|
|
34645
|
+
"steamworks"
|
|
34646
|
+
],
|
|
34647
|
+
publishConfig: {
|
|
34648
|
+
access: "public"
|
|
34649
|
+
},
|
|
34650
|
+
repository: {
|
|
34651
|
+
type: "git",
|
|
34652
|
+
url: "git+https://github.com/XiaWan-Play/steam-tools-mcp.git"
|
|
34653
|
+
},
|
|
34654
|
+
homepage: "https://github.com/XiaWan-Play/steam-tools-mcp#readme",
|
|
34655
|
+
bugs: {
|
|
34656
|
+
url: "https://github.com/XiaWan-Play/steam-tools-mcp/issues"
|
|
34657
|
+
},
|
|
34658
|
+
engines: {
|
|
34659
|
+
node: ">=20.0.0"
|
|
34660
|
+
},
|
|
34661
|
+
scripts: {
|
|
34662
|
+
dev: "tsx src/server.ts",
|
|
34663
|
+
build: "tsup src/server.ts --format esm --dts --clean",
|
|
34664
|
+
"check:tool-registry": "tsx scripts/check-tool-registration.ts",
|
|
34665
|
+
start: "node dist/server.js",
|
|
34666
|
+
"sync:steam-spec": "tsx scripts/sync-steam-web-api-spec.ts",
|
|
34667
|
+
prepare: "npm run build"
|
|
34668
|
+
},
|
|
34669
|
+
dependencies: {
|
|
34670
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
34671
|
+
cheerio: "^1.2.0",
|
|
34672
|
+
zod: "^4.3.6"
|
|
34673
|
+
},
|
|
34674
|
+
devDependencies: {
|
|
34675
|
+
"@types/express": "^5.0.3",
|
|
34676
|
+
"@types/node": "^24.6.1",
|
|
34677
|
+
tsup: "^8.5.1",
|
|
34678
|
+
tsx: "^4.20.6",
|
|
34679
|
+
typescript: "^5.9.3"
|
|
34680
|
+
}
|
|
34681
|
+
};
|
|
34682
|
+
|
|
34683
|
+
// src/lib/package-meta.ts
|
|
34684
|
+
var metadata = package_default;
|
|
34685
|
+
var PACKAGE_NAME = metadata.name.includes("/") ? metadata.name.split("/").pop() ?? metadata.name : metadata.name;
|
|
34686
|
+
var PACKAGE_VERSION = metadata.version;
|
|
34687
|
+
var PACKAGE_USER_AGENT = `${PACKAGE_NAME}/${PACKAGE_VERSION}`;
|
|
34688
|
+
|
|
34615
34689
|
// src/normalizers/common.ts
|
|
34616
34690
|
function normalizeScalarInput(value) {
|
|
34617
34691
|
if (value === void 0 || value === null) {
|
|
@@ -35153,11 +35227,11 @@ async function fetchTextResponse(url, timeoutMs) {
|
|
|
35153
35227
|
const controller = new AbortController();
|
|
35154
35228
|
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
35155
35229
|
try {
|
|
35156
|
-
const response = await
|
|
35230
|
+
const response = await fetchWithProxy(url, {
|
|
35157
35231
|
signal: controller.signal,
|
|
35158
35232
|
headers: {
|
|
35159
35233
|
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8",
|
|
35160
|
-
"user-agent":
|
|
35234
|
+
"user-agent": PACKAGE_USER_AGENT
|
|
35161
35235
|
}
|
|
35162
35236
|
});
|
|
35163
35237
|
if (!response.ok) {
|
|
@@ -37154,7 +37228,7 @@ async function fetchAugmentedSteamPrices(runtime2, body) {
|
|
|
37154
37228
|
headers: {
|
|
37155
37229
|
accept: "application/json",
|
|
37156
37230
|
"content-type": "application/json",
|
|
37157
|
-
"user-agent":
|
|
37231
|
+
"user-agent": PACKAGE_USER_AGENT
|
|
37158
37232
|
},
|
|
37159
37233
|
body: JSON.stringify(body),
|
|
37160
37234
|
signal: AbortSignal.timeout(runtime2.config.timeoutMs)
|
|
@@ -37439,7 +37513,7 @@ async function fetchSteamCommunityHtml(url, timeoutMs) {
|
|
|
37439
37513
|
headers: {
|
|
37440
37514
|
accept: "text/html,application/xhtml+xml",
|
|
37441
37515
|
"accept-language": "en-US,en;q=0.9",
|
|
37442
|
-
"user-agent":
|
|
37516
|
+
"user-agent": PACKAGE_USER_AGENT
|
|
37443
37517
|
},
|
|
37444
37518
|
signal: AbortSignal.timeout(timeoutMs)
|
|
37445
37519
|
});
|
|
@@ -37520,7 +37594,7 @@ function analyzeGuidePage(html, candidate, achievementMap) {
|
|
|
37520
37594
|
$("script, style, noscript").remove();
|
|
37521
37595
|
$("br").replaceWith("\n");
|
|
37522
37596
|
const lines = $.root().text().split(/\n+/).map((line) => cleanText(line)).filter((line) => line.length > 0);
|
|
37523
|
-
const
|
|
37597
|
+
const metadata2 = extractGuideMetadata(lines, candidate);
|
|
37524
37598
|
const mentions = [];
|
|
37525
37599
|
const attention = [];
|
|
37526
37600
|
let currentPhase = "preparation";
|
|
@@ -37538,9 +37612,9 @@ function analyzeGuidePage(html, candidate, achievementMap) {
|
|
|
37538
37612
|
snippet: buildSnippet(lines, index),
|
|
37539
37613
|
phaseKey: currentPhase,
|
|
37540
37614
|
source: {
|
|
37541
|
-
guideId:
|
|
37542
|
-
title:
|
|
37543
|
-
url:
|
|
37615
|
+
guideId: metadata2.guideId,
|
|
37616
|
+
title: metadata2.title,
|
|
37617
|
+
url: metadata2.url
|
|
37544
37618
|
}
|
|
37545
37619
|
});
|
|
37546
37620
|
}
|
|
@@ -37553,9 +37627,9 @@ function analyzeGuidePage(html, candidate, achievementMap) {
|
|
|
37553
37627
|
text: line,
|
|
37554
37628
|
phaseKey: attentionCategory === "cleanup" ? "cleanup" : currentPhase,
|
|
37555
37629
|
source: {
|
|
37556
|
-
guideId:
|
|
37557
|
-
title:
|
|
37558
|
-
url:
|
|
37630
|
+
guideId: metadata2.guideId,
|
|
37631
|
+
title: metadata2.title,
|
|
37632
|
+
url: metadata2.url
|
|
37559
37633
|
},
|
|
37560
37634
|
relatedAchievements: matchedAchievements.map((achievement) => achievement.name),
|
|
37561
37635
|
confidence: matchedAchievements.length > 0 || attentionCategory === "missable" ? "high" : "medium"
|
|
@@ -37563,7 +37637,7 @@ function analyzeGuidePage(html, candidate, achievementMap) {
|
|
|
37563
37637
|
}
|
|
37564
37638
|
const uniqueMentions = dedupeMentions(mentions);
|
|
37565
37639
|
return {
|
|
37566
|
-
metadata,
|
|
37640
|
+
metadata: metadata2,
|
|
37567
37641
|
mentions: uniqueMentions,
|
|
37568
37642
|
attention: dedupeAttentionItems(attention),
|
|
37569
37643
|
lines,
|
|
@@ -39894,8 +39968,8 @@ var runtime = createSteamBaseRuntime(spec, {
|
|
|
39894
39968
|
});
|
|
39895
39969
|
function createServer() {
|
|
39896
39970
|
const server = new McpServer({
|
|
39897
|
-
name:
|
|
39898
|
-
version:
|
|
39971
|
+
name: PACKAGE_NAME,
|
|
39972
|
+
version: PACKAGE_VERSION,
|
|
39899
39973
|
websiteUrl: "https://partner.steamgames.com/doc/webapi"
|
|
39900
39974
|
});
|
|
39901
39975
|
registerOverviewTools(server, runtime);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiawan-play/steam-tools-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "A Steam MCP server with Chinese-friendly high-level tools for profiles, libraries, game snapshots, achievements, and app discovery.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|