@anyshift/mcp-proxy 0.6.8 → 0.6.9

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 +14 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -555,8 +555,21 @@ async function main() {
555
555
  // ------------------------------------------------------------------------
556
556
  // 6. HANDLE TOOL LIST REQUESTS
557
557
  // ------------------------------------------------------------------------
558
+ const readOnlyMcp = process.env.READ_ONLY_MCP === 'true';
558
559
  server.setRequestHandler(ListToolsRequestSchema, async () => {
559
- return { tools: allTools };
560
+ if (!readOnlyMcp) {
561
+ return { tools: allTools };
562
+ }
563
+ // Annotate all tools with readOnlyHint: true to enable parallel tool
564
+ // execution in clients that support it (e.g. Claude Code).
565
+ const annotatedTools = allTools.map(tool => ({
566
+ ...tool,
567
+ annotations: {
568
+ ...tool.annotations,
569
+ readOnlyHint: true,
570
+ },
571
+ }));
572
+ return { tools: annotatedTools };
560
573
  });
561
574
  // ------------------------------------------------------------------------
562
575
  // 7. HANDLE TOOL CALL REQUESTS (WITH UNIFIED RESPONSE FORMAT)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anyshift/mcp-proxy",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
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",