@anyshift/mcp-proxy 0.6.1 → 0.6.2

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -3
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -647,6 +647,10 @@ async function main() {
647
647
  });
648
648
  // Check if child MCP returned an error
649
649
  const childReturnedError = !!result.isError;
650
+ // Preserve _meta from child response (e.g. parsed_commands) for passthrough
651
+ const childMeta = result._meta && typeof result._meta === 'object' && Object.keys(result._meta).length > 0
652
+ ? result._meta
653
+ : undefined;
650
654
  // Process result through file writer to get unified response
651
655
  if (result.content && Array.isArray(result.content) && result.content.length > 0) {
652
656
  // Extract text content and embedded resources from all content items
@@ -709,7 +713,8 @@ async function main() {
709
713
  type: 'text',
710
714
  text: JSON.stringify(createErrorResponse(tool_id, contentStr, toolArgs), null, 2)
711
715
  }],
712
- isError: true
716
+ isError: true,
717
+ ...(childMeta ? { _meta: childMeta } : {})
713
718
  };
714
719
  }
715
720
  // Get unified response from file writer
@@ -750,7 +755,8 @@ async function main() {
750
755
  type: 'text',
751
756
  text: JSON.stringify(unifiedResponse, null, 2)
752
757
  }],
753
- isError: !!unifiedResponse.error
758
+ isError: !!unifiedResponse.error,
759
+ ...(childMeta ? { _meta: childMeta } : {})
754
760
  };
755
761
  }
756
762
  }
@@ -761,7 +767,8 @@ async function main() {
761
767
  type: 'text',
762
768
  text: JSON.stringify(createContentResponse(tool_id, result, toolArgs), null, 2)
763
769
  }],
764
- isError: childReturnedError
770
+ isError: childReturnedError,
771
+ ...(childMeta ? { _meta: childMeta } : {})
765
772
  };
766
773
  }
767
774
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anyshift/mcp-proxy",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Generic MCP proxy that adds truncation, file writing, and JQ capabilities to any MCP server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,6 +19,7 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@jest/globals": "^30.2.0",
22
+ "@types/glob": "^9.0.0",
22
23
  "@types/jest": "^30.0.0",
23
24
  "@types/node": "^22.0.0",
24
25
  "jest": "^30.2.0",