@naouts/mcp-steam 1.0.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.
- package/LICENSE +21 -0
- package/README.md +229 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +270 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 naouts
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# mcp-steam
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/mcp-steam)
|
|
4
|
+
[](https://www.npmjs.com/package/mcp-steam)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://nodejs.org)
|
|
7
|
+
|
|
8
|
+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for the Steam API. Connect any MCP-compatible client to search games, retrieve detailed information, and list a player's owned games.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
| Tool | Description |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `search_games` | Search Steam by name or keyword, returns AppIDs, prices, platforms |
|
|
17
|
+
| `get_game_details` | Full details for a game: price, description, Metacritic, genres, reviews |
|
|
18
|
+
| `get_owned_games` | All games owned by a Steam player (requires API key + public profile) |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Requirements
|
|
23
|
+
|
|
24
|
+
- **Node.js 18+**
|
|
25
|
+
- A **Steam Web API key** for the `get_owned_games` tool — get one free at [steamcommunity.com/dev/apikey](https://steamcommunity.com/dev/apikey)
|
|
26
|
+
|
|
27
|
+
> `search_games` and `get_game_details` use the public Steam Store API and do **not** require an API key.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
### With npx (recommended)
|
|
34
|
+
|
|
35
|
+
Add this to your MCP client configuration file:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"mcpServers": {
|
|
40
|
+
"steam": {
|
|
41
|
+
"command": "npx",
|
|
42
|
+
"args": ["-y", "mcp-steam"],
|
|
43
|
+
"env": {
|
|
44
|
+
"STEAM_API_KEY": "YOUR_STEAM_API_KEY"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Global install
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install -g mcp-steam
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Then reference it in your MCP config:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"steam": {
|
|
63
|
+
"command": "mcp-steam",
|
|
64
|
+
"env": {
|
|
65
|
+
"STEAM_API_KEY": "YOUR_STEAM_API_KEY"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Tools
|
|
75
|
+
|
|
76
|
+
### `search_games`
|
|
77
|
+
|
|
78
|
+
Search Steam for games by name or keyword.
|
|
79
|
+
|
|
80
|
+
**Parameters:**
|
|
81
|
+
|
|
82
|
+
| Name | Type | Required | Default | Description |
|
|
83
|
+
|---|---|---|---|---|
|
|
84
|
+
| `query` | string | yes | — | Search query (game name or keyword) |
|
|
85
|
+
| `limit` | number | no | `5` | Max results (1–20) |
|
|
86
|
+
|
|
87
|
+
**Example prompt:**
|
|
88
|
+
> Search for "hollow knight" on Steam
|
|
89
|
+
|
|
90
|
+
**Example response:**
|
|
91
|
+
```
|
|
92
|
+
Found 12 result(s) for "hollow knight" (showing 5):
|
|
93
|
+
|
|
94
|
+
1. **Hollow Knight** (AppID: 367520)
|
|
95
|
+
Price: $14.99 | Platforms: Windows, Mac, Linux
|
|
96
|
+
|
|
97
|
+
2. **Hollow Knight: Voidheart Edition** (AppID: 851710)
|
|
98
|
+
Price: $19.99 | Platforms: Windows, Mac, Linux
|
|
99
|
+
...
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### `get_game_details`
|
|
105
|
+
|
|
106
|
+
Get full details for a game by its Steam AppID.
|
|
107
|
+
|
|
108
|
+
**Parameters:**
|
|
109
|
+
|
|
110
|
+
| Name | Type | Required | Description |
|
|
111
|
+
|---|---|---|---|
|
|
112
|
+
| `appid` | number | yes | Steam AppID (e.g. `570` for Dota 2, `730` for CS2) |
|
|
113
|
+
|
|
114
|
+
**Example prompt:**
|
|
115
|
+
> Give me the details of Elden Ring on Steam (AppID 1245620)
|
|
116
|
+
|
|
117
|
+
**Example response:**
|
|
118
|
+
```
|
|
119
|
+
## Elden Ring (AppID: 1245620)
|
|
120
|
+
|
|
121
|
+
**Price:** $59.99
|
|
122
|
+
**Developer(s):** FromSoftware Inc.
|
|
123
|
+
**Publisher(s):** Bandai Namco Entertainment
|
|
124
|
+
**Release date:** Feb 25, 2022
|
|
125
|
+
**Platforms:** Windows
|
|
126
|
+
**Genres:** Action, RPG
|
|
127
|
+
**Reviews:** 722,984 recommendations
|
|
128
|
+
Metacritic: 95/100
|
|
129
|
+
|
|
130
|
+
**Description:**
|
|
131
|
+
THE NEW FANTASY ACTION RPG. Rise, Tarnished, and be guided by grace to brandish the power of the Elden Ring...
|
|
132
|
+
|
|
133
|
+
**Store page:** https://store.steampowered.com/app/1245620/
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### `get_owned_games`
|
|
139
|
+
|
|
140
|
+
List all games owned by a Steam player. The player's profile **must be set to public**. Requires a Steam API key.
|
|
141
|
+
|
|
142
|
+
**Parameters:**
|
|
143
|
+
|
|
144
|
+
| Name | Type | Required | Default | Description |
|
|
145
|
+
|---|---|---|---|---|
|
|
146
|
+
| `steamid` | string | yes | — | 17-digit 64-bit SteamID |
|
|
147
|
+
| `sort_by` | string | no | `"playtime"` | Sort by `"playtime"` or `"name"` |
|
|
148
|
+
|
|
149
|
+
**How to find a SteamID:**
|
|
150
|
+
- Visit [steamidfinder.com](https://www.steamidfinder.com) or [steamid.io](https://steamid.io)
|
|
151
|
+
- Or open a profile URL: `https://steamcommunity.com/id/USERNAME` → look for the 17-digit ID
|
|
152
|
+
|
|
153
|
+
**Example prompt:**
|
|
154
|
+
> Show me the games owned by SteamID 76561198000000000, sorted by playtime
|
|
155
|
+
|
|
156
|
+
**Example response:**
|
|
157
|
+
```
|
|
158
|
+
## Owned games for SteamID 76561198000000000
|
|
159
|
+
|
|
160
|
+
**Total games:** 312
|
|
161
|
+
**Total playtime:** 8,453 hours
|
|
162
|
+
|
|
163
|
+
### Top 25 games (sorted by playtime):
|
|
164
|
+
1. **Counter-Strike 2** — 1,204h (3h 22min last 2 weeks)
|
|
165
|
+
2. **Dota 2** — 987h
|
|
166
|
+
3. **The Witcher 3: Wild Hunt** — 342h
|
|
167
|
+
...
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Environment Variables
|
|
173
|
+
|
|
174
|
+
| Variable | Required | Description |
|
|
175
|
+
|---|---|---|
|
|
176
|
+
| `STEAM_API_KEY` | For `get_owned_games` | Your Steam Web API key |
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Development
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
# Clone and install
|
|
184
|
+
git clone https://github.com/naouts/mcp-steam.git
|
|
185
|
+
cd mcp-steam
|
|
186
|
+
npm install
|
|
187
|
+
|
|
188
|
+
# Build
|
|
189
|
+
npm run build
|
|
190
|
+
|
|
191
|
+
# Run locally
|
|
192
|
+
STEAM_API_KEY=your_key node dist/index.js
|
|
193
|
+
|
|
194
|
+
# Watch mode (rebuilds on change)
|
|
195
|
+
npm run build && npm run dev
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Project structure
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
mcp-steam/
|
|
202
|
+
├── src/
|
|
203
|
+
│ └── index.ts # Server + all tools
|
|
204
|
+
├── dist/ # Compiled output (git-ignored)
|
|
205
|
+
├── package.json
|
|
206
|
+
├── tsconfig.json
|
|
207
|
+
└── README.md
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Publishing to npm
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Make sure you're logged in
|
|
216
|
+
npm login
|
|
217
|
+
|
|
218
|
+
# Dry-run to verify what gets published
|
|
219
|
+
npm publish --dry-run
|
|
220
|
+
|
|
221
|
+
# Publish
|
|
222
|
+
npm publish
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## License
|
|
228
|
+
|
|
229
|
+
MIT — see [LICENSE](LICENSE)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
const STEAM_API_KEY = process.env.STEAM_API_KEY ?? "";
|
|
6
|
+
const STORE_API = "https://store.steampowered.com/api";
|
|
7
|
+
const STEAM_API = "https://api.steampowered.com";
|
|
8
|
+
const FETCH_TIMEOUT_MS = 10_000;
|
|
9
|
+
const MAX_RESPONSE_BYTES = 5 * 1024 * 1024; // 5 MB
|
|
10
|
+
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
11
|
+
function minutesToHours(minutes) {
|
|
12
|
+
if (minutes < 60)
|
|
13
|
+
return `${minutes} min`;
|
|
14
|
+
const h = Math.floor(minutes / 60);
|
|
15
|
+
const m = minutes % 60;
|
|
16
|
+
return m > 0 ? `${h}h ${m}min` : `${h}h`;
|
|
17
|
+
}
|
|
18
|
+
function stripHtml(html) {
|
|
19
|
+
return html.replace(/<[^>]+>/g, "").replace(/\s+/g, " ").trim();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Redact the Steam API key from a URL before using it in error messages
|
|
23
|
+
* so it is never exposed in logs or MCP responses.
|
|
24
|
+
*/
|
|
25
|
+
function sanitizeUrl(rawUrl) {
|
|
26
|
+
try {
|
|
27
|
+
const u = new URL(rawUrl);
|
|
28
|
+
if (u.searchParams.has("key")) {
|
|
29
|
+
u.searchParams.set("key", "[REDACTED]");
|
|
30
|
+
}
|
|
31
|
+
return u.toString();
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return "[invalid url]";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function fetchJson(url) {
|
|
38
|
+
let res;
|
|
39
|
+
try {
|
|
40
|
+
res = await fetch(url, {
|
|
41
|
+
headers: { "User-Agent": "mcp-steam/1.0.0" },
|
|
42
|
+
signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
// Network errors may contain the URL — sanitize before re-throwing.
|
|
47
|
+
const label = err instanceof Error && err.name === "TimeoutError"
|
|
48
|
+
? `Request timed out after ${FETCH_TIMEOUT_MS / 1000}s`
|
|
49
|
+
: "Network error";
|
|
50
|
+
throw new Error(`${label} (${sanitizeUrl(url)})`);
|
|
51
|
+
}
|
|
52
|
+
if (!res.ok) {
|
|
53
|
+
// sanitizeUrl strips the API key from the URL included in the error.
|
|
54
|
+
throw new Error(`HTTP ${res.status} — ${res.statusText} (${sanitizeUrl(url)})`);
|
|
55
|
+
}
|
|
56
|
+
const contentLength = res.headers.get("content-length");
|
|
57
|
+
if (contentLength && Number(contentLength) > MAX_RESPONSE_BYTES) {
|
|
58
|
+
throw new Error("Steam API response exceeds size limit");
|
|
59
|
+
}
|
|
60
|
+
const text = await res.text();
|
|
61
|
+
if (text.length > MAX_RESPONSE_BYTES) {
|
|
62
|
+
throw new Error("Steam API response exceeds size limit");
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
return JSON.parse(text);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
throw new Error("Steam API returned invalid JSON");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// ── Tool implementations ─────────────────────────────────────────────────────
|
|
72
|
+
async function searchGames(query, limit) {
|
|
73
|
+
const url = `${STORE_API}/storesearch/?term=${encodeURIComponent(query)}&l=english&cc=US`;
|
|
74
|
+
const data = await fetchJson(url);
|
|
75
|
+
if (!data.items || data.items.length === 0) {
|
|
76
|
+
return `No games found for "${query}".`;
|
|
77
|
+
}
|
|
78
|
+
const results = data.items.slice(0, limit).map((item) => ({
|
|
79
|
+
id: item.id,
|
|
80
|
+
name: item.name,
|
|
81
|
+
price: item.price?.final_formatted,
|
|
82
|
+
platforms: [
|
|
83
|
+
item.platforms?.windows ? "Windows" : null,
|
|
84
|
+
item.platforms?.mac ? "Mac" : null,
|
|
85
|
+
item.platforms?.linux ? "Linux" : null,
|
|
86
|
+
].filter(Boolean),
|
|
87
|
+
}));
|
|
88
|
+
const lines = results.map((r, i) => {
|
|
89
|
+
const platforms = r.platforms.length ? r.platforms.join(", ") : "Unknown";
|
|
90
|
+
const price = r.price ?? "Free / N/A";
|
|
91
|
+
return `${i + 1}. **${r.name}** (AppID: ${r.id})\n Price: ${price} | Platforms: ${platforms}`;
|
|
92
|
+
});
|
|
93
|
+
return `Found ${data.total} result(s) for "${query}" (showing ${results.length}):\n\n${lines.join("\n\n")}`;
|
|
94
|
+
}
|
|
95
|
+
async function getGameDetails(appid) {
|
|
96
|
+
const url = `${STORE_API}/appdetails?appids=${appid}&cc=US&l=english`;
|
|
97
|
+
const data = await fetchJson(url);
|
|
98
|
+
const entry = data[String(appid)];
|
|
99
|
+
if (!entry?.success || !entry.data) {
|
|
100
|
+
return `Could not retrieve details for AppID ${appid}. The game may not exist or may be region-locked.`;
|
|
101
|
+
}
|
|
102
|
+
const d = entry.data;
|
|
103
|
+
const price = d.price_overview
|
|
104
|
+
? d.price_overview.discount_percent > 0
|
|
105
|
+
? `${d.price_overview.final_formatted} (${d.price_overview.discount_percent}% off)`
|
|
106
|
+
: d.price_overview.final_formatted
|
|
107
|
+
: "Free to Play";
|
|
108
|
+
const reviews = d.recommendations?.total
|
|
109
|
+
? `${d.recommendations.total.toLocaleString()} recommendations`
|
|
110
|
+
: "No review data";
|
|
111
|
+
const metacritic = d.metacritic
|
|
112
|
+
? `Metacritic: ${d.metacritic.score}/100 — ${d.metacritic.url}`
|
|
113
|
+
: "No Metacritic score";
|
|
114
|
+
const platforms = [
|
|
115
|
+
d.platforms.windows ? "Windows" : null,
|
|
116
|
+
d.platforms.mac ? "Mac" : null,
|
|
117
|
+
d.platforms.linux ? "Linux" : null,
|
|
118
|
+
].filter(Boolean).join(", ") || "Unknown";
|
|
119
|
+
const description = stripHtml(d.short_description ?? d.detailed_description ?? "").slice(0, 400);
|
|
120
|
+
// genres and categories are {id, description} objects in the Steam API response
|
|
121
|
+
const genres = d.genres?.map((g) => g.description).join(", ") ?? "N/A";
|
|
122
|
+
const categories = d.categories?.slice(0, 5).map((c) => c.description).join(", ") ?? "N/A";
|
|
123
|
+
const releaseDate = d.release_date?.coming_soon ? "Coming soon" : (d.release_date?.date ?? "N/A");
|
|
124
|
+
return [
|
|
125
|
+
`## ${d.name} (AppID: ${d.appid})`,
|
|
126
|
+
``,
|
|
127
|
+
`**Price:** ${price}`,
|
|
128
|
+
`**Developer(s):** ${d.developers?.join(", ") ?? "N/A"}`,
|
|
129
|
+
`**Publisher(s):** ${d.publishers?.join(", ") ?? "N/A"}`,
|
|
130
|
+
`**Release date:** ${releaseDate}`,
|
|
131
|
+
`**Platforms:** ${platforms}`,
|
|
132
|
+
`**Genres:** ${genres}`,
|
|
133
|
+
`**Categories:** ${categories}`,
|
|
134
|
+
`**Reviews:** ${reviews}`,
|
|
135
|
+
metacritic,
|
|
136
|
+
``,
|
|
137
|
+
`**Description:**`,
|
|
138
|
+
description + (description.length === 400 ? "…" : ""),
|
|
139
|
+
``,
|
|
140
|
+
`**Store page:** https://store.steampowered.com/app/${d.appid}/`,
|
|
141
|
+
d.website ? `**Website:** ${d.website}` : null,
|
|
142
|
+
].filter((l) => l !== null).join("\n");
|
|
143
|
+
}
|
|
144
|
+
async function getOwnedGames(steamid, sortBy) {
|
|
145
|
+
if (!STEAM_API_KEY) {
|
|
146
|
+
return ("Error: STEAM_API_KEY environment variable is not set.\n" +
|
|
147
|
+
"An API key is required to fetch owned games.\n" +
|
|
148
|
+
"Get yours at https://steamcommunity.com/dev/apikey");
|
|
149
|
+
}
|
|
150
|
+
// The API key is a query parameter — sanitizeUrl() in fetchJson will redact it
|
|
151
|
+
// from any error messages before they are returned to the caller.
|
|
152
|
+
const url = `${STEAM_API}/IPlayerService/GetOwnedGames/v0001/` +
|
|
153
|
+
`?key=${STEAM_API_KEY}&steamid=${steamid}&format=json` +
|
|
154
|
+
`&include_appinfo=1&include_played_free_games=1`;
|
|
155
|
+
const data = await fetchJson(url);
|
|
156
|
+
const { response } = data;
|
|
157
|
+
if (!response || !response.games) {
|
|
158
|
+
return (`No games found for SteamID ${steamid}.\n` +
|
|
159
|
+
`Possible reasons:\n` +
|
|
160
|
+
` • The profile is private\n` +
|
|
161
|
+
` • The SteamID is invalid\n` +
|
|
162
|
+
` • The account owns no games`);
|
|
163
|
+
}
|
|
164
|
+
const games = [...response.games];
|
|
165
|
+
if (sortBy === "playtime") {
|
|
166
|
+
games.sort((a, b) => b.playtime_forever - a.playtime_forever);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
games.sort((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
|
|
170
|
+
}
|
|
171
|
+
const totalHours = Math.floor(games.reduce((s, g) => s + g.playtime_forever, 0) / 60);
|
|
172
|
+
const top = games.slice(0, 25).map((g, i) => {
|
|
173
|
+
const playtime = minutesToHours(g.playtime_forever);
|
|
174
|
+
const recent = g.playtime_2weeks != null && g.playtime_2weeks > 0
|
|
175
|
+
? ` (${minutesToHours(g.playtime_2weeks)} last 2 weeks)`
|
|
176
|
+
: "";
|
|
177
|
+
return `${String(i + 1).padStart(2)}. **${g.name ?? `AppID ${g.appid}`}** — ${playtime}${recent}`;
|
|
178
|
+
});
|
|
179
|
+
return [
|
|
180
|
+
`## Owned games for SteamID ${steamid}`,
|
|
181
|
+
``,
|
|
182
|
+
`**Total games:** ${response.game_count ?? games.length}`,
|
|
183
|
+
`**Total playtime:** ${totalHours.toLocaleString()} hours`,
|
|
184
|
+
``,
|
|
185
|
+
`### Top ${top.length} games (sorted by ${sortBy}):`,
|
|
186
|
+
...top,
|
|
187
|
+
games.length > 25
|
|
188
|
+
? `\n_… and ${games.length - 25} more games not shown._`
|
|
189
|
+
: "",
|
|
190
|
+
].join("\n");
|
|
191
|
+
}
|
|
192
|
+
// ── Server setup ─────────────────────────────────────────────────────────────
|
|
193
|
+
const server = new McpServer({
|
|
194
|
+
name: "mcp-steam",
|
|
195
|
+
version: "1.0.0",
|
|
196
|
+
});
|
|
197
|
+
server.tool("search_games", "Search for games on Steam by name or keyword. Returns a list of matching games with AppIDs, prices, and platform info.", {
|
|
198
|
+
query: z.string().min(1).max(200).describe("Search query (game name or keyword)"),
|
|
199
|
+
limit: z
|
|
200
|
+
.number()
|
|
201
|
+
.int()
|
|
202
|
+
.min(1)
|
|
203
|
+
.max(20)
|
|
204
|
+
.default(5)
|
|
205
|
+
.describe("Maximum number of results to return (default: 5, max: 20)"),
|
|
206
|
+
}, async ({ query, limit }) => {
|
|
207
|
+
try {
|
|
208
|
+
const text = await searchGames(query, limit);
|
|
209
|
+
return { content: [{ type: "text", text }] };
|
|
210
|
+
}
|
|
211
|
+
catch (err) {
|
|
212
|
+
return {
|
|
213
|
+
content: [{ type: "text", text: `Error searching games: ${err.message}` }],
|
|
214
|
+
isError: true,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
server.tool("get_game_details", "Get detailed information about a Steam game by its AppID: price, description, reviews, Metacritic score, genres, platforms, and more.", {
|
|
219
|
+
appid: z
|
|
220
|
+
.number()
|
|
221
|
+
.int()
|
|
222
|
+
.positive()
|
|
223
|
+
.max(9_999_999)
|
|
224
|
+
.describe("Steam AppID of the game (e.g. 570 for Dota 2, 730 for CS2)"),
|
|
225
|
+
}, async ({ appid }) => {
|
|
226
|
+
try {
|
|
227
|
+
const text = await getGameDetails(appid);
|
|
228
|
+
return { content: [{ type: "text", text }] };
|
|
229
|
+
}
|
|
230
|
+
catch (err) {
|
|
231
|
+
return {
|
|
232
|
+
content: [{ type: "text", text: `Error fetching game details: ${err.message}` }],
|
|
233
|
+
isError: true,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
server.tool("get_owned_games", "List all Steam games owned by a player using their 64-bit SteamID. Requires a Steam API key. The player's profile must be public.", {
|
|
238
|
+
steamid: z
|
|
239
|
+
.string()
|
|
240
|
+
.regex(/^\d{17}$/, "SteamID must be a 17-digit number")
|
|
241
|
+
.describe("64-bit SteamID of the player (e.g. 76561198000000000)"),
|
|
242
|
+
sort_by: z
|
|
243
|
+
.enum(["playtime", "name"])
|
|
244
|
+
.default("playtime")
|
|
245
|
+
.describe("Sort results by 'playtime' (most played first) or 'name' (alphabetical)"),
|
|
246
|
+
}, async ({ steamid, sort_by }) => {
|
|
247
|
+
try {
|
|
248
|
+
const text = await getOwnedGames(steamid, sort_by);
|
|
249
|
+
return { content: [{ type: "text", text }] };
|
|
250
|
+
}
|
|
251
|
+
catch (err) {
|
|
252
|
+
return {
|
|
253
|
+
content: [{ type: "text", text: `Error fetching owned games: ${err.message}` }],
|
|
254
|
+
isError: true,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
// ── Entry point ───────────────────────────────────────────────────────────────
|
|
259
|
+
async function main() {
|
|
260
|
+
const transport = new StdioServerTransport();
|
|
261
|
+
await server.connect(transport);
|
|
262
|
+
console.error("mcp-steam server running on stdio");
|
|
263
|
+
}
|
|
264
|
+
main().catch((err) => {
|
|
265
|
+
// Log only the message, not the full error object, to avoid leaking stack traces or URLs.
|
|
266
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
267
|
+
console.error("Fatal error:", message);
|
|
268
|
+
process.exit(1);
|
|
269
|
+
});
|
|
270
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;AACtD,MAAM,SAAS,GAAG,oCAAoC,CAAC;AACvD,MAAM,SAAS,GAAG,8BAA8B,CAAC;AAEjD,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,kBAAkB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO;AAyCnD,gFAAgF;AAEhF,SAAS,cAAc,CAAC,OAAe;IACrC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,MAAM,CAAC;IAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACnC,MAAM,CAAC,GAAG,OAAO,GAAG,EAAE,CAAC;IACvB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;AAC3C,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,SAAS,WAAW,CAAC,MAAc;IACjC,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,G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AY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@naouts/mcp-steam",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for the Steam API with game search, reviews, details, and owned games by SteamID",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"steam",
|
|
8
|
+
"gaming",
|
|
9
|
+
"model-context-protocol",
|
|
10
|
+
"ai"
|
|
11
|
+
],
|
|
12
|
+
"author": "naouts",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"homepage": "https://github.com/naouts/mcp-steam#readme",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/naouts/mcp-steam.git"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/naouts/mcp-steam/issues"
|
|
21
|
+
},
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "dist/index.js",
|
|
24
|
+
"bin": {
|
|
25
|
+
"mcp-steam": "dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc",
|
|
32
|
+
"dev": "node --watch dist/index.js",
|
|
33
|
+
"prepare": "npm run build",
|
|
34
|
+
"start": "node dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@modelcontextprotocol/sdk": "^1.12.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^22.0.0",
|
|
41
|
+
"typescript": "^5.8.0"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=18"
|
|
45
|
+
}
|
|
46
|
+
}
|