From 25a29a74de03166ea4ef6b9b54054e93caa07ede Mon Sep 17 00:00:00 2001 From: Katrina Liu Date: Mon, 24 Nov 2025 14:00:02 -0800 Subject: [PATCH 1/3] initial setup update workflow tests and mcp --- .claude-plugin/marketplace.json | 6 ++--- .mcp.json | 8 ++++++ plugin/.claude-plugin/plugin.json | 8 ++++++ .../hello.md => plugin/commands/setup.md | 2 +- plugin/hooks/hooks.json | 26 +++++++++++++++++++ semgrep-mcp-plugin/.claude-plugin/plugin.json | 8 ------ 6 files changed, 46 insertions(+), 12 deletions(-) create mode 100644 .mcp.json create mode 100644 plugin/.claude-plugin/plugin.json rename semgrep-mcp-plugin/commands/hello.md => plugin/commands/setup.md (69%) create mode 100644 plugin/hooks/hooks.json delete mode 100644 semgrep-mcp-plugin/.claude-plugin/plugin.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 0644077..5435579 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -1,12 +1,12 @@ { - "name": "semgrep-mcp-marketplace", + "name": "semgrep", "owner": { "name": "Semgrep" }, "plugins": [ { - "name": "semgrep-mcp-plugin", - "source": "./semgrep-mcp-plugin", + "name": "plugin", + "source": "./plugin", "description": "Semgrep MCP Plugin" } ] diff --git a/.mcp.json b/.mcp.json new file mode 100644 index 0000000..bc767a9 --- /dev/null +++ b/.mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "semgrep": { + "command": "semgrep", + "args": ["mcp"] + } + } +} \ No newline at end of file diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json new file mode 100644 index 0000000..01e0d69 --- /dev/null +++ b/plugin/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "plugin", + "description": "Semgrep MCP Plugin", + "version": "0.1.0", + "author": { + "name": "semgrep" + } +} diff --git a/semgrep-mcp-plugin/commands/hello.md b/plugin/commands/setup.md similarity index 69% rename from semgrep-mcp-plugin/commands/hello.md rename to plugin/commands/setup.md index 496f063..1a01907 100644 --- a/semgrep-mcp-plugin/commands/hello.md +++ b/plugin/commands/setup.md @@ -1,5 +1,5 @@ --- -description: Greet the user with a personalized message +description: setup --- # Hello Command diff --git a/plugin/hooks/hooks.json b/plugin/hooks/hooks.json new file mode 100644 index 0000000..d8c2b54 --- /dev/null +++ b/plugin/hooks/hooks.json @@ -0,0 +1,26 @@ +{ + "hooks": { + "PostToolUse": [ + { + "matcher": "Write|Edit", + "hooks": [ + { + "type": "command", + "command": "semgrep mcp -k post-tool-cli-scan" + } + ] + } + ], + "SessionStart": [ + { + "matcher": "startup|resume|clear|compact", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/scripts/check_version.sh" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/semgrep-mcp-plugin/.claude-plugin/plugin.json b/semgrep-mcp-plugin/.claude-plugin/plugin.json deleted file mode 100644 index a333729..0000000 --- a/semgrep-mcp-plugin/.claude-plugin/plugin.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "semgrep-mcp-plugin", - "description": "Semgrep MCP Plugin", - "version": "1.0.0", - "author": { - "name": "Semgrep" - } -} From 9e5c9e9dc745bde3f62f507fae18994e012e68d4 Mon Sep 17 00:00:00 2001 From: Katrina Liu Date: Mon, 24 Nov 2025 14:02:12 -0800 Subject: [PATCH 2/3] remove session start hook --- plugin/hooks/hooks.json | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/plugin/hooks/hooks.json b/plugin/hooks/hooks.json index d8c2b54..2903e27 100644 --- a/plugin/hooks/hooks.json +++ b/plugin/hooks/hooks.json @@ -10,17 +10,6 @@ } ] } - ], - "SessionStart": [ - { - "matcher": "startup|resume|clear|compact", - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/check_version.sh" - } - ] - } ] } } \ No newline at end of file From 4f98b430bbe6361f568504c528d15316c32b5394 Mon Sep 17 00:00:00 2001 From: Katrina Liu Date: Mon, 24 Nov 2025 14:04:45 -0800 Subject: [PATCH 3/3] set version to 0 --- plugin/.claude-plugin/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index 01e0d69..0460b4e 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "plugin", "description": "Semgrep MCP Plugin", - "version": "0.1.0", + "version": "0.0.0", "author": { "name": "semgrep" }