toolsgambling-mcp 0.0.0-stage → 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 +73 -2
- package/glama.json +6 -0
- package/index.mjs +149 -0
- package/package.json +38 -4
- package/server.json +28 -0
- package/smithery.yaml +15 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Evgeniy Volkov
|
|
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
CHANGED
|
@@ -1,3 +1,74 @@
|
|
|
1
|
-
#
|
|
1
|
+
# toolsgambling-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Zero-dependency Model Context Protocol (MCP) bridge for the read-only ToolsGambling Slot RTP and Casino Operator Audit server (`https://toolsgambling.com/mcp`).
|
|
4
|
+
|
|
5
|
+
Covers 3,968 verified slot releases across 27 registered studio scrapers and 27 audited casino storefronts across 17 market feeds (US-NJ, UK, SE, DK, DE, NL, PT, FI, IT, ES, BE, RO, MT, EE, IE, GR, INTL), 20,198 catalog observations, and 101 verified cross-casino RTP splits with SHA-256 source receipts under `CC BY 4.0`.
|
|
6
|
+
|
|
7
|
+
## Official MCP Registry & Discovery
|
|
8
|
+
|
|
9
|
+
- Registry ID: `io.github.vei66rus/toolsgambling-mcp`
|
|
10
|
+
- Public Bridge Repository: `https://github.com/vei66rus/toolsgambling-mcp`
|
|
11
|
+
- Discovery Card: `https://toolsgambling.com/.well-known/mcp.json`
|
|
12
|
+
- OpenAPI 3.1.0 Specification: `https://toolsgambling.com/openapi-rtp.json`
|
|
13
|
+
- LLM Citation Index: `https://toolsgambling.com/llms.txt`
|
|
14
|
+
|
|
15
|
+
## Available Read-Only Tools
|
|
16
|
+
|
|
17
|
+
- `get_methodology`: Dataset scope, limitations, and collection snapshot dates
|
|
18
|
+
- `search_rtp`: Find slots by title (returns bounded summary rows)
|
|
19
|
+
- `get_rtp`: Full certified RTP build specification with SHA-256 verification receipt link
|
|
20
|
+
- `get_operator_rtp`: Observed RTP audits across regulated markets (`?slug` or market overview)
|
|
21
|
+
- `compare_operators`: Head-to-head RTP comparison across two audited operator brands
|
|
22
|
+
- `calculate_expected_loss`: Long-run mathematical house-edge and wagering expectation calculator
|
|
23
|
+
|
|
24
|
+
## Streamable HTTP (Direct)
|
|
25
|
+
|
|
26
|
+
- Endpoint: `https://toolsgambling.com/mcp`
|
|
27
|
+
- Discovery metadata: `https://toolsgambling.com/.well-known/mcp.json`
|
|
28
|
+
- OpenAPI specification: `https://toolsgambling.com/openapi-rtp.json`
|
|
29
|
+
|
|
30
|
+
## Access Tiers
|
|
31
|
+
|
|
32
|
+
Anonymous requests return bounded free preview slices (up to 10 operator game rows and up to 10 head-to-head comparison rows, 30 requests/min). Request a free Early Access Research Key at `https://toolsgambling.com/rtp/api#keys` and pass `TOOLSGAMBLING_API_KEY` (or `X-API-Key` / `Authorization: Bearer`) to unlock full operator catalog depth and 120 requests/min.
|
|
33
|
+
|
|
34
|
+
## Client Setup
|
|
35
|
+
|
|
36
|
+
### Claude Desktop / Cursor (`mcpServers`)
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"toolsgambling-rtp": {
|
|
42
|
+
"command": "npx",
|
|
43
|
+
"args": ["-y", "toolsgambling-mcp"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Claude Code CLI
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
claude mcp add --transport http toolsgambling-rtp https://toolsgambling.com/mcp
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Gemini CLI (`settings.json`)
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"toolsgambling-rtp": {
|
|
61
|
+
"command": "npx",
|
|
62
|
+
"args": ["-y", "toolsgambling-mcp"]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Or run locally from this package directory:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
node index.mjs
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
All public RTP datasets and operator audits returned by the server carry `CC BY 4.0` attribution (`ToolsGambling`, `https://toolsgambling.com/rtp`).
|
package/glama.json
ADDED
package/index.mjs
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { pathToFileURL } from 'node:url'
|
|
3
|
+
|
|
4
|
+
export const DEFAULT_MCP_URL = 'https://toolsgambling.com/mcp'
|
|
5
|
+
|
|
6
|
+
export async function forwardMcpRequest(
|
|
7
|
+
payload,
|
|
8
|
+
endpoint = process.env.TOOLSGAMBLING_MCP_URL || DEFAULT_MCP_URL,
|
|
9
|
+
fetchImpl = fetch,
|
|
10
|
+
apiKey = process.env.TOOLSGAMBLING_API_KEY || ''
|
|
11
|
+
) {
|
|
12
|
+
try {
|
|
13
|
+
const headers = {
|
|
14
|
+
'content-type': 'application/json',
|
|
15
|
+
accept: 'application/json',
|
|
16
|
+
'user-agent': 'toolsgambling-mcp/1.0.0',
|
|
17
|
+
}
|
|
18
|
+
if (typeof apiKey === 'string' && apiKey.trim()) {
|
|
19
|
+
headers['x-api-key'] = apiKey.trim()
|
|
20
|
+
}
|
|
21
|
+
const res = await fetchImpl(endpoint, {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
headers,
|
|
24
|
+
body: JSON.stringify(payload),
|
|
25
|
+
})
|
|
26
|
+
if (res.status === 202) return null
|
|
27
|
+
if (!res.ok) {
|
|
28
|
+
if (payload?.id === undefined) return null
|
|
29
|
+
return {
|
|
30
|
+
jsonrpc: '2.0',
|
|
31
|
+
id: payload.id ?? null,
|
|
32
|
+
error: { code: -32000, message: `Upstream HTTP ${res.status}` },
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const text = await res.text()
|
|
36
|
+
if (!text.trim()) return null
|
|
37
|
+
return JSON.parse(text)
|
|
38
|
+
} catch (err) {
|
|
39
|
+
if (payload?.id === undefined) return null
|
|
40
|
+
return {
|
|
41
|
+
jsonrpc: '2.0',
|
|
42
|
+
id: payload.id ?? null,
|
|
43
|
+
error: {
|
|
44
|
+
code: -32000,
|
|
45
|
+
message: err instanceof Error ? err.message : 'Upstream MCP request failed',
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function runStdioBridge(options = {}) {
|
|
52
|
+
const input = options.stdin ?? process.stdin
|
|
53
|
+
const output = options.stdout ?? process.stdout
|
|
54
|
+
const endpoint = options.endpoint ?? (process.env.TOOLSGAMBLING_MCP_URL || DEFAULT_MCP_URL)
|
|
55
|
+
const fetchImpl = options.fetchImpl ?? fetch
|
|
56
|
+
const apiKey = options.apiKey ?? (process.env.TOOLSGAMBLING_API_KEY || '')
|
|
57
|
+
|
|
58
|
+
let buffer = Buffer.alloc(0)
|
|
59
|
+
let pending = Promise.resolve()
|
|
60
|
+
|
|
61
|
+
function writeFrame(message, useContentLength) {
|
|
62
|
+
const json = JSON.stringify(message)
|
|
63
|
+
if (useContentLength) {
|
|
64
|
+
const byteLength = Buffer.byteLength(json, 'utf8')
|
|
65
|
+
output.write(`Content-Length: ${byteLength}\r\n\r\n${json}`)
|
|
66
|
+
} else {
|
|
67
|
+
output.write(`${json}\n`)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function enqueue(rawJson, useContentLength) {
|
|
72
|
+
pending = pending.then(async () => {
|
|
73
|
+
let payload
|
|
74
|
+
try {
|
|
75
|
+
payload = JSON.parse(rawJson)
|
|
76
|
+
} catch {
|
|
77
|
+
writeFrame(
|
|
78
|
+
{ jsonrpc: '2.0', id: null, error: { code: -32700, message: 'Parse error' } },
|
|
79
|
+
useContentLength
|
|
80
|
+
)
|
|
81
|
+
return
|
|
82
|
+
}
|
|
83
|
+
const response = await forwardMcpRequest(payload, endpoint, fetchImpl, apiKey)
|
|
84
|
+
if (response !== null && response !== undefined) {
|
|
85
|
+
writeFrame(response, useContentLength)
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function drainBuffer() {
|
|
91
|
+
while (buffer.length > 0) {
|
|
92
|
+
const textStart = buffer.slice(0, Math.min(buffer.length, 64)).toString('utf8')
|
|
93
|
+
const clMatch = /^Content-Length:\s*(\d+)/i.exec(textStart)
|
|
94
|
+
if (clMatch) {
|
|
95
|
+
const headerEndCrlf = buffer.indexOf('\r\n\r\n')
|
|
96
|
+
const headerEndLf = buffer.indexOf('\n\n')
|
|
97
|
+
let headerEnd = -1
|
|
98
|
+
let sepLen = 0
|
|
99
|
+
if (headerEndCrlf !== -1 && (headerEndLf === -1 || headerEndCrlf < headerEndLf)) {
|
|
100
|
+
headerEnd = headerEndCrlf
|
|
101
|
+
sepLen = 4
|
|
102
|
+
} else if (headerEndLf !== -1) {
|
|
103
|
+
headerEnd = headerEndLf
|
|
104
|
+
sepLen = 2
|
|
105
|
+
}
|
|
106
|
+
if (headerEnd === -1) return
|
|
107
|
+
const length = Number(clMatch[1])
|
|
108
|
+
const total = headerEnd + sepLen + length
|
|
109
|
+
if (buffer.length < total) return
|
|
110
|
+
const body = buffer.slice(headerEnd + sepLen, total).toString('utf8')
|
|
111
|
+
buffer = buffer.slice(total)
|
|
112
|
+
enqueue(body, true)
|
|
113
|
+
continue
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const nlIndex = buffer.indexOf('\n')
|
|
117
|
+
if (nlIndex === -1) return
|
|
118
|
+
const line = buffer.slice(0, nlIndex).toString('utf8').trim()
|
|
119
|
+
buffer = buffer.slice(nlIndex + 1)
|
|
120
|
+
if (line) enqueue(line, false)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
input.on('data', (chunk) => {
|
|
125
|
+
const part = Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk), 'utf8')
|
|
126
|
+
buffer = Buffer.concat([buffer, part])
|
|
127
|
+
drainBuffer()
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
input.on('end', () => {
|
|
131
|
+
const rest = buffer.toString('utf8').trim()
|
|
132
|
+
buffer = Buffer.alloc(0)
|
|
133
|
+
if (rest && !/^Content-Length:/i.test(rest)) enqueue(rest, false)
|
|
134
|
+
void pending
|
|
135
|
+
})
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
done: () => pending,
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const isEntrypoint =
|
|
143
|
+
typeof process !== 'undefined' &&
|
|
144
|
+
process.argv?.[1] &&
|
|
145
|
+
import.meta.url === pathToFileURL(process.argv[1]).href
|
|
146
|
+
|
|
147
|
+
if (isEntrypoint) {
|
|
148
|
+
runStdioBridge()
|
|
149
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolsgambling-mcp",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"mcpName": "io.github.vei66rus/toolsgambling-mcp",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Evgeniy Volkov",
|
|
8
|
+
"homepage": "https://toolsgambling.com/rtp/api",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/vei66rus/toolsgambling-mcp.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/vei66rus/toolsgambling-mcp/issues"
|
|
15
|
+
},
|
|
16
|
+
"description": "Read-only MCP stdio bridge for ToolsGambling Slot RTP database, operator audits, and expected-loss math.",
|
|
17
|
+
"keywords": [
|
|
18
|
+
"mcp",
|
|
19
|
+
"model-context-protocol",
|
|
20
|
+
"slot-rtp",
|
|
21
|
+
"rtp",
|
|
22
|
+
"casino-audit",
|
|
23
|
+
"igaming",
|
|
24
|
+
"expected-value"
|
|
25
|
+
],
|
|
26
|
+
"bin": {
|
|
27
|
+
"toolsgambling-mcp": "./index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=20.0.0"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"index.mjs",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"glama.json",
|
|
37
|
+
"server.json",
|
|
38
|
+
"smithery.yaml"
|
|
39
|
+
]
|
|
40
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.vei66rus/toolsgambling-mcp",
|
|
4
|
+
"title": "ToolsGambling Slot RTP & Casino Audit MCP",
|
|
5
|
+
"websiteUrl": "https://toolsgambling.com/rtp/api",
|
|
6
|
+
"repository": {
|
|
7
|
+
"url": "https://github.com/vei66rus/toolsgambling-mcp",
|
|
8
|
+
"source": "github"
|
|
9
|
+
},
|
|
10
|
+
"description": "Read-only Model Context Protocol server for verified slot RTP builds, SHA-256 receipts, expected-loss math, and casino operator storefront audits.",
|
|
11
|
+
"version": "1.0.0",
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://toolsgambling.com/mcp"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"packages": [
|
|
19
|
+
{
|
|
20
|
+
"registryType": "npm",
|
|
21
|
+
"identifier": "toolsgambling-mcp",
|
|
22
|
+
"version": "1.0.0",
|
|
23
|
+
"transport": {
|
|
24
|
+
"type": "stdio"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
package/smithery.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
startCommand:
|
|
2
|
+
type: stdio
|
|
3
|
+
configSchema:
|
|
4
|
+
type: object
|
|
5
|
+
properties:
|
|
6
|
+
apiKey:
|
|
7
|
+
type: string
|
|
8
|
+
title: ToolsGambling Research API Key
|
|
9
|
+
description: Optional free Early Access research key from https://toolsgambling.com/rtp/api#keys
|
|
10
|
+
commandFunction: |-
|
|
11
|
+
(config) => ({
|
|
12
|
+
command: 'node',
|
|
13
|
+
args: ['index.mjs'],
|
|
14
|
+
env: config?.apiKey ? { TOOLSGAMBLING_API_KEY: config.apiKey } : {}
|
|
15
|
+
})
|