@nataliapc/mcp-openmsx 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 +339 -0
- package/README.md +193 -0
- package/dist/openmsx.js +331 -0
- package/dist/server.js +912 -0
- package/dist/utils.js +23 -0
- package/package.json +60 -0
package/dist/utils.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utils functions for mcp-openmsx
|
|
3
|
+
*
|
|
4
|
+
* @author Natalia Pujol Cremades (@nataliapc)
|
|
5
|
+
* @license GPL2
|
|
6
|
+
*/
|
|
7
|
+
import fs from 'fs/promises';
|
|
8
|
+
/**
|
|
9
|
+
* Extract description from XML file
|
|
10
|
+
* @param filePath - Full path to the XML file
|
|
11
|
+
* @returns Promise<string> - The description found in the XML file, or a default message
|
|
12
|
+
*/
|
|
13
|
+
export async function extractDescriptionFromXML(filePath) {
|
|
14
|
+
try {
|
|
15
|
+
const xmlContent = await fs.readFile(filePath, 'utf-8');
|
|
16
|
+
// Extract description from XML
|
|
17
|
+
const descriptionMatch = xmlContent.match(/<description>(.*?)<\/description>/);
|
|
18
|
+
return descriptionMatch ? descriptionMatch[1] : 'No description available';
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return 'Error reading description';
|
|
22
|
+
}
|
|
23
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nataliapc/mcp-openmsx",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Model context protocol server for openMSX automation and control",
|
|
5
|
+
"main": "dist/server.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mcp-openmsx": "./dist/server.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"mcp",
|
|
12
|
+
"model-context-protocol",
|
|
13
|
+
"openmsx",
|
|
14
|
+
"msx",
|
|
15
|
+
"emulator",
|
|
16
|
+
"automation",
|
|
17
|
+
"retro-computing"
|
|
18
|
+
],
|
|
19
|
+
"author": "Natalia Pujol Cremades <info@abitwitches.com>",
|
|
20
|
+
"license": "GPL2",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/nataliapc/mcp-openmsx.git"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/nataliapc/mcp-openmsx/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/nataliapc/mcp-openmsx#readme",
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18.0.0"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc && shx chmod +x dist/server.js",
|
|
34
|
+
"watch": "tsc --watch",
|
|
35
|
+
"start": "node dist/server.js",
|
|
36
|
+
"dev": "tsx src/server.ts",
|
|
37
|
+
"prepublishOnly": "npm run build",
|
|
38
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.11.2",
|
|
42
|
+
"@types/express": "^5.0.2",
|
|
43
|
+
"express": "^5.1.0",
|
|
44
|
+
"tsx": "^4.7.1",
|
|
45
|
+
"zod": "^3.24.4"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^22.15.27",
|
|
49
|
+
"shx": "^0.4.0",
|
|
50
|
+
"typescript": "^5.8.3"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"dist/**/*",
|
|
54
|
+
"README.md",
|
|
55
|
+
"LICENSE"
|
|
56
|
+
],
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public"
|
|
59
|
+
}
|
|
60
|
+
}
|