@xiawan-play/steam-tools-mcp 0.1.0

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.
@@ -0,0 +1,92 @@
1
+ # 配置参数说明
2
+
3
+ 这份文档列出 `@xiawan-play/steam-tools-mcp` 当前支持的全部环境变量,并说明默认值、用途和推荐使用场景。
4
+
5
+ README 里的 MCP 配置示例只保留最常用的 3 项:
6
+
7
+ - `STEAM_WEB_API_KEY`
8
+ - `STEAM_DEFAULT_STEAMID`
9
+ - `STEAM_ENABLE_GENERATED_TOOLS`
10
+
11
+ 如果你需要更细的控制,再参考本文即可。
12
+
13
+ ## 常用参数
14
+
15
+ | 变量名 | 默认值 | 作用 | 什么时候建议配置 |
16
+ | --- | --- | --- | --- |
17
+ | `STEAM_WEB_API_KEY` | 无 | 默认使用的 Steam Web API Key。很多资料、游戏库、成就、应用目录相关接口都依赖它。 | 只要你要查“我的资料 / 我的库 / 我的成就”这类信息,就建议配置。 |
18
+ | `STEAM_DEFAULT_STEAMID` | 无 | 默认查询账号的 SteamID64。`steam_me_*` 工具和部分带 `steamid` / `steamids` 的工具会自动使用它。 | 你长期绑定自己的账号使用时,强烈建议配置。 |
19
+ | `STEAM_ENABLE_GENERATED_TOOLS` | `false` | 是否开启辅助探索工具和完整的自动生成 Steam Web API 方法工具集。 | 你想把辅助调试工具和底层 Steam 方法工具一起暴露给 MCP 时再开启。 |
20
+
21
+ ## 高级可选参数
22
+
23
+ | 变量名 | 默认值 | 作用 | 备注 |
24
+ | --- | --- | --- | --- |
25
+ | `STEAM_APP_LIST_CACHE_TTL_MS` | `21600000` | Steam 应用目录缓存时间,单位毫秒。 | 主要影响 `steam_search_apps` / `steam_resolve_app` 等应用目录相关工具。 |
26
+ | `STEAM_REQUEST_TIMEOUT_MS` | `30000` | Steam API 请求超时时间,单位毫秒。 | 网络较慢、代理链路较长时可调大。 |
27
+
28
+ ## HTTP 模式参数
29
+
30
+ 这些参数只有在你显式启用 HTTP 传输时才有意义。
31
+
32
+ | 变量名 | 默认值 | 作用 |
33
+ | --- | --- | --- |
34
+ | `MCP_TRANSPORT` | `stdio` | 传输方式,可选 `stdio` 或 `http`。 |
35
+ | `HOST` | `127.0.0.1` | HTTP 模式监听地址。 |
36
+ | `PORT` | `3000` | HTTP 模式监听端口。 |
37
+
38
+ 如果你是把这个服务配置到 Cursor、Claude Desktop、Cherry Studio 这类客户端里,本地直连场景通常都走 `stdio`,一般不用配置这 3 项。
39
+
40
+ ## 推荐配置档位
41
+
42
+ ### 1. 最小可用
43
+
44
+ 适合先跑起来或只查公开数据。
45
+
46
+ ```json
47
+ {
48
+ "env": {}
49
+ }
50
+ ```
51
+
52
+ ### 2. 个人常用
53
+
54
+ 适合长期绑定自己的 Steam 账号使用。
55
+
56
+ ```json
57
+ {
58
+ "env": {
59
+ "STEAM_WEB_API_KEY": "YOUR_WEB_API_KEY",
60
+ "STEAM_DEFAULT_STEAMID": "YOUR_STEAM_ID64",
61
+ "STEAM_ENABLE_GENERATED_TOOLS": "false"
62
+ }
63
+ }
64
+ ```
65
+
66
+ ### 3. 全量模式
67
+
68
+ 适合高级用户、调试或需要完整 Steam Web API 方法集时使用。
69
+
70
+ ```json
71
+ {
72
+ "env": {
73
+ "STEAM_WEB_API_KEY": "YOUR_WEB_API_KEY",
74
+ "STEAM_DEFAULT_STEAMID": "YOUR_STEAM_ID64",
75
+ "STEAM_ENABLE_GENERATED_TOOLS": "true"
76
+ }
77
+ }
78
+ ```
79
+
80
+ ## 使用建议
81
+
82
+ - 如果你主要是自己用,推荐至少配置 `STEAM_WEB_API_KEY` 和 `STEAM_DEFAULT_STEAMID`。
83
+ - 如果你只是想要“好用的 MCP 工具”,保持 `STEAM_ENABLE_GENERATED_TOOLS=false` 即可;此时默认只暴露高频工具和 `steam_me_*` 快捷工具。
84
+ - 如果你需要方法目录检索、原始调试调用,或者想展开全量官方方法,再开启 `STEAM_ENABLE_GENERATED_TOOLS=true`。
85
+ - 如果你的 MCP 客户端会直接拉起本地进程,通常不需要配置 `MCP_TRANSPORT`、`HOST`、`PORT`。
86
+ - 如果你不需要调优缓存和网络行为,可以完全不配置 `STEAM_APP_LIST_CACHE_TTL_MS` 和 `STEAM_REQUEST_TIMEOUT_MS`。
87
+
88
+ ## 当前读取位置
89
+
90
+ 当前这些环境变量主要在源码中的 `src/server.ts` 里读取。
91
+
92
+ 如果后续新增参数,建议同步更新本文档。
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@xiawan-play/steam-tools-mcp",
3
+ "version": "0.1.0",
4
+ "description": "A Steam MCP server with Chinese-friendly high-level tools and optional generated official methods.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "main": "./dist/server.js",
8
+ "types": "./dist/server.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/server.d.ts",
12
+ "default": "./dist/server.js"
13
+ }
14
+ },
15
+ "bin": {
16
+ "steam-tools-mcp": "dist/server.js"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "docs",
21
+ "README.md",
22
+ ".env.example"
23
+ ],
24
+ "keywords": [
25
+ "mcp",
26
+ "model-context-protocol",
27
+ "steam",
28
+ "steam-tools",
29
+ "steam-web-api",
30
+ "steamworks"
31
+ ],
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/XiaWan-Play/steam-tools-mcp.git"
38
+ },
39
+ "homepage": "https://github.com/XiaWan-Play/steam-tools-mcp#readme",
40
+ "bugs": {
41
+ "url": "https://github.com/XiaWan-Play/steam-tools-mcp/issues"
42
+ },
43
+ "engines": {
44
+ "node": ">=20.0.0"
45
+ },
46
+ "scripts": {
47
+ "dev": "tsx src/server.ts",
48
+ "build": "tsup src/server.ts --format esm --dts --clean",
49
+ "start": "node dist/server.js",
50
+ "sync:steam-spec": "tsx scripts/sync-steam-web-api-spec.ts",
51
+ "prepare": "npm run build"
52
+ },
53
+ "dependencies": {
54
+ "@modelcontextprotocol/sdk": "^1.27.1",
55
+ "cheerio": "^1.2.0",
56
+ "zod": "^4.3.6"
57
+ },
58
+ "devDependencies": {
59
+ "@types/express": "^5.0.3",
60
+ "@types/node": "^24.6.1",
61
+ "tsup": "^8.5.1",
62
+ "tsx": "^4.20.6",
63
+ "typescript": "^5.9.3"
64
+ }
65
+ }