rogue-mcp 1.0.0

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/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # Rogue MCP by Wallarm
2
+
3
+ **Advanced MCP Security Scanner** - Detect and remediate MCP server vulnerabilities aligned with OWASP Agentic AI Top 10.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g rogue-mcp
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Discover all MCP servers on this machine
15
+ rogue-mcp scan
16
+
17
+ # Run security audit
18
+ rogue-mcp audit
19
+
20
+ # Generate safe configurations
21
+ rogue-mcp fix
22
+ ```
23
+
24
+ ## Features
25
+
26
+ - **Discovery**: Finds MCP servers across Claude Desktop, Cursor, VS Code, Windsurf
27
+ - **Security Audit**: 24 MCP-specific security checks (MCP001-MCP024)
28
+ - **OWASP Mapping**: Findings mapped to OWASP Agentic AI Top 10 (ASI01-ASI10)
29
+ - **Blast Radius**: Analyzes what data could be exposed if compromised
30
+ - **Safe Configs**: Generates pinned, least-privilege configurations
31
+ - **MCP Server**: Can run as an MCP server itself for AI-assisted scanning
32
+
33
+ ## Usage as MCP Server
34
+
35
+ Add to your MCP client configuration:
36
+
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "rogue-mcp": {
41
+ "command": "rogue-mcp",
42
+ "args": []
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ ## CLI Commands
49
+
50
+ ```bash
51
+ rogue-mcp scan # Discover MCP servers
52
+ rogue-mcp audit # Security audit (SAST)
53
+ rogue-mcp deep-probe # Dynamic analysis (DAST)
54
+ rogue-mcp fix # Generate safe configs
55
+ rogue-mcp export # Export results
56
+ rogue-mcp rogue # Blast radius reconnaissance
57
+ rogue-mcp owasp # OWASP ASI info
58
+ rogue-mcp trusted list # Manage trusted servers
59
+ rogue-mcp history # View scan history
60
+ ```
61
+
62
+ ## Supported Platforms
63
+
64
+ - Linux x64
65
+ - macOS x64 (Intel)
66
+ - macOS arm64 (Apple Silicon)
67
+ - Windows x64
68
+
69
+ ## License
70
+
71
+ Copyright (c) 2025 Wallarm, Inc. All rights reserved.
72
+
73
+ ## Author
74
+
75
+ Ivan Novikov - ivan@wallarm.com
76
+
77
+ ## Links
78
+
79
+ - [Documentation](https://github.com/wallarm/rogue-mcp)
80
+ - [Wallarm](https://wallarm.com)
package/bin/rogue-mcp ADDED
@@ -0,0 +1,101 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Rogue MCP by Wallarm - Binary Wrapper
5
+ *
6
+ * This script locates and executes the platform-specific binary.
7
+ */
8
+
9
+ const { spawn } = require('child_process');
10
+ const path = require('path');
11
+ const fs = require('fs');
12
+
13
+ const BINARY_NAME = process.platform === 'win32' ? 'rogue-mcp.exe' : 'rogue-mcp';
14
+
15
+ // Map of platform/arch to npm package name
16
+ const PLATFORM_PACKAGES = {
17
+ 'linux-x64': 'rogue-mcp-linux-x64',
18
+ 'darwin-x64': 'rogue-mcp-darwin-x64',
19
+ 'darwin-arm64': 'rogue-mcp-darwin-arm64',
20
+ 'win32-x64': 'rogue-mcp-win32-x64',
21
+ };
22
+
23
+ function getPlatformKey() {
24
+ return `${process.platform}-${process.arch}`;
25
+ }
26
+
27
+ function findBinary() {
28
+ const platformKey = getPlatformKey();
29
+ const packageName = PLATFORM_PACKAGES[platformKey];
30
+
31
+ if (!packageName) {
32
+ console.error(`Unsupported platform: ${platformKey}`);
33
+ console.error('Supported platforms: ' + Object.keys(PLATFORM_PACKAGES).join(', '));
34
+ process.exit(1);
35
+ }
36
+
37
+ // Check paths in order of preference
38
+ const searchPaths = [
39
+ // Symlink created by install.js (same directory)
40
+ path.join(__dirname, BINARY_NAME),
41
+ // Direct package reference
42
+ path.join(__dirname, '..', 'node_modules', packageName, BINARY_NAME),
43
+ // Hoisted in parent node_modules
44
+ path.join(__dirname, '..', '..', packageName, BINARY_NAME),
45
+ // Global install
46
+ path.join(__dirname, '..', '..', '..', packageName, BINARY_NAME),
47
+ ];
48
+
49
+ for (const binPath of searchPaths) {
50
+ if (fs.existsSync(binPath)) {
51
+ return binPath;
52
+ }
53
+ }
54
+
55
+ // Try require.resolve as last resort
56
+ try {
57
+ const packagePath = require.resolve(`${packageName}/package.json`);
58
+ const packageDir = path.dirname(packagePath);
59
+ const binPath = path.join(packageDir, BINARY_NAME);
60
+ if (fs.existsSync(binPath)) {
61
+ return binPath;
62
+ }
63
+ } catch (e) {
64
+ // Package not installed
65
+ }
66
+
67
+ return null;
68
+ }
69
+
70
+ function main() {
71
+ const binaryPath = findBinary();
72
+
73
+ if (!binaryPath) {
74
+ console.error('');
75
+ console.error('ERROR: Rogue MCP binary not found for your platform.');
76
+ console.error('');
77
+ console.error(`Platform: ${process.platform}`);
78
+ console.error(`Architecture: ${process.arch}`);
79
+ console.error('');
80
+ console.error('Try reinstalling: npm install -g @anthropic/rogue-mcp');
81
+ console.error('');
82
+ process.exit(1);
83
+ }
84
+
85
+ // Spawn the binary with all arguments passed through
86
+ const child = spawn(binaryPath, process.argv.slice(2), {
87
+ stdio: 'inherit',
88
+ env: process.env,
89
+ });
90
+
91
+ child.on('error', (err) => {
92
+ console.error(`Failed to execute Rogue MCP: ${err.message}`);
93
+ process.exit(1);
94
+ });
95
+
96
+ child.on('close', (code) => {
97
+ process.exit(code || 0);
98
+ });
99
+ }
100
+
101
+ main();
package/install.js ADDED
@@ -0,0 +1,128 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Rogue MCP by Wallarm - Installation Script
5
+ *
6
+ * This script handles installing the correct binary for the current platform.
7
+ * Binaries are distributed via platform-specific npm packages.
8
+ */
9
+
10
+ const fs = require('fs');
11
+ const path = require('path');
12
+ const { execSync } = require('child_process');
13
+
14
+ const BINARY_NAME = process.platform === 'win32' ? 'rogue-mcp.exe' : 'rogue-mcp';
15
+
16
+ // Map of platform/arch to npm package name
17
+ const PLATFORM_PACKAGES = {
18
+ 'linux-x64': 'rogue-mcp-linux-x64',
19
+ 'darwin-x64': 'rogue-mcp-darwin-x64',
20
+ 'darwin-arm64': 'rogue-mcp-darwin-arm64',
21
+ 'win32-x64': 'rogue-mcp-win32-x64',
22
+ };
23
+
24
+ function getPlatformKey() {
25
+ const platform = process.platform;
26
+ const arch = process.arch;
27
+ return `${platform}-${arch}`;
28
+ }
29
+
30
+ function getBinaryPath() {
31
+ const platformKey = getPlatformKey();
32
+ const packageName = PLATFORM_PACKAGES[platformKey];
33
+
34
+ if (!packageName) {
35
+ console.error(`Unsupported platform: ${platformKey}`);
36
+ console.error('Supported platforms: ' + Object.keys(PLATFORM_PACKAGES).join(', '));
37
+ process.exit(1);
38
+ }
39
+
40
+ // Try to find the binary in node_modules
41
+ const possiblePaths = [
42
+ // When installed as dependency
43
+ path.join(__dirname, 'node_modules', packageName, BINARY_NAME),
44
+ // When installed globally or hoisted
45
+ path.join(__dirname, '..', packageName, BINARY_NAME),
46
+ // Fallback: try to resolve the package
47
+ ];
48
+
49
+ for (const binPath of possiblePaths) {
50
+ if (fs.existsSync(binPath)) {
51
+ return binPath;
52
+ }
53
+ }
54
+
55
+ // Try using require.resolve
56
+ try {
57
+ const packagePath = require.resolve(`${packageName}/package.json`);
58
+ const packageDir = path.dirname(packagePath);
59
+ const binPath = path.join(packageDir, BINARY_NAME);
60
+ if (fs.existsSync(binPath)) {
61
+ return binPath;
62
+ }
63
+ } catch (e) {
64
+ // Package not found
65
+ }
66
+
67
+ return null;
68
+ }
69
+
70
+ function ensureBinaryDir() {
71
+ const binDir = path.join(__dirname, 'bin');
72
+ if (!fs.existsSync(binDir)) {
73
+ fs.mkdirSync(binDir, { recursive: true });
74
+ }
75
+ return binDir;
76
+ }
77
+
78
+ function createBinaryLink() {
79
+ const binaryPath = getBinaryPath();
80
+
81
+ if (!binaryPath) {
82
+ console.error('');
83
+ console.error('ERROR: Could not find Rogue MCP binary for your platform.');
84
+ console.error('');
85
+ console.error(`Platform: ${process.platform}`);
86
+ console.error(`Architecture: ${process.arch}`);
87
+ console.error('');
88
+ console.error('The platform-specific package may not have been installed.');
89
+ console.error('Try reinstalling with: npm install @anthropic/rogue-mcp');
90
+ console.error('');
91
+ process.exit(1);
92
+ }
93
+
94
+ const binDir = ensureBinaryDir();
95
+ const targetPath = path.join(binDir, BINARY_NAME);
96
+
97
+ try {
98
+ // Remove existing file/link if present
99
+ if (fs.existsSync(targetPath)) {
100
+ fs.unlinkSync(targetPath);
101
+ }
102
+
103
+ // On Windows, copy the file. On Unix, create a symlink
104
+ if (process.platform === 'win32') {
105
+ fs.copyFileSync(binaryPath, targetPath);
106
+ } else {
107
+ // Create relative symlink
108
+ const relativePath = path.relative(binDir, binaryPath);
109
+ fs.symlinkSync(relativePath, targetPath);
110
+ }
111
+
112
+ // Make executable on Unix
113
+ if (process.platform !== 'win32') {
114
+ fs.chmodSync(targetPath, 0o755);
115
+ fs.chmodSync(binaryPath, 0o755);
116
+ }
117
+
118
+ console.log('Rogue MCP installed successfully!');
119
+ console.log(`Binary: ${binaryPath}`);
120
+
121
+ } catch (err) {
122
+ console.error('Failed to install Rogue MCP binary:', err.message);
123
+ process.exit(1);
124
+ }
125
+ }
126
+
127
+ // Run installation
128
+ createBinaryLink();
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "rogue-mcp",
3
+ "version": "1.0.0",
4
+ "description": "Rogue MCP by Wallarm - Advanced MCP Security Scanner for detecting and remediating MCP server vulnerabilities",
5
+ "author": "Ivan Novikov <ivan@wallarm.com>",
6
+ "license": "UNLICENSED",
7
+ "homepage": "https://github.com/wallarm/rogue-mcp",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/wallarm/rogue-mcp.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/wallarm/rogue-mcp/issues"
14
+ },
15
+ "keywords": [
16
+ "mcp",
17
+ "security",
18
+ "scanner",
19
+ "owasp",
20
+ "agentic-ai",
21
+ "wallarm",
22
+ "model-context-protocol",
23
+ "claude",
24
+ "cursor",
25
+ "vscode"
26
+ ],
27
+ "bin": {
28
+ "rogue-mcp": "bin/rogue-mcp"
29
+ },
30
+ "files": [
31
+ "bin",
32
+ "install.js",
33
+ "lib",
34
+ "README.md"
35
+ ],
36
+ "scripts": {
37
+ "postinstall": "node install.js"
38
+ },
39
+ "optionalDependencies": {
40
+ "rogue-mcp-linux-x64": "1.0.0",
41
+ "rogue-mcp-darwin-x64": "1.0.0",
42
+ "rogue-mcp-darwin-arm64": "1.0.0",
43
+ "rogue-mcp-win32-x64": "1.0.0"
44
+ },
45
+ "engines": {
46
+ "node": ">=14.0.0"
47
+ }
48
+ }