@mobilenext/mobile-mcp 0.0.30 → 0.0.31
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/lib/server.js +14 -0
- package/package.json +2 -2
package/lib/server.js
CHANGED
|
@@ -34,6 +34,16 @@ const createMcpServer = () => {
|
|
|
34
34
|
});
|
|
35
35
|
// an empty object to satisfy windsurf
|
|
36
36
|
const noParams = zod_1.z.object({});
|
|
37
|
+
const getClientName = () => {
|
|
38
|
+
try {
|
|
39
|
+
const clientInfo = server.server.getClientVersion();
|
|
40
|
+
const clientName = clientInfo?.name || "unknown";
|
|
41
|
+
return clientName;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
return "unknown";
|
|
45
|
+
}
|
|
46
|
+
};
|
|
37
47
|
const tool = (name, description, paramsSchema, cb) => {
|
|
38
48
|
const wrappedCb = async (args) => {
|
|
39
49
|
try {
|
|
@@ -75,6 +85,10 @@ const createMcpServer = () => {
|
|
|
75
85
|
Version: (0, exports.getAgentVersion)(),
|
|
76
86
|
NodeVersion: process.version,
|
|
77
87
|
};
|
|
88
|
+
const clientName = getClientName();
|
|
89
|
+
if (clientName !== "unknown") {
|
|
90
|
+
systemProps.AgentName = clientName;
|
|
91
|
+
}
|
|
78
92
|
await fetch(url, {
|
|
79
93
|
method: "POST",
|
|
80
94
|
headers: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobilenext/mobile-mcp",
|
|
3
3
|
"mcpName": "io.github.mobile-next/mobile-mcp",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.31",
|
|
5
5
|
"description": "Mobile MCP",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"zod-to-json-schema": "3.24.6"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@mobilenext/mobilecli": "0.0.
|
|
34
|
+
"@mobilenext/mobilecli": "0.0.28"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@eslint/eslintrc": "^3.2.0",
|