@mrfentmen/steam-mcp 1.0.0 → 1.0.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/README.md +28 -4
- package/dist/server.js +27 -10
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# steam
|
|
1
|
+
# steam mcp
|
|
2
2
|
|
|
3
3
|
Steam store search, prices and discounts, app details, and game news.
|
|
4
4
|
Uses Steam's keyless store + news endpoints.
|
|
5
5
|
|
|
6
6
|
## Tools
|
|
7
7
|
|
|
8
|
-
- `search_games
|
|
9
|
-
- `get_game_details
|
|
10
|
-
- `get_game_news
|
|
8
|
+
- `search_games`, store search with current prices / discount percentages
|
|
9
|
+
- `get_game_details`, price, release date, developers, genres, Metacritic, blurb
|
|
10
|
+
- `get_game_news`, recent Steam news posts for a game
|
|
11
11
|
|
|
12
12
|
## Run
|
|
13
13
|
|
|
@@ -22,3 +22,27 @@ npm install && npm run build && node dist/index.js
|
|
|
22
22
|
|
|
23
23
|
> "What's new for Cyberpunk?"
|
|
24
24
|
> `get_game_news(1091500)`
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install
|
|
30
|
+
npm run build
|
|
31
|
+
node dist/index.js
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The server uses stdio, so it can be connected to Claude Desktop, Cursor, VS Code, MCP Inspector, or another compatible MCP client.
|
|
35
|
+
|
|
36
|
+
## Tools at a glance
|
|
37
|
+
|
|
38
|
+
- `search_games`: Search the Steam store by title. Returns appids with current prices
|
|
39
|
+
- `get_game_details`: Get details for a Steam app: price/discount, release date,
|
|
40
|
+
- `get_game_news`: Fetch recent Steam news posts for a game.
|
|
41
|
+
|
|
42
|
+
## Limits and privacy
|
|
43
|
+
|
|
44
|
+
This project is intentionally narrow. It should be treated as a practical helper, not a complete certification or security audit. Check the implementation and the returned data before using it with sensitive material. No credentials are required unless the project explicitly says otherwise.
|
|
45
|
+
|
|
46
|
+
## Try it
|
|
47
|
+
|
|
48
|
+
After building, connect the server through your MCP client. The repository root also contains `smoke-test.mjs` for projects covered by the shared harness. A typical tool call starts with `search_games`.
|
package/dist/server.js
CHANGED
|
@@ -2,13 +2,20 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { SteamError, formatAppDetail, formatStoreItem, getAppDetail, getNews, searchStore, } from "./api.js";
|
|
4
4
|
const text = (t) => ({ content: [{ type: "text", text: t }] });
|
|
5
|
+
const textError = (t) => ({ content: [{ type: "text", text: t }], isError: true });
|
|
6
|
+
const READ_ONLY = { readOnlyHint: true, openWorldHint: true };
|
|
5
7
|
export function createServer() {
|
|
6
8
|
const server = new McpServer({
|
|
7
9
|
name: "steam-mcp",
|
|
8
10
|
version: "1.0.0",
|
|
9
11
|
});
|
|
10
|
-
server.
|
|
11
|
-
|
|
12
|
+
server.registerTool("search_games", {
|
|
13
|
+
title: "Search games",
|
|
14
|
+
description: "Search the Steam store by title. Returns appids with current prices " +
|
|
15
|
+
"and discounts.",
|
|
16
|
+
inputSchema: z.object({ query: z.string().describe("Game title, e.g. 'Helldivers' or 'Baldur'") }),
|
|
17
|
+
annotations: READ_ONLY,
|
|
18
|
+
}, async ({ query }) => {
|
|
12
19
|
try {
|
|
13
20
|
const items = await searchStore(query);
|
|
14
21
|
if (items.length === 0)
|
|
@@ -17,11 +24,16 @@ export function createServer() {
|
|
|
17
24
|
items.map((i, n) => `${n + 1}. ${formatStoreItem(i)}`).join("\n"));
|
|
18
25
|
}
|
|
19
26
|
catch (e) {
|
|
20
|
-
return
|
|
27
|
+
return textError(errorMessage(e));
|
|
21
28
|
}
|
|
22
29
|
});
|
|
23
|
-
server.
|
|
24
|
-
|
|
30
|
+
server.registerTool("get_game_details", {
|
|
31
|
+
title: "Get game details",
|
|
32
|
+
description: "Get details for a Steam app: price/discount, release date, " +
|
|
33
|
+
"developers, genres, Metacritic, description.",
|
|
34
|
+
inputSchema: z.object({ appid: z.number().int().describe("Steam app id from search_games") }),
|
|
35
|
+
annotations: READ_ONLY,
|
|
36
|
+
}, async ({ appid }) => {
|
|
25
37
|
try {
|
|
26
38
|
const detail = await getAppDetail(appid);
|
|
27
39
|
if (!detail)
|
|
@@ -29,12 +41,17 @@ export function createServer() {
|
|
|
29
41
|
return text(formatAppDetail(detail));
|
|
30
42
|
}
|
|
31
43
|
catch (e) {
|
|
32
|
-
return
|
|
44
|
+
return textError(errorMessage(e));
|
|
33
45
|
}
|
|
34
46
|
});
|
|
35
|
-
server.
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
server.registerTool("get_game_news", {
|
|
48
|
+
title: "Get game news",
|
|
49
|
+
description: "Fetch recent Steam news posts for a game.",
|
|
50
|
+
inputSchema: z.object({
|
|
51
|
+
appid: z.number().int().describe("Steam app id"),
|
|
52
|
+
count: z.number().int().min(1).max(20).default(5).describe("Number of posts"),
|
|
53
|
+
}),
|
|
54
|
+
annotations: READ_ONLY,
|
|
38
55
|
}, async ({ appid, count }) => {
|
|
39
56
|
try {
|
|
40
57
|
const news = await getNews(appid, count);
|
|
@@ -49,7 +66,7 @@ export function createServer() {
|
|
|
49
66
|
.join("\n\n"));
|
|
50
67
|
}
|
|
51
68
|
catch (e) {
|
|
52
|
-
return
|
|
69
|
+
return textError(errorMessage(e));
|
|
53
70
|
}
|
|
54
71
|
});
|
|
55
72
|
return server;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrfentmen/steam-mcp",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "MCP server
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Use this MCP server to Steam, store search, prices and discounts, app details, and game news. Tools include search games, get game details, get game news",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"mcpName": "io.github.mrfentmen/steam-mcp",
|
|
7
7
|
"repository": {
|
|
@@ -37,5 +37,8 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.0.0",
|
|
39
39
|
"typescript": "^5.6.0"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=20"
|
|
40
43
|
}
|
|
41
44
|
}
|