odds-api-mcp-server 1.0.0 → 1.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.
- package/README.md +2 -2
- package/dist/index.d.ts +40 -1
- package/dist/index.js +501 -329
- package/package.json +12 -6
- package/src/index.test.ts +556 -0
- package/src/index.ts +601 -335
- package/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -25,8 +25,8 @@ npm install -g odds-api-mcp-server
|
|
|
25
25
|
### From Source
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
git clone https://github.com/
|
|
29
|
-
cd mcp-server
|
|
28
|
+
git clone https://github.com/odds-api-io/odds-api-mcp-server
|
|
29
|
+
cd odds-api-mcp-server
|
|
30
30
|
npm install
|
|
31
31
|
npm run build
|
|
32
32
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,41 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
type ParamValue = string | number | boolean | undefined;
|
|
3
|
+
interface ToolDefinition {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object";
|
|
8
|
+
properties: Record<string, unknown>;
|
|
9
|
+
required: string[];
|
|
10
|
+
};
|
|
11
|
+
handler(args: Record<string, unknown>): Promise<{
|
|
12
|
+
content: Array<{
|
|
13
|
+
type: "text";
|
|
14
|
+
text: string;
|
|
15
|
+
}>;
|
|
16
|
+
isError?: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
declare function apiRequest(endpoint: string, params?: Record<string, ParamValue>, method?: "GET" | "PUT"): Promise<unknown>;
|
|
20
|
+
declare function jsonResponse(data: unknown): {
|
|
21
|
+
content: {
|
|
22
|
+
type: "text";
|
|
23
|
+
text: string;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
declare function textResponse(text: string): {
|
|
27
|
+
content: {
|
|
28
|
+
type: "text";
|
|
29
|
+
text: string;
|
|
30
|
+
}[];
|
|
31
|
+
};
|
|
32
|
+
declare function errorResponse(message: string): {
|
|
33
|
+
content: {
|
|
34
|
+
type: "text";
|
|
35
|
+
text: string;
|
|
36
|
+
}[];
|
|
37
|
+
isError: boolean;
|
|
38
|
+
};
|
|
39
|
+
declare const tools: ToolDefinition[];
|
|
40
|
+
declare const toolMap: Map<string, ToolDefinition>;
|
|
41
|
+
export { tools, toolMap, apiRequest, jsonResponse, textResponse, errorResponse };
|