From a72bdbff16efd6451acdf1d384cd097682caa06a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 6 Nov 2025 23:29:53 +0000 Subject: [PATCH] Sync pending files --- README.md | 5 +++-- config/mcporter.json | 42 +++++++++++++++--------------------- docs/spec.md | 2 +- scripts/mcp_stdio_wrapper.sh | 9 -------- tests/fixtures/mcporter.json | 33 ++++++++++++---------------- 5 files changed, 35 insertions(+), 56 deletions(-) delete mode 100755 scripts/mcp_stdio_wrapper.sh diff --git a/README.md b/README.md index 28fd890..db16a47 100644 --- a/README.md +++ b/README.md @@ -228,8 +228,9 @@ npx mcporter regenerate-cli dist/context7.js # replay with latest mcporter } }, "chrome-devtools": { - "command": "bash", - "args": ["scripts/mcp_stdio_wrapper.sh", "env", "npx", "-y", "chrome-devtools-mcp@latest"] + "command": "npx", + "args": ["-y", "chrome-devtools-mcp@latest"], + "env": { "npm_config_loglevel": "error" } } }, "imports": ["cursor", "claude-code", "claude-desktop", "codex"] diff --git a/config/mcporter.json b/config/mcporter.json index 2479660..08ec65e 100644 --- a/config/mcporter.json +++ b/config/mcporter.json @@ -2,15 +2,14 @@ "mcpServers": { "chrome-devtools": { "description": "Chrome DevTools protocol bridge for driving local tabs during debugging or automation.", - "command": "bash", + "command": "npx", "args": [ - "scripts/mcp_stdio_wrapper.sh", - "env", - "npm_config_loglevel=error", - "npx", "-y", "chrome-devtools-mcp@latest" - ] + ], + "env": { + "npm_config_loglevel": "error" + } }, "context7": { "description": "Context7 MCP for React documentation lookup.", @@ -29,12 +28,8 @@ }, "obsidian": { "description": "Local Obsidian vault access via obsidian-mcp-server.", - "command": "bash", + "command": "npx", "args": [ - "scripts/mcp_stdio_wrapper.sh", - "env", - "npm_config_loglevel=error", - "npx", "-y", "obsidian-mcp-server@latest" ], @@ -42,20 +37,20 @@ "OBSIDIAN_API_KEY": "${OBSIDIAN_API_KEY}", "OBSIDIAN_BASE_URL": "${OBSIDIAN_BASE_URL:-https://127.0.0.1:27124}", "OBSIDIAN_VERIFY_SSL": "${OBSIDIAN_VERIFY_SSL:-false}", - "OBSIDIAN_ENABLE_CACHE": "${OBSIDIAN_ENABLE_CACHE:-true}" + "OBSIDIAN_ENABLE_CACHE": "${OBSIDIAN_ENABLE_CACHE:-true}", + "npm_config_loglevel": "error" } }, "playwright": { "description": "Playwright MCP server for accessibility-driven automation.", - "command": "bash", + "command": "npx", "args": [ - "scripts/mcp_stdio_wrapper.sh", - "env", - "npm_config_loglevel=error", - "npx", "-y", "@playwright/mcp@latest" - ] + ], + "env": { + "npm_config_loglevel": "error" + } }, "vercel": { "description": "Vercel MCP (requires OAuth).", @@ -73,19 +68,16 @@ }, "signoz": { "description": "SigNoz Query MCP server (logs, traces, metrics).", - "command": "bash", + "command": "npx", "args": [ - "scripts/mcp_stdio_wrapper.sh", - "env", - "NODE_OPTIONS=--require=./scripts/mcp_signoz_retry_patch.cjs", - "npm_config_loglevel=error", - "npx", "-y", "signoz-mcp-server@latest" ], "env": { "SIGNOZ_URL": "${SIGNOZ_URL:-http://localhost:3301}", - "SIGNOZ_TOKEN": "${SIGNOZ_TOKEN:-}" + "SIGNOZ_TOKEN": "${SIGNOZ_TOKEN:-}", + "npm_config_loglevel": "error", + "NODE_OPTIONS": "--require=./scripts/mcp_signoz_retry_patch.cjs" } }, "shadcn": { diff --git a/docs/spec.md b/docs/spec.md index 0e67cb6..315e244 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -23,7 +23,7 @@ summary: 'Plan for the mcporter package replacing the Sweetistics pnpm MCP helpe ## Architecture Notes - Load MCP definitions from JSON (support relative paths + HTTPS). -- Reuse `@modelcontextprotocol/sdk` transports; wrap stdio via `scripts/mcp_stdio_wrapper.sh`. +- Reuse `@modelcontextprotocol/sdk` transports; invoke stdio servers directly (e.g., call `npx` with env overrides) without an extra wrapper script. - Mirror Python helper behavior: - `${VAR}`, `${VAR:-default}`, `$env:VAR` interpolation. - Optional OAuth token cache directory handling (defaulting to `~/.mcporter/` when none is provided). diff --git a/scripts/mcp_stdio_wrapper.sh b/scripts/mcp_stdio_wrapper.sh deleted file mode 100755 index 208b65c..0000000 --- a/scripts/mcp_stdio_wrapper.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -if [[ $# -eq 0 ]]; then - echo "mcp_stdio_wrapper.sh: missing command" >&2 - exit 1 -fi - -exec "$@" diff --git a/tests/fixtures/mcporter.json b/tests/fixtures/mcporter.json index da97ede..9b1a954 100644 --- a/tests/fixtures/mcporter.json +++ b/tests/fixtures/mcporter.json @@ -2,15 +2,14 @@ "mcpServers": { "chrome-devtools": { "description": "Chrome DevTools protocol bridge for driving local tabs during debugging or automation.", - "command": "bash", + "command": "npx", "args": [ - "scripts/mcp_stdio_wrapper.sh", - "env", - "npm_config_loglevel=error", - "npx", "-y", "chrome-devtools-mcp@latest" - ] + ], + "env": { + "npm_config_loglevel": "error" + } }, "context7": { "description": "Context7 MCP for React documentation lookup.", @@ -29,15 +28,14 @@ }, "playwright": { "description": "Playwright MCP server for accessibility-driven automation.", - "command": "bash", + "command": "npx", "args": [ - "scripts/mcp_stdio_wrapper.sh", - "env", - "npm_config_loglevel=error", - "npx", "-y", "@playwright/mcp@latest" - ] + ], + "env": { + "npm_config_loglevel": "error" + } }, "vercel": { "description": "Vercel MCP (requires OAuth).", @@ -54,19 +52,16 @@ }, "signoz": { "description": "SigNoz Query MCP server (logs, traces, metrics).", - "command": "bash", + "command": "npx", "args": [ - "scripts/mcp_stdio_wrapper.sh", - "env", - "NODE_OPTIONS=--require=./scripts/mcp_signoz_retry_patch.cjs", - "npm_config_loglevel=error", - "npx", "-y", "signoz-mcp-server@latest" ], "env": { "SIGNOZ_URL": "${SIGNOZ_URL:-http://localhost:3301}", - "SIGNOZ_TOKEN": "${SIGNOZ_TOKEN:-}" + "SIGNOZ_TOKEN": "${SIGNOZ_TOKEN:-}", + "npm_config_loglevel": "error", + "NODE_OPTIONS": "--require=./scripts/mcp_signoz_retry_patch.cjs" } }, "shadcn": {