igdb-mcp-server 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 +129 -0
- package/dist/igdb-client.d.ts +64 -0
- package/dist/igdb-client.d.ts.map +1 -0
- package/dist/igdb-client.js +99 -0
- package/dist/igdb-client.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +262 -0
- package/dist/index.js.map +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
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,129 @@
|
|
|
1
|
+
# IGDB MCP Server
|
|
2
|
+
|
|
3
|
+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that provides access to the [IGDB (Internet Game Database)](https://www.igdb.com/) API. This allows AI assistants like Claude to search for games and retrieve detailed game information.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **search_games** - Search for games by name, returning basic info including ratings, genres, platforms, and release dates
|
|
8
|
+
- **get_game_details** - Get comprehensive details about a specific game including storyline, themes, and similar games
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
You need IGDB API credentials to use this server. IGDB uses Twitch authentication:
|
|
13
|
+
|
|
14
|
+
1. Create a Twitch account at https://dev.twitch.tv/
|
|
15
|
+
2. Register a new application in the Twitch Developer Console
|
|
16
|
+
3. Note your **Client ID** and generate a **Client Secret**
|
|
17
|
+
|
|
18
|
+
For detailed instructions, see the [IGDB API documentation](https://api-docs.igdb.com/#account-creation).
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
### Using npx (recommended)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx igdb-mcp-server
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### From source
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git clone https://github.com/yourusername/igdb-mcp-server.git
|
|
32
|
+
cd igdb-mcp-server
|
|
33
|
+
npm install
|
|
34
|
+
npm run build
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Configuration
|
|
38
|
+
|
|
39
|
+
### Environment Variables
|
|
40
|
+
|
|
41
|
+
Set the following environment variables:
|
|
42
|
+
|
|
43
|
+
- `IGDB_CLIENT_ID` - Your Twitch/IGDB Client ID
|
|
44
|
+
- `IGDB_CLIENT_SECRET` - Your Twitch/IGDB Client Secret
|
|
45
|
+
|
|
46
|
+
### Claude Desktop / Claude Code
|
|
47
|
+
|
|
48
|
+
Add to your MCP configuration file (`.mcp.json` or `claude_desktop_config.json`):
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"igdb": {
|
|
54
|
+
"type": "stdio",
|
|
55
|
+
"command": "npx",
|
|
56
|
+
"args": ["-y", "igdb-mcp-server"],
|
|
57
|
+
"env": {
|
|
58
|
+
"IGDB_CLIENT_ID": "your-client-id",
|
|
59
|
+
"IGDB_CLIENT_SECRET": "your-client-secret"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or if running from source:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"igdb": {
|
|
72
|
+
"type": "stdio",
|
|
73
|
+
"command": "node",
|
|
74
|
+
"args": ["/path/to/igdb-mcp-server/dist/index.js"],
|
|
75
|
+
"env": {
|
|
76
|
+
"IGDB_CLIENT_ID": "your-client-id",
|
|
77
|
+
"IGDB_CLIENT_SECRET": "your-client-secret"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Tools
|
|
85
|
+
|
|
86
|
+
### search_games
|
|
87
|
+
|
|
88
|
+
Search for games in the IGDB database.
|
|
89
|
+
|
|
90
|
+
**Parameters:**
|
|
91
|
+
- `query` (required): The game name or search query
|
|
92
|
+
- `limit` (optional): Maximum results to return (default: 10, max: 50)
|
|
93
|
+
|
|
94
|
+
**Example:**
|
|
95
|
+
```
|
|
96
|
+
Search IGDB for "Final Fantasy Tactics"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### get_game_details
|
|
100
|
+
|
|
101
|
+
Get detailed information about a specific game.
|
|
102
|
+
|
|
103
|
+
**Parameters:**
|
|
104
|
+
- `game_id` (required): The IGDB game ID
|
|
105
|
+
|
|
106
|
+
**Example:**
|
|
107
|
+
```
|
|
108
|
+
Get details for IGDB game ID 1920
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Development
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Install dependencies
|
|
115
|
+
npm install
|
|
116
|
+
|
|
117
|
+
# Build
|
|
118
|
+
npm run build
|
|
119
|
+
|
|
120
|
+
# Run locally
|
|
121
|
+
npm start
|
|
122
|
+
|
|
123
|
+
# Test with MCP Inspector
|
|
124
|
+
npx @modelcontextprotocol/inspector node dist/index.js
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
MIT
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IGDB API Client with Twitch OAuth2 authentication
|
|
3
|
+
*/
|
|
4
|
+
export interface Game {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
summary?: string;
|
|
8
|
+
storyline?: string;
|
|
9
|
+
rating?: number;
|
|
10
|
+
aggregated_rating?: number;
|
|
11
|
+
first_release_date?: number;
|
|
12
|
+
genres?: Array<{
|
|
13
|
+
id: number;
|
|
14
|
+
name: string;
|
|
15
|
+
}>;
|
|
16
|
+
platforms?: Array<{
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
}>;
|
|
20
|
+
themes?: Array<{
|
|
21
|
+
id: number;
|
|
22
|
+
name: string;
|
|
23
|
+
}>;
|
|
24
|
+
game_modes?: Array<{
|
|
25
|
+
id: number;
|
|
26
|
+
name: string;
|
|
27
|
+
}>;
|
|
28
|
+
involved_companies?: Array<{
|
|
29
|
+
company: {
|
|
30
|
+
id: number;
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
similar_games?: Array<{
|
|
35
|
+
id: number;
|
|
36
|
+
name: string;
|
|
37
|
+
}>;
|
|
38
|
+
cover?: {
|
|
39
|
+
url: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export declare class IGDBClient {
|
|
43
|
+
private clientId;
|
|
44
|
+
private clientSecret;
|
|
45
|
+
private tokenData;
|
|
46
|
+
constructor();
|
|
47
|
+
/**
|
|
48
|
+
* Get a valid OAuth token, refreshing if necessary
|
|
49
|
+
*/
|
|
50
|
+
private getToken;
|
|
51
|
+
/**
|
|
52
|
+
* Make a request to the IGDB API
|
|
53
|
+
*/
|
|
54
|
+
private request;
|
|
55
|
+
/**
|
|
56
|
+
* Search for games by name
|
|
57
|
+
*/
|
|
58
|
+
searchGames(query: string, limit?: number): Promise<Game[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Get detailed information about a specific game
|
|
61
|
+
*/
|
|
62
|
+
getGameDetails(gameId: number): Promise<Game | null>;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=igdb-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"igdb-client.d.ts","sourceRoot":"","sources":["../src/igdb-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChD,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,kBAAkB,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IACtE,aAAa,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,KAAK,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CACzB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,SAAS,CAA0B;;IAgB3C;;OAEG;YACW,QAAQ;IAiCtB;;OAEG;YACW,OAAO;IAqBrB;;OAEG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAcrE;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;CAe3D"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IGDB API Client with Twitch OAuth2 authentication
|
|
3
|
+
*/
|
|
4
|
+
export class IGDBClient {
|
|
5
|
+
clientId;
|
|
6
|
+
clientSecret;
|
|
7
|
+
tokenData = null;
|
|
8
|
+
constructor() {
|
|
9
|
+
const clientId = process.env.IGDB_CLIENT_ID;
|
|
10
|
+
const clientSecret = process.env.IGDB_CLIENT_SECRET;
|
|
11
|
+
if (!clientId || !clientSecret) {
|
|
12
|
+
throw new Error("Missing IGDB credentials. Please set IGDB_CLIENT_ID and IGDB_CLIENT_SECRET environment variables.");
|
|
13
|
+
}
|
|
14
|
+
this.clientId = clientId;
|
|
15
|
+
this.clientSecret = clientSecret;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Get a valid OAuth token, refreshing if necessary
|
|
19
|
+
*/
|
|
20
|
+
async getToken() {
|
|
21
|
+
// Check if we have a valid token (with 5 minute buffer)
|
|
22
|
+
if (this.tokenData && Date.now() < this.tokenData.expiresAt - 300000) {
|
|
23
|
+
return this.tokenData.token;
|
|
24
|
+
}
|
|
25
|
+
// Get a new token
|
|
26
|
+
const url = "https://id.twitch.tv/oauth2/token";
|
|
27
|
+
const params = new URLSearchParams({
|
|
28
|
+
client_id: this.clientId,
|
|
29
|
+
client_secret: this.clientSecret,
|
|
30
|
+
grant_type: "client_credentials",
|
|
31
|
+
});
|
|
32
|
+
const response = await fetch(`${url}?${params}`, {
|
|
33
|
+
method: "POST",
|
|
34
|
+
});
|
|
35
|
+
if (!response.ok) {
|
|
36
|
+
const errorText = await response.text();
|
|
37
|
+
throw new Error(`Failed to authenticate with Twitch: ${response.status} ${errorText}`);
|
|
38
|
+
}
|
|
39
|
+
const data = await response.json();
|
|
40
|
+
this.tokenData = {
|
|
41
|
+
token: data.access_token,
|
|
42
|
+
expiresAt: Date.now() + data.expires_in * 1000,
|
|
43
|
+
};
|
|
44
|
+
return this.tokenData.token;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Make a request to the IGDB API
|
|
48
|
+
*/
|
|
49
|
+
async request(endpoint, body) {
|
|
50
|
+
const token = await this.getToken();
|
|
51
|
+
const response = await fetch(`https://api.igdb.com/v4/${endpoint}`, {
|
|
52
|
+
method: "POST",
|
|
53
|
+
headers: {
|
|
54
|
+
"Client-ID": this.clientId,
|
|
55
|
+
Authorization: `Bearer ${token}`,
|
|
56
|
+
"Content-Type": "text/plain",
|
|
57
|
+
},
|
|
58
|
+
body,
|
|
59
|
+
});
|
|
60
|
+
if (!response.ok) {
|
|
61
|
+
const errorText = await response.text();
|
|
62
|
+
throw new Error(`IGDB API error: ${response.status} ${errorText}`);
|
|
63
|
+
}
|
|
64
|
+
return response.json();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Search for games by name
|
|
68
|
+
*/
|
|
69
|
+
async searchGames(query, limit = 10) {
|
|
70
|
+
const body = `
|
|
71
|
+
search "${query.replace(/"/g, '\\"')}";
|
|
72
|
+
fields name, summary, rating, aggregated_rating,
|
|
73
|
+
genres.name, platforms.name,
|
|
74
|
+
first_release_date, cover.url,
|
|
75
|
+
involved_companies.company.name;
|
|
76
|
+
limit ${limit};
|
|
77
|
+
`;
|
|
78
|
+
const games = await this.request("games", body);
|
|
79
|
+
return games;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get detailed information about a specific game
|
|
83
|
+
*/
|
|
84
|
+
async getGameDetails(gameId) {
|
|
85
|
+
const body = `
|
|
86
|
+
where id = ${gameId};
|
|
87
|
+
fields name, summary, storyline, rating, aggregated_rating,
|
|
88
|
+
genres.name, themes.name, platforms.name,
|
|
89
|
+
first_release_date, cover.url,
|
|
90
|
+
involved_companies.company.name,
|
|
91
|
+
similar_games.name, similar_games.id,
|
|
92
|
+
game_modes.name;
|
|
93
|
+
`;
|
|
94
|
+
const games = await this.request("games", body);
|
|
95
|
+
const gameArray = games;
|
|
96
|
+
return gameArray.length > 0 ? gameArray[0] : null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=igdb-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"igdb-client.js","sourceRoot":"","sources":["../src/igdb-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AA8BH,MAAM,OAAO,UAAU;IACb,QAAQ,CAAS;IACjB,YAAY,CAAS;IACrB,SAAS,GAAqB,IAAI,CAAC;IAE3C;QACE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;QAC5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,GAAG,KAAe,CAAC;QAClC,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACpD,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* IGDB MCP Server
|
|
4
|
+
*
|
|
5
|
+
* A Model Context Protocol server that provides access to the IGDB (Internet Game Database) API.
|
|
6
|
+
* Supports searching for games and getting detailed game information.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* IGDB MCP Server
|
|
4
|
+
*
|
|
5
|
+
* A Model Context Protocol server that provides access to the IGDB (Internet Game Database) API.
|
|
6
|
+
* Supports searching for games and getting detailed game information.
|
|
7
|
+
*/
|
|
8
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
9
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
10
|
+
import { ListToolsRequestSchema, CallToolRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
11
|
+
import { IGDBClient } from "./igdb-client.js";
|
|
12
|
+
// Initialize the IGDB client
|
|
13
|
+
let igdbClient;
|
|
14
|
+
try {
|
|
15
|
+
igdbClient = new IGDBClient();
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
console.error("Error initializing IGDB client:", error);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
// Create the MCP server
|
|
22
|
+
const server = new Server({
|
|
23
|
+
name: "igdb-mcp-server",
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
}, {
|
|
26
|
+
capabilities: {
|
|
27
|
+
tools: {},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Format a game for display
|
|
32
|
+
*/
|
|
33
|
+
function formatGame(game) {
|
|
34
|
+
const lines = [];
|
|
35
|
+
lines.push(`**${game.name}** (ID: ${game.id})`);
|
|
36
|
+
if (game.rating) {
|
|
37
|
+
lines.push(`Rating: ${game.rating.toFixed(1)}/100`);
|
|
38
|
+
}
|
|
39
|
+
if (game.aggregated_rating) {
|
|
40
|
+
lines.push(`Critic Rating: ${game.aggregated_rating.toFixed(1)}/100`);
|
|
41
|
+
}
|
|
42
|
+
if (game.first_release_date) {
|
|
43
|
+
const date = new Date(game.first_release_date * 1000);
|
|
44
|
+
lines.push(`Released: ${date.toLocaleDateString()}`);
|
|
45
|
+
}
|
|
46
|
+
if (game.genres && game.genres.length > 0) {
|
|
47
|
+
const genreNames = game.genres.map((g) => g.name).join(", ");
|
|
48
|
+
lines.push(`Genres: ${genreNames}`);
|
|
49
|
+
}
|
|
50
|
+
if (game.platforms && game.platforms.length > 0) {
|
|
51
|
+
const platformNames = game.platforms.map((p) => p.name).join(", ");
|
|
52
|
+
lines.push(`Platforms: ${platformNames}`);
|
|
53
|
+
}
|
|
54
|
+
if (game.summary) {
|
|
55
|
+
lines.push(`\nSummary: ${game.summary}`);
|
|
56
|
+
}
|
|
57
|
+
return lines.join("\n");
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Format detailed game information
|
|
61
|
+
*/
|
|
62
|
+
function formatGameDetails(game) {
|
|
63
|
+
const lines = [];
|
|
64
|
+
lines.push(`# ${game.name}`);
|
|
65
|
+
lines.push(`**IGDB ID:** ${game.id}`);
|
|
66
|
+
lines.push("");
|
|
67
|
+
if (game.rating) {
|
|
68
|
+
lines.push(`**User Rating:** ${game.rating.toFixed(1)}/100`);
|
|
69
|
+
}
|
|
70
|
+
if (game.aggregated_rating) {
|
|
71
|
+
lines.push(`**Critic Rating:** ${game.aggregated_rating.toFixed(1)}/100`);
|
|
72
|
+
}
|
|
73
|
+
if (game.first_release_date) {
|
|
74
|
+
const date = new Date(game.first_release_date * 1000);
|
|
75
|
+
lines.push(`**Released:** ${date.toLocaleDateString()}`);
|
|
76
|
+
}
|
|
77
|
+
lines.push("");
|
|
78
|
+
if (game.genres && game.genres.length > 0) {
|
|
79
|
+
const genreNames = game.genres.map((g) => g.name).join(", ");
|
|
80
|
+
lines.push(`**Genres:** ${genreNames}`);
|
|
81
|
+
}
|
|
82
|
+
if (game.themes && game.themes.length > 0) {
|
|
83
|
+
const themeNames = game.themes.map((t) => t.name).join(", ");
|
|
84
|
+
lines.push(`**Themes:** ${themeNames}`);
|
|
85
|
+
}
|
|
86
|
+
if (game.platforms && game.platforms.length > 0) {
|
|
87
|
+
const platformNames = game.platforms.map((p) => p.name).join(", ");
|
|
88
|
+
lines.push(`**Platforms:** ${platformNames}`);
|
|
89
|
+
}
|
|
90
|
+
if (game.game_modes && game.game_modes.length > 0) {
|
|
91
|
+
const modeNames = game.game_modes.map((m) => m.name).join(", ");
|
|
92
|
+
lines.push(`**Game Modes:** ${modeNames}`);
|
|
93
|
+
}
|
|
94
|
+
if (game.involved_companies && game.involved_companies.length > 0) {
|
|
95
|
+
const companyNames = game.involved_companies.map((c) => c.company.name).join(", ");
|
|
96
|
+
lines.push(`**Companies:** ${companyNames}`);
|
|
97
|
+
}
|
|
98
|
+
lines.push("");
|
|
99
|
+
if (game.summary) {
|
|
100
|
+
lines.push("## Summary");
|
|
101
|
+
lines.push(game.summary);
|
|
102
|
+
lines.push("");
|
|
103
|
+
}
|
|
104
|
+
if (game.storyline) {
|
|
105
|
+
lines.push("## Storyline");
|
|
106
|
+
lines.push(game.storyline);
|
|
107
|
+
lines.push("");
|
|
108
|
+
}
|
|
109
|
+
if (game.similar_games && game.similar_games.length > 0) {
|
|
110
|
+
lines.push("## Similar Games");
|
|
111
|
+
for (const similar of game.similar_games) {
|
|
112
|
+
lines.push(`- ${similar.name} (ID: ${similar.id})`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return lines.join("\n");
|
|
116
|
+
}
|
|
117
|
+
// Register the tools
|
|
118
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
119
|
+
return {
|
|
120
|
+
tools: [
|
|
121
|
+
{
|
|
122
|
+
name: "search_games",
|
|
123
|
+
description: "Search for games in the IGDB database by name. Returns a list of matching games with basic information including name, rating, genres, platforms, and release date.",
|
|
124
|
+
inputSchema: {
|
|
125
|
+
type: "object",
|
|
126
|
+
properties: {
|
|
127
|
+
query: {
|
|
128
|
+
type: "string",
|
|
129
|
+
description: "The game name or search query to look for",
|
|
130
|
+
},
|
|
131
|
+
limit: {
|
|
132
|
+
type: "number",
|
|
133
|
+
description: "Maximum number of results to return (default: 10, max: 50)",
|
|
134
|
+
default: 10,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
required: ["query"],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "get_game_details",
|
|
142
|
+
description: "Get detailed information about a specific game by its IGDB ID. Returns comprehensive details including storyline, themes, similar games, and more.",
|
|
143
|
+
inputSchema: {
|
|
144
|
+
type: "object",
|
|
145
|
+
properties: {
|
|
146
|
+
game_id: {
|
|
147
|
+
type: "number",
|
|
148
|
+
description: "The IGDB game ID",
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
required: ["game_id"],
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
});
|
|
157
|
+
// Handle tool calls
|
|
158
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
159
|
+
const { name, arguments: args } = request.params;
|
|
160
|
+
try {
|
|
161
|
+
if (name === "search_games") {
|
|
162
|
+
const query = args?.query;
|
|
163
|
+
const limit = Math.min(args?.limit || 10, 50);
|
|
164
|
+
if (!query) {
|
|
165
|
+
return {
|
|
166
|
+
content: [
|
|
167
|
+
{
|
|
168
|
+
type: "text",
|
|
169
|
+
text: "Error: query parameter is required",
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
isError: true,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
const games = await igdbClient.searchGames(query, limit);
|
|
176
|
+
if (games.length === 0) {
|
|
177
|
+
return {
|
|
178
|
+
content: [
|
|
179
|
+
{
|
|
180
|
+
type: "text",
|
|
181
|
+
text: `No games found matching "${query}"`,
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
const formattedGames = games.map(formatGame).join("\n\n---\n\n");
|
|
187
|
+
return {
|
|
188
|
+
content: [
|
|
189
|
+
{
|
|
190
|
+
type: "text",
|
|
191
|
+
text: `Found ${games.length} game(s) matching "${query}":\n\n${formattedGames}`,
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
if (name === "get_game_details") {
|
|
197
|
+
const gameId = args?.game_id;
|
|
198
|
+
if (!gameId) {
|
|
199
|
+
return {
|
|
200
|
+
content: [
|
|
201
|
+
{
|
|
202
|
+
type: "text",
|
|
203
|
+
text: "Error: game_id parameter is required",
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
isError: true,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
const game = await igdbClient.getGameDetails(gameId);
|
|
210
|
+
if (!game) {
|
|
211
|
+
return {
|
|
212
|
+
content: [
|
|
213
|
+
{
|
|
214
|
+
type: "text",
|
|
215
|
+
text: `No game found with ID ${gameId}`,
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
return {
|
|
221
|
+
content: [
|
|
222
|
+
{
|
|
223
|
+
type: "text",
|
|
224
|
+
text: formatGameDetails(game),
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
return {
|
|
230
|
+
content: [
|
|
231
|
+
{
|
|
232
|
+
type: "text",
|
|
233
|
+
text: `Unknown tool: ${name}`,
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
isError: true,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
catch (error) {
|
|
240
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
241
|
+
return {
|
|
242
|
+
content: [
|
|
243
|
+
{
|
|
244
|
+
type: "text",
|
|
245
|
+
text: `Error: ${errorMessage}`,
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
isError: true,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
// Start the server
|
|
253
|
+
async function main() {
|
|
254
|
+
const transport = new StdioServerTransport();
|
|
255
|
+
await server.connect(transport);
|
|
256
|
+
console.error("IGDB MCP Server running on stdio");
|
|
257
|
+
}
|
|
258
|
+
main().catch((error) => {
|
|
259
|
+
console.error("Fatal error:", error);
|
|
260
|
+
process.exit(1);
|
|
261
|
+
});
|
|
262
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GAEtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAQ,MAAM,kBAAkB,CAAC;AAEpD,6BAA6B;AAC7B,IAAI,UAAsB,CAAC;AAE3B,IAAI,CAAC;IACH,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;AAChC,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,KAA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
|
|
1
|
+
{
|
|
2
|
+
"name": "igdb-mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for the IGDB (Internet Game Database) API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"igdb-mcp-server": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"start": "node dist/index.js",
|
|
13
|
+
"dev": "tsc && node dist/index.js",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"mcp",
|
|
18
|
+
"igdb",
|
|
19
|
+
"games",
|
|
20
|
+
"api",
|
|
21
|
+
"model-context-protocol",
|
|
22
|
+
"twitch",
|
|
23
|
+
"game-database",
|
|
24
|
+
"claude",
|
|
25
|
+
"ai"
|
|
26
|
+
],
|
|
27
|
+
"author": "tbonderenka",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/tbonderenka/igdb-mcp-server.git"
|
|
32
|
+
},
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/tbonderenka/igdb-mcp-server/issues"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/tbonderenka/igdb-mcp-server#readme",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^20.0.0",
|
|
42
|
+
"typescript": "^5.4.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"dist",
|
|
49
|
+
"README.md",
|
|
50
|
+
"LICENSE"
|
|
51
|
+
]
|
|
52
|
+
}
|