@hypothesi/tauri-mcp-server 0.6.2 → 0.6.4
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/dist/logger.js +14 -2
- package/package.json +2 -2
package/dist/logger.js
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a logger that writes to stderr only.
|
|
3
|
+
*
|
|
4
|
+
* IMPORTANT: MCP uses stdio for JSON-RPC communication. The server sends
|
|
5
|
+
* JSON responses over stdout, and the client parses them. Any non-JSON
|
|
6
|
+
* output to stdout (like console.log) will corrupt the protocol and cause
|
|
7
|
+
* parsing errors like "invalid character 'M' looking for beginning of value".
|
|
8
|
+
*
|
|
9
|
+
* All logging MUST go to stderr to avoid interfering with MCP communication.
|
|
10
|
+
*/
|
|
1
11
|
export function createMcpLogger(scope) {
|
|
2
12
|
return {
|
|
3
13
|
info: (...args) => {
|
|
4
|
-
console.
|
|
14
|
+
// Use console.error (stderr) instead of console.log (stdout)
|
|
15
|
+
// to avoid corrupting MCP's JSON-RPC protocol on stdout
|
|
16
|
+
console.error('[MCP][' + scope + '][INFO]', ...args);
|
|
5
17
|
},
|
|
6
18
|
warn: (...args) => {
|
|
7
|
-
console.
|
|
19
|
+
console.error('[MCP][' + scope + '][WARN]', ...args);
|
|
8
20
|
},
|
|
9
21
|
error: (...args) => {
|
|
10
22
|
console.error('[MCP][' + scope + '][ERROR]', ...args);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypothesi/tauri-mcp-server",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"mcpName": "io.github.hypothesi/tauri",
|
|
3
|
+
"version": "0.6.4",
|
|
4
|
+
"mcpName": "io.github.hypothesi/mcp-server-tauri",
|
|
5
5
|
"description": "A Model Context Protocol server for use with Tauri v2 applications",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|