voidless-mcp 1.6.16 → 1.6.17
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/index.js +1 -1
- package/package.json +1 -1
- package/tools.js +6 -3
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "voidless-mcp",
|
|
3
3
|
"mcpName": "dev.voidless/voidless",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.17",
|
|
5
5
|
"description": "MCP server for Voidless: generate game sprites, animations, sound, music, video and 3D models",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Voidless Dev Inc. <contact@voidless.dev>",
|
package/tools.js
CHANGED
|
@@ -27,7 +27,7 @@ import { Agent, setGlobalDispatcher } from "undici";
|
|
|
27
27
|
// server does.
|
|
28
28
|
setGlobalDispatcher(new Agent({ headersTimeout: 0, bodyTimeout: 0, connectTimeout: 30_000 }));
|
|
29
29
|
|
|
30
|
-
export const VERSION = "1.6.
|
|
30
|
+
export const VERSION = "1.6.17";
|
|
31
31
|
const BASE_URL = process.env.VOIDLESS_API_URL || "https://api.voidless.dev";
|
|
32
32
|
const CDN_URL = "https://cdn.voidless.dev";
|
|
33
33
|
// Where asset links point. Results link to the asset's page in the app rather than to raw GIFs: the
|
|
@@ -94,11 +94,14 @@ function restoredText(result) {
|
|
|
94
94
|
].filter(Boolean).join("\n");
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
// `transport` is "stdio" (index.js) or "hosted" (http.js). Every API call says it comes from the MCP
|
|
98
|
+
// server, so Voidless can tell these generations from the web app's and from direct API use.
|
|
99
|
+
export function createVoidlessServer(API_KEY, transport = "stdio") {
|
|
100
|
+
const CLIENT = `mcp/${VERSION} (${transport})`;
|
|
98
101
|
async function api(method, path, body, headers = {}) {
|
|
99
102
|
const res = await fetch(`${BASE_URL}/api${path}`, {
|
|
100
103
|
method,
|
|
101
|
-
headers: { "Content-Type": "application/json", "x-api-key": API_KEY, ...headers },
|
|
104
|
+
headers: { "Content-Type": "application/json", "x-api-key": API_KEY, "X-Voidless-Client": CLIENT, ...headers },
|
|
102
105
|
body: body === undefined ? undefined : JSON.stringify(body),
|
|
103
106
|
});
|
|
104
107
|
|