@nataliapc/mcp-openmsx 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 +1 -1
- package/dist/server.js +14 -11
- package/package.json +4 -4
package/README.md
CHANGED
package/dist/server.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* through TCL commands via stdio.
|
|
7
7
|
*
|
|
8
8
|
* @package @nataliapc/mcp-openmsx
|
|
9
|
-
* @version 1.0.
|
|
9
|
+
* @version 1.0.1
|
|
10
10
|
* @author Natalia Pujol Cremades (@nataliapc)
|
|
11
11
|
* @license GPL2
|
|
12
12
|
*/
|
|
@@ -21,7 +21,7 @@ import fs from "fs/promises";
|
|
|
21
21
|
import path from "path";
|
|
22
22
|
import { openMSXInstance } from "./openmsx.js";
|
|
23
23
|
// Version info for CLI
|
|
24
|
-
const PACKAGE_VERSION = "1.0.
|
|
24
|
+
const PACKAGE_VERSION = "1.0.1";
|
|
25
25
|
// Defaults for openMSX paths
|
|
26
26
|
var OPENMSX_EXECUTABLE = 'openmsx';
|
|
27
27
|
var OPENMSX_SHARE_DIR = '/usr/share/openmsx';
|
|
@@ -112,7 +112,7 @@ function registerAllTools(server) {
|
|
|
112
112
|
return {
|
|
113
113
|
content: [{
|
|
114
114
|
type: "text",
|
|
115
|
-
text: result,
|
|
115
|
+
text: result === '' ? 'Ok' : result,
|
|
116
116
|
}],
|
|
117
117
|
};
|
|
118
118
|
});
|
|
@@ -178,7 +178,7 @@ function registerAllTools(server) {
|
|
|
178
178
|
return {
|
|
179
179
|
content: [{
|
|
180
180
|
type: "text",
|
|
181
|
-
text: response ===
|
|
181
|
+
text: response === '' ? 'Ok' : response,
|
|
182
182
|
}],
|
|
183
183
|
};
|
|
184
184
|
});
|
|
@@ -354,7 +354,7 @@ function registerAllTools(server) {
|
|
|
354
354
|
return {
|
|
355
355
|
content: [{
|
|
356
356
|
type: "text",
|
|
357
|
-
text: response,
|
|
357
|
+
text: response === '' ? 'Ok' : response,
|
|
358
358
|
}],
|
|
359
359
|
};
|
|
360
360
|
});
|
|
@@ -412,7 +412,7 @@ function registerAllTools(server) {
|
|
|
412
412
|
return {
|
|
413
413
|
content: [{
|
|
414
414
|
type: "text",
|
|
415
|
-
text: response,
|
|
415
|
+
text: response === '' ? 'Ok' : response,
|
|
416
416
|
}],
|
|
417
417
|
};
|
|
418
418
|
});
|
|
@@ -474,7 +474,7 @@ function registerAllTools(server) {
|
|
|
474
474
|
return {
|
|
475
475
|
content: [{
|
|
476
476
|
type: "text",
|
|
477
|
-
text: response,
|
|
477
|
+
text: response === '' ? 'Ok' : response,
|
|
478
478
|
}],
|
|
479
479
|
};
|
|
480
480
|
});
|
|
@@ -519,7 +519,7 @@ function registerAllTools(server) {
|
|
|
519
519
|
return {
|
|
520
520
|
content: [{
|
|
521
521
|
type: "text",
|
|
522
|
-
text: response,
|
|
522
|
+
text: response === '' ? 'Ok' : response,
|
|
523
523
|
}],
|
|
524
524
|
};
|
|
525
525
|
});
|
|
@@ -648,7 +648,7 @@ function registerAllTools(server) {
|
|
|
648
648
|
return {
|
|
649
649
|
content: [{
|
|
650
650
|
type: "text",
|
|
651
|
-
text: response,
|
|
651
|
+
text: response === '' ? 'Ok' : response,
|
|
652
652
|
}],
|
|
653
653
|
};
|
|
654
654
|
});
|
|
@@ -724,6 +724,9 @@ function registerAllTools(server) {
|
|
|
724
724
|
const response = await openMSXInstance.sendCommand(openmsxCommand);
|
|
725
725
|
return {
|
|
726
726
|
content: [{
|
|
727
|
+
type: "text",
|
|
728
|
+
text: response.startsWith('Error:') ? 'Fail:' : 'Screendump file saved as:',
|
|
729
|
+
}, {
|
|
727
730
|
type: "text",
|
|
728
731
|
text: response,
|
|
729
732
|
}],
|
|
@@ -858,8 +861,8 @@ async function startHttpServer() {
|
|
|
858
861
|
function createServerInstance() {
|
|
859
862
|
// Create a new server instance (you might want to extract server creation logic)
|
|
860
863
|
const newServer = new McpServer({
|
|
861
|
-
name: "mcp-
|
|
862
|
-
version:
|
|
864
|
+
name: "mcp-openmsx",
|
|
865
|
+
version: PACKAGE_VERSION,
|
|
863
866
|
});
|
|
864
867
|
// Re-register all tools (you might want to extract this to a separate function)
|
|
865
868
|
registerAllTools(newServer);
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nataliapc/mcp-openmsx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Model context protocol server for openMSX automation and control",
|
|
5
5
|
"main": "dist/server.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"mcp-openmsx": "
|
|
8
|
+
"mcp-openmsx": "dist/server.js"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"mcp",
|
|
12
|
-
"model-context-protocol",
|
|
12
|
+
"model-context-protocol",
|
|
13
13
|
"openmsx",
|
|
14
14
|
"msx",
|
|
15
15
|
"emulator",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.11.2",
|
|
42
|
-
"@types/express": "^5.0.2",
|
|
42
|
+
"@types/express": "^5.0.2",
|
|
43
43
|
"express": "^5.1.0",
|
|
44
44
|
"tsx": "^4.7.1",
|
|
45
45
|
"zod": "^3.24.4"
|