@mcp-shark/mcp-shark 1.4.2 → 1.5.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.
Files changed (203) hide show
  1. package/README.md +84 -645
  2. package/bin/mcp-shark.js +30 -36
  3. package/mcp-server/index.js +115 -0
  4. package/mcp-server/lib/auditor/audit.js +22 -38
  5. package/mcp-server/lib/common/error.js +1 -1
  6. package/mcp-server/lib/server/external/all.js +5 -6
  7. package/mcp-server/lib/server/external/config.js +1 -3
  8. package/mcp-server/lib/server/external/kv.js +4 -12
  9. package/mcp-server/lib/server/external/single/request.js +3 -6
  10. package/mcp-server/lib/server/external/single/run.js +8 -19
  11. package/mcp-server/lib/server/internal/handlers/prompts-get.js +3 -13
  12. package/mcp-server/lib/server/internal/handlers/prompts-list.js +2 -6
  13. package/mcp-server/lib/server/internal/handlers/resources-list.js +2 -6
  14. package/mcp-server/lib/server/internal/handlers/resources-read.js +3 -12
  15. package/mcp-server/lib/server/internal/handlers/tools-call.js +3 -9
  16. package/mcp-server/lib/server/internal/handlers/tools-list.js +2 -2
  17. package/mcp-server/lib/server/internal/run.js +4 -16
  18. package/mcp-server/lib/server/internal/server.js +6 -7
  19. package/mcp-server/lib/server/internal/session.js +2 -15
  20. package/mcp-server/mcp-shark.js +16 -66
  21. package/package.json +23 -38
  22. package/ui/dist/assets/index-Cc-IUa83.css +1 -0
  23. package/ui/dist/assets/index-srLDlk97.js +35 -0
  24. package/ui/dist/index.html +17 -0
  25. package/ui/dist/og-image.png +0 -0
  26. package/ui/server/routes/backups/deleteBackup.js +54 -0
  27. package/ui/server/routes/backups/index.js +15 -0
  28. package/ui/server/routes/backups/listBackups.js +75 -0
  29. package/ui/server/routes/backups/restoreBackup.js +83 -0
  30. package/ui/server/routes/backups/viewBackup.js +47 -0
  31. package/ui/server/routes/composite/index.js +46 -0
  32. package/ui/server/routes/composite/servers.js +18 -0
  33. package/ui/server/routes/composite/setup.js +129 -0
  34. package/ui/server/routes/composite/status.js +7 -0
  35. package/ui/server/routes/composite/stop.js +39 -0
  36. package/ui/server/routes/composite/utils.js +45 -0
  37. package/ui/server/routes/config.js +34 -30
  38. package/ui/server/routes/conversations.js +3 -3
  39. package/ui/server/routes/help.js +2 -2
  40. package/ui/server/routes/logs.js +5 -5
  41. package/ui/server/routes/playground.js +45 -47
  42. package/ui/server/routes/requests.js +112 -108
  43. package/ui/server/routes/sessions.js +4 -4
  44. package/ui/server/routes/settings.js +199 -0
  45. package/ui/server/routes/smartscan/discover.js +7 -6
  46. package/ui/server/routes/smartscan/scans/clearCache.js +3 -2
  47. package/ui/server/routes/smartscan/scans/createBatchScans.js +4 -3
  48. package/ui/server/routes/smartscan/scans/createScan.js +2 -1
  49. package/ui/server/routes/smartscan/scans/getCachedResults.js +2 -1
  50. package/ui/server/routes/smartscan/scans/getScan.js +2 -1
  51. package/ui/server/routes/smartscan/scans/listScans.js +5 -4
  52. package/ui/server/routes/smartscan/scans.js +3 -3
  53. package/ui/server/routes/smartscan/token.js +4 -3
  54. package/ui/server/routes/smartscan/transport.js +1 -1
  55. package/ui/server/routes/smartscan.js +1 -1
  56. package/ui/server/routes/statistics.js +13 -10
  57. package/ui/server/utils/config-update.js +7 -6
  58. package/ui/server/utils/config.js +4 -4
  59. package/ui/server/utils/logger.js +2 -0
  60. package/ui/server/utils/paths.js +210 -2
  61. package/ui/server/utils/port.js +2 -2
  62. package/ui/server/utils/process.js +0 -67
  63. package/ui/server/utils/scan-cache/all-results.js +76 -59
  64. package/ui/server/utils/scan-cache/directory.js +1 -1
  65. package/ui/server/utils/scan-cache/file-operations.js +19 -16
  66. package/ui/server/utils/scan-cache/server-operations.js +14 -9
  67. package/ui/server/utils/serialization.js +9 -3
  68. package/ui/server/utils/smartscan-token.js +4 -3
  69. package/ui/server.js +86 -41
  70. package/ui/src/App.jsx +5 -5
  71. package/ui/src/CompositeLogs.jsx +20 -20
  72. package/ui/src/CompositeSetup.jsx +9 -9
  73. package/ui/src/HelpGuide/HelpGuideFooter.jsx +1 -0
  74. package/ui/src/HelpGuide/HelpGuideHeader.jsx +2 -1
  75. package/ui/src/HelpGuide.jsx +17 -4
  76. package/ui/src/IntroTour.jsx +19 -5
  77. package/ui/src/LogDetail.jsx +1 -0
  78. package/ui/src/LogTable.jsx +24 -6
  79. package/ui/src/PacketDetail.jsx +21 -16
  80. package/ui/src/PacketFilters.jsx +29 -14
  81. package/ui/src/PacketList.jsx +4 -5
  82. package/ui/src/SmartScan.jsx +5 -5
  83. package/ui/src/TabNavigation.jsx +5 -5
  84. package/ui/src/components/App/HelpButton.jsx +4 -0
  85. package/ui/src/components/App/TrafficTab.jsx +4 -4
  86. package/ui/src/components/App/useAppState.js +118 -24
  87. package/ui/src/components/BackupList.jsx +6 -2
  88. package/ui/src/components/CollapsibleSection.jsx +16 -2
  89. package/ui/src/components/ConfigViewerModal.jsx +17 -3
  90. package/ui/src/components/ConfirmationModal.jsx +20 -3
  91. package/ui/src/components/DetailsTab/BodySection.jsx +3 -1
  92. package/ui/src/components/DetailsTab/CollapsibleRequestResponse.jsx +14 -3
  93. package/ui/src/components/DetailsTab/InfoSection.jsx +4 -2
  94. package/ui/src/components/DetailsTab/RequestDetailsSection.jsx +7 -5
  95. package/ui/src/components/DetailsTab/ResponseDetailsSection.jsx +7 -5
  96. package/ui/src/components/DetectedPathsList.jsx +5 -2
  97. package/ui/src/components/FileInput.jsx +3 -1
  98. package/ui/src/components/GroupHeader.jsx +14 -0
  99. package/ui/src/components/GroupedByMcpView.jsx +3 -4
  100. package/ui/src/components/GroupedByServerView.jsx +1 -1
  101. package/ui/src/components/GroupedBySessionView.jsx +1 -1
  102. package/ui/src/components/HexTab.jsx +17 -4
  103. package/ui/src/components/LogsToolbar.jsx +3 -1
  104. package/ui/src/components/McpPlayground/LoadingModal.jsx +7 -3
  105. package/ui/src/components/McpPlayground/PromptsSection/PromptCallPanel.jsx +5 -0
  106. package/ui/src/components/McpPlayground/PromptsSection/PromptItem.jsx +6 -2
  107. package/ui/src/components/McpPlayground/PromptsSection/PromptsList.jsx +4 -4
  108. package/ui/src/components/McpPlayground/PromptsSection.jsx +2 -1
  109. package/ui/src/components/McpPlayground/ResourcesSection/ResourceCallPanel.jsx +3 -0
  110. package/ui/src/components/McpPlayground/ResourcesSection/ResourceItem.jsx +6 -2
  111. package/ui/src/components/McpPlayground/ResourcesSection/ResourcesList.jsx +4 -4
  112. package/ui/src/components/McpPlayground/ResourcesSection.jsx +2 -1
  113. package/ui/src/components/McpPlayground/ToolsSection/ToolCallPanel.jsx +5 -0
  114. package/ui/src/components/McpPlayground/ToolsSection/ToolItem.jsx +6 -2
  115. package/ui/src/components/McpPlayground/ToolsSection/ToolsList.jsx +4 -4
  116. package/ui/src/components/McpPlayground/ToolsSection.jsx +2 -1
  117. package/ui/src/components/McpPlayground/hooks/useMcpDataLoader.js +9 -9
  118. package/ui/src/components/McpPlayground/hooks/useMcpRequest.js +10 -5
  119. package/ui/src/components/McpPlayground/hooks/useMcpServerStatus.js +43 -23
  120. package/ui/src/components/McpPlayground/useMcpPlayground.js +72 -44
  121. package/ui/src/components/McpPlayground.jsx +5 -2
  122. package/ui/src/components/PacketDetailHeader.jsx +8 -3
  123. package/ui/src/components/PacketFilters/ExportControls.jsx +2 -1
  124. package/ui/src/components/PacketFilters/FilterInput.jsx +1 -1
  125. package/ui/src/components/RawTab.jsx +15 -2
  126. package/ui/src/components/RequestRow/OrphanedResponseRow.jsx +10 -2
  127. package/ui/src/components/RequestRow/RequestRowMain.jsx +12 -3
  128. package/ui/src/components/RequestRow/ResponseRow.jsx +11 -3
  129. package/ui/src/components/RequestRow.jsx +17 -9
  130. package/ui/src/components/ServerControl.jsx +3 -1
  131. package/ui/src/components/ServiceSelector.jsx +2 -0
  132. package/ui/src/components/SmartScan/AnalysisResult.jsx +2 -2
  133. package/ui/src/components/SmartScan/BatchResultsDisplay/BatchResultItem.jsx +2 -1
  134. package/ui/src/components/SmartScan/BatchResultsDisplay/BatchResultsHeader.jsx +1 -1
  135. package/ui/src/components/SmartScan/BatchResultsDisplay.jsx +9 -3
  136. package/ui/src/components/SmartScan/EmptyState.jsx +3 -0
  137. package/ui/src/components/SmartScan/ErrorDisplay.jsx +4 -2
  138. package/ui/src/components/SmartScan/ExpandableSection.jsx +4 -0
  139. package/ui/src/components/SmartScan/FindingsTable.jsx +46 -42
  140. package/ui/src/components/SmartScan/ListViewContent.jsx +2 -2
  141. package/ui/src/components/SmartScan/NotablePatternsSection.jsx +13 -8
  142. package/ui/src/components/SmartScan/OverallSummarySection.jsx +36 -29
  143. package/ui/src/components/SmartScan/RecommendationsSection.jsx +10 -8
  144. package/ui/src/components/SmartScan/ScanDetailHeader.jsx +2 -1
  145. package/ui/src/components/SmartScan/ScanDetailView.jsx +4 -4
  146. package/ui/src/components/SmartScan/ScanListView/ScanListHeader.jsx +2 -1
  147. package/ui/src/components/SmartScan/ScanListView/ScanListItem.jsx +15 -1
  148. package/ui/src/components/SmartScan/ScanOverviewSection.jsx +3 -1
  149. package/ui/src/components/SmartScan/ScanResultsDisplay.jsx +1 -1
  150. package/ui/src/components/SmartScan/ScanViewContent.jsx +2 -2
  151. package/ui/src/components/SmartScan/ScanningProgress.jsx +4 -2
  152. package/ui/src/components/SmartScan/ServerInfoSection.jsx +3 -1
  153. package/ui/src/components/SmartScan/ServerSelectionRow.jsx +4 -2
  154. package/ui/src/components/SmartScan/SingleResultDisplay.jsx +5 -3
  155. package/ui/src/components/SmartScan/SmartScanControls.jsx +11 -7
  156. package/ui/src/components/SmartScan/SmartScanHeader.jsx +1 -1
  157. package/ui/src/components/SmartScan/ViewModeTabs.jsx +2 -0
  158. package/ui/src/components/SmartScan/hooks/useCacheManagement.js +1 -2
  159. package/ui/src/components/SmartScan/hooks/useMcpDiscovery.js +22 -26
  160. package/ui/src/components/SmartScan/hooks/useScanList.js +10 -9
  161. package/ui/src/components/SmartScan/hooks/useScanOperations.js +23 -14
  162. package/ui/src/components/SmartScan/hooks/useServerStatus.js +2 -2
  163. package/ui/src/components/SmartScan/hooks/useTokenManagement.js +2 -2
  164. package/ui/src/components/SmartScan/scanDataUtils.js +22 -17
  165. package/ui/src/components/SmartScan/useSmartScan.js +4 -4
  166. package/ui/src/components/SmartScan/utils.js +3 -1
  167. package/ui/src/components/SmartScanIcons.jsx +6 -3
  168. package/ui/src/components/TabNavigation/DesktopTabs.jsx +8 -3
  169. package/ui/src/components/TabNavigation/MobileDropdown.jsx +3 -1
  170. package/ui/src/components/TabNavigation.jsx +8 -3
  171. package/ui/src/components/TabNavigationIcons.jsx +4 -4
  172. package/ui/src/components/TourOverlay.jsx +1 -1
  173. package/ui/src/components/TourTooltip/TourTooltipButtons.jsx +3 -0
  174. package/ui/src/components/TourTooltip/TourTooltipHeader.jsx +1 -0
  175. package/ui/src/components/TourTooltip/TourTooltipIcons.jsx +9 -0
  176. package/ui/src/components/TourTooltip/useTooltipPosition.js +63 -36
  177. package/ui/src/components/TourTooltip.jsx +11 -3
  178. package/ui/src/components/ViewModeTabs.jsx +3 -1
  179. package/ui/src/config/tourSteps.jsx +0 -2
  180. package/ui/src/hooks/useAnimation.js +15 -12
  181. package/ui/src/hooks/useConfigManagement.js +8 -8
  182. package/ui/src/hooks/useServiceExtraction.js +1 -1
  183. package/ui/src/index.css +3 -8
  184. package/ui/src/theme.js +3 -3
  185. package/ui/src/utils/hexUtils.js +11 -5
  186. package/ui/src/utils/mcpGroupingUtils.js +18 -10
  187. package/ui/src/utils/requestPairing.js +89 -0
  188. package/ui/src/utils/requestUtils.js +32 -101
  189. package/ui/vite.config.js +1 -1
  190. package/mcp-server/.editorconfig +0 -15
  191. package/mcp-server/.prettierignore +0 -11
  192. package/mcp-server/.prettierrc +0 -12
  193. package/mcp-server/README.md +0 -280
  194. package/mcp-server/commitlint.config.cjs +0 -42
  195. package/mcp-server/eslint.config.js +0 -131
  196. package/mcp-server/package-lock.json +0 -4784
  197. package/mcp-server/package.json +0 -30
  198. package/ui/README.md +0 -212
  199. package/ui/package-lock.json +0 -3574
  200. package/ui/package.json +0 -12
  201. package/ui/paths.js +0 -282
  202. package/ui/server/routes/backups.js +0 -251
  203. package/ui/server/routes/composite.js +0 -260
package/README.md CHANGED
@@ -11,9 +11,9 @@
11
11
  [![npm version](https://img.shields.io/npm/v/@mcp-shark/mcp-shark.svg)](https://www.npmjs.com/package/@mcp-shark/mcp-shark)
12
12
  [![License: Non-Commercial](https://img.shields.io/badge/License-Non--Commercial-red.svg)](LICENSE)
13
13
 
14
- ## 📦 Download Desktop App
14
+ ## Desktop Application
15
15
 
16
- Prefer a desktop application? Download the native desktop app:
16
+ Download the native desktop application for macOS, Windows, or Linux:
17
17
 
18
18
  | Platform | Download |
19
19
  | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
@@ -21,719 +21,158 @@ Prefer a desktop application? Download the native desktop app:
21
21
  | **Windows** | [Download (Installer)](https://github.com/mcp-shark/mcp-shark-app/releases/download/v1.3.0/MCP.Shark.Setup.1.3.0.exe) |
22
22
  | **Linux** | [Download (ARM64 DEB)](https://github.com/mcp-shark/mcp-shark-app/releases/download/v1.3.0/mcp-shark-app_1.3.0_arm64.deb) |
23
23
 
24
- > **⚠️ ALPHA VERSION - STILL TESTING**
25
- > This is an alpha version of MCP Shark. The software is still under active development and testing. Features may change, and there may be bugs or incomplete functionality. Use at your own risk.
24
+ The desktop application provides a native experience with automatic updates and system integration. No Node.js installation required.
26
25
 
27
- ## 📦 npm Package
26
+ ## npm Package
28
27
 
29
28
  ### Installation
30
29
 
31
- **Install globally (recommended):**
30
+ **Global installation (recommended):**
32
31
 
33
32
  ```bash
34
33
  npm install -g @mcp-shark/mcp-shark
35
34
  ```
36
35
 
37
- **Install locally in your project:**
36
+ **Local installation:**
38
37
 
39
38
  ```bash
40
39
  npm install @mcp-shark/mcp-shark
41
40
  ```
42
41
 
43
- **Use npx (no installation required):**
42
+ **Using npx (no installation required):**
44
43
 
45
44
  ```bash
45
+ npx @mcp-shark/mcp-shark --open
46
+ # or
47
+ npx @mcp-shark/mcp-shark -o
48
+ # or
46
49
  npx @mcp-shark/mcp-shark
47
50
  ```
48
51
 
49
52
  ### Usage
50
53
 
51
- After global installation, simply run:
54
+ After global installation, run:
52
55
 
53
56
  ```bash
54
57
  mcp-shark
55
58
  ```
56
59
 
57
- Or with npx:
58
-
59
- ```bash
60
- npx @mcp-shark/mcp-shark
61
- ```
62
-
63
- Or if installed locally:
64
-
65
- ```bash
66
- npx @mcp-shark/mcp-shark
67
- ```
68
-
69
- **Open browser automatically:**
70
-
71
- ```bash
72
- mcp-shark --open
73
- # or
74
- mcp-shark -o
75
- ```
76
-
77
- The UI will automatically:
60
+ **Options:**
61
+ - `--open` or `-o`: Automatically open the browser after starting
78
62
 
63
+ The executable will:
79
64
  - Install dependencies if needed
80
65
  - Build the frontend if needed
81
66
  - Start the server on `http://localhost:9853`
82
- - Optionally open your browser automatically (with `--open` flag)
83
-
84
- Open your browser to `http://localhost:9853` to access the MCP Shark interface.
85
-
86
- ### Package Information
67
+ - Optionally open your browser automatically
87
68
 
69
+ **Package Information:**
88
70
  - **Package Name**: `@mcp-shark/mcp-shark`
89
71
  - **npm Registry**: [https://www.npmjs.com/package/@mcp-shark/mcp-shark](https://www.npmjs.com/package/@mcp-shark/mcp-shark)
90
- - **Version**: Check latest version on npm
72
+ - **Version**: 1.4.2
91
73
  - **License**: Source-Available Non-Commercial (see [LICENSE](LICENSE) for details)
92
74
  - **Node.js**: Requires Node.js 18+
93
75
 
94
- ## 📖 Table of Contents
95
-
96
- - [npm Package](#-npm-package)
97
- - [Installation](#installation)
98
- - [Usage](#usage)
99
- - [Package Information](#package-information)
100
- - [About](#about)
101
- - [Key Features](#-key-features)
102
- - [Multi-Server Aggregation](#-multi-server-aggregation)
103
- - [Real-Time Monitoring & Analysis](#-real-time-monitoring--analysis)
104
- - [MCP Playground](#-mcp-playground)
105
- - [Smart Scan](#-smart-scan)
106
- - [IDE Integration](#-ide-integration)
107
- - [Analytics & Statistics](#-analytics--statistics)
108
- - [Data Management](#-data-management)
109
- - [Modern UI/UX](#-modern-uiux)
110
- - [Configuration Management](#-configuration-management)
111
- - [User Guide](#-user-guide)
112
- - [Getting Started](#getting-started)
113
- - [UI Tabs Overview](#ui-tabs-overview)
114
- - [Traffic Capture](#traffic-capture)
115
- - [MCP Playground](#mcp-playground-1)
116
- - [Smart Scan](#smart-scan-1)
117
- - [MCP Shark Logs](#mcp-shark-logs)
118
- - [MCP Server Setup](#mcp-server-setup)
119
- - [Advanced Features](#advanced-features)
120
- - [Exporting Data](#exporting-data)
121
- - [Backup Management](#backup-management)
122
- - [Session Management](#session-management-1)
123
- - [Performance Analysis](#performance-analysis)
124
- - [Architecture](#-architecture)
125
- - [Supported MCP Methods](#-supported-mcp-methods)
126
- - [Audit Logging](#-audit-logging)
127
- - [Configuration](#-configuration)
128
- - [Use Cases](#-use-cases)
129
- - [Requirements](#-requirements)
130
- - [Troubleshooting](#-troubleshooting)
131
- - [Contributing](#-contributing)
132
- - [Related Projects](#-related-projects)
133
- - [License](#-license)
134
-
135
- ## About
136
-
137
- MCP Shark is a complete solution for aggregating multiple MCP servers (both HTTP and stdio-based) into one cohesive endpoint, with a real-time web interface for monitoring and inspecting all communications. Think of it as **Wireshark for MCP** - providing deep visibility into every request and response.
138
-
139
- ![MCP Shark Architecture](images/architecture.svg)
140
-
141
- ## 📦 Desktop App
142
-
143
- Prefer a desktop application? Download the native desktop app:
144
-
145
- | Platform | Download |
146
- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
147
- | **macOS** | [Download (ARM64)](https://github.com/mcp-shark/mcp-shark-app/releases/download/v1.3.0/MCP.Shark-1.3.0-arm64-mac.zip) |
148
- | **Windows** | [Download (Installer)](https://github.com/mcp-shark/mcp-shark-app/releases/download/v1.3.0/MCP.Shark.Setup.1.3.0.exe) |
149
- | **Linux** | [Download (ARM64 DEB)](https://github.com/mcp-shark/mcp-shark-app/releases/download/v1.3.0/mcp-shark-app_1.3.0_arm64.deb) |
150
-
151
- ## ✨ Key Features
152
-
153
- ### 🔗 Multi-Server Aggregation
154
-
155
- - Connect to multiple MCP servers simultaneously (HTTP and stdio)
156
- - Unified API for tools, prompts, and resources from all servers
157
- - Service selection — choose which servers to activate
158
- - Automatic load balancing and failover
159
- - Support for both HTTP and stdio-based MCP servers
160
-
161
- ### 📊 Real-Time Monitoring & Analysis
162
-
163
- **Wireshark-like Interface** — Detailed packet inspection with frame numbers, timestamps, and protocol information
164
-
165
- ![Traffic General List View](images/traffic-general-list.png)
166
-
167
- **Multiple View Modes:**
168
-
169
- - **General List View** — Flat chronological view of all traffic
170
- - **Grouped by Session & Server** — Organize by conversation sessions
171
- - **Grouped by Server & Session** — Organize by server activity
172
- - **Protocol View** — View traffic by protocol type
173
-
174
- ![Traffic Protocol View](images/traffic-protocol-view.png)
175
-
176
- **Advanced Features:**
177
-
178
- - **Live Traffic Capture** — WebSocket-powered real-time updates
179
- - **Advanced Filtering** — Filter by method, status, protocol, session, server, direction, and more
180
- - **Full-Text Search** — Search across all fields including URLs, endpoints, and JSON-RPC methods
181
- - **Detailed Packet Inspection** — Click any packet to see full headers, request/response body, timing information, and JSON-RPC details
182
-
183
- ![Traffic Detail View](images/traffic-detail-view.png)
184
-
185
- ### 🎮 MCP Playground
186
-
187
- **Interactive testing environment for exploring and testing MCP servers** — one of MCP Shark's standout features.
188
-
189
- ![MCP Playground - Tools](images/playground-tools.png)
190
-
191
- **Interactive Tool Testing:**
192
-
193
- - Browse all available tools from all servers in one place
194
- - See tool descriptions, parameters, and schemas
195
- - Call tools with custom JSON arguments
196
- - View results in real-time with formatted output
197
- - Test edge cases and different parameter combinations
198
-
199
- **Prompt Exploration:**
200
-
201
- - List all prompts from all connected servers
202
- - View prompt descriptions and argument schemas
203
- - Test prompts with different arguments
204
- - See formatted prompt results
205
- - Understand how prompts work across different servers
206
-
207
- **Resource Browsing:**
208
-
209
- - Discover all available resources across all servers
210
- - Read resource contents directly in the UI
211
- - Explore resource URIs and metadata
212
- - Understand resource structure and format
213
-
214
- **Session Management:**
215
-
216
- - Automatic session tracking
217
- - Maintains context across multiple tool calls
218
- - Test stateful workflows and conversations
219
- - Debug session-related issues
220
-
221
- **Use Cases:**
222
-
223
- - **Development**: Test tools before integrating them into your code
224
- - **Debugging**: Verify tool behavior and troubleshoot issues
225
- - **Exploration**: Discover what tools and resources are available
226
- - **Learning**: Understand how different MCP servers work
227
- - **Documentation**: Generate examples and test cases
228
-
229
- ### 🔍 Smart Scan
230
-
231
- **AI-powered security analysis for MCP servers** — automatically scan and analyze your MCP servers for potential security risks and vulnerabilities.
232
-
233
- ![Smart Scan Main](images/smart-scan-main.png)
234
-
235
- **AI-Powered Security Analysis:**
236
-
237
- - **Automated Scanning** — Discover and scan multiple MCP servers automatically
238
- - **Security Risk Assessment** — Get overall risk levels (LOW, MEDIUM, HIGH) for each server
239
- - **Detailed Findings** — View comprehensive security analysis including:
240
- - Tool security analysis
241
- - Prompt injection risks
242
- - Resource access patterns
243
- - Overall security recommendations
244
- - **Cached Results** — Results are cached for quick access without re-scanning
245
-
246
- **Batch Scanning:**
247
-
248
- - **Server Discovery** — Automatically discover MCP servers from your configuration
249
- - **Selective Scanning** — Choose which servers to scan
250
- - **Batch Processing** — Scan multiple servers in parallel
251
- - **Progress Tracking** — Monitor scan progress in real-time
252
-
253
- **Risk Assessment:**
254
-
255
- - **Overall Risk Level** — Quick visual indicator of security posture
256
- - **Detailed Findings** — Comprehensive list of security concerns
257
- - **Recommendations** — Actionable security recommendations
258
- - **Full Report Access** — View complete analysis reports with detailed findings
259
- - Click "view results" button in the scan results to open full reports
260
- - Reports are available at [https://smart.mcpshark.sh](https://smart.mcpshark.sh)
261
- - Each scan result includes a direct link to its detailed analysis page
262
-
263
- ![Smart Scan Results](images/smart-scan-results.png)
264
-
265
- ### 🔌 IDE Integration
266
-
267
- **Seamless integration with popular IDEs and editors:**
268
-
269
- - **Cursor** — Automatically detects and uses `~/.cursor/mcp.json`
270
- - **Windsurf** — Automatically detects and uses `~/.codeium/windsurf/mcp_config.json`
271
- - **Custom Configurations** — Upload and use any MCP configuration file
272
-
273
- **Automatic Configuration:**
274
-
275
- - Detects your IDE's MCP configuration files
276
- - Converts IDE-specific config formats to MCP Shark format
277
- - Creates backups before making any changes
278
- - Updates your IDE config to point to MCP Shark server
279
- - Restores original configuration when you stop the server
280
-
281
- **Zero-Configuration Setup:**
282
-
283
- 1. Start MCP Shark UI
284
- 2. Select your IDE from the detected list (or upload your config)
285
- 3. Choose which servers to enable (optional)
286
- 4. Click "Start MCP Shark"
287
- 5. Your IDE is now using MCP Shark automatically
288
-
289
- No manual configuration editing required - MCP Shark handles everything for you.
290
-
291
- ![MCP Server Setup](images/server-setup.png)
292
-
293
- ### 📈 Analytics & Statistics
294
-
295
- - **Traffic Statistics** — View request counts, unique sessions, and server activity
296
- - **Performance Metrics** — Duration, latency, and timing information for each request
297
- - **Error Tracking** — Comprehensive error logging with stack traces
298
- - **Session Analytics** — Track conversations and stateful interactions
299
-
300
- ### 💾 Data Management
301
-
302
- - **Export Capabilities** — Export captured traffic in JSON, CSV, or TXT formats
303
- - **Backup Management** — Automatic backups of configuration files with restore functionality
304
- - **Log Export** — Export server logs as text files
305
- - **SQLite Database** — Efficient storage with direct database access for advanced analysis
306
-
307
- ### 🎨 Modern UI/UX
76
+ ## Quick Start
308
77
 
309
- - **Dark Theme** — Developer-friendly dark interface
310
- - **Interactive Tour** — Built-in onboarding guide for first-time users
311
- - **Responsive Design** — Works seamlessly across different screen sizes
312
- - **Adaptive Navigation** — Dropdown menu for smaller windows (< 1200px)
313
- - **Compact Views** — Optimized layouts for mobile and tablet devices
314
- - **Animated Transitions** — Smooth animations for better user experience
315
- - **Hex View** — Binary data inspection with hex viewer
316
- - **Raw/JSON View** — Multiple payload viewing modes (Raw, JSON, Hex)
317
- - **Compact Scan Results** — Single-row display for scan results with quick access to full reports
318
-
319
- ### ⚙️ Configuration Management
320
-
321
- - **Auto-Detection** — Automatically detects IDE configuration files
322
- - **Config Conversion** — Converts IDE config format to MCP Shark format
323
- - **Backup & Restore** — Automatic backups before making changes
324
- - **Config Viewer** — View and inspect configuration files and backups
325
- - **Service Filtering** — Selectively enable/disable specific servers
326
-
327
- ## 📚 User Guide
328
-
329
- ### Getting Started
330
-
331
- 1. **Install MCP Shark:**
332
-
333
- ```bash
78
+ 1. **Install:**
79
+ ```bash
334
80
  npm install -g @mcp-shark/mcp-shark
335
- ```
336
-
337
- 2. **Start MCP Shark:**
81
+ ```
338
82
 
339
- ```bash
340
- mcp-shark
341
- ```
342
-
343
- Or to automatically open your browser:
344
-
345
- ```bash
83
+ 2. **Run:**
84
+ ```bash
346
85
  mcp-shark --open
347
- ```
348
-
349
- 3. **Open your browser:**
350
- Navigate to `http://localhost:9853` (or it will open automatically with `--open` flag)
351
-
352
- 4. **Interactive Tour**: On first launch, you'll see an interactive tour - follow it to get started
353
-
354
- 5. **Configure Servers**: Go to the "MCP Server Setup" tab
355
-
356
- 6. **Select Configuration**: Choose from detected editors or upload your own config file
357
-
358
- 7. **Start Monitoring**: Click "Start MCP Shark" to begin capturing traffic
359
-
360
- ### UI Tabs Overview
361
-
362
- #### Traffic Capture
363
-
364
- The main monitoring interface with Wireshark-like capabilities:
365
-
366
- - **Real-time Updates**: See requests and responses as they happen
367
- - **Multiple Views**:
368
- - **General List**: Flat chronological view of all traffic
369
- - **Grouped by Session & Server**: Organize by conversation sessions
370
- - **Grouped by Server & Session**: Organize by server activity
371
- - **Protocol View**: View traffic by protocol type
372
- - **Advanced Filters**:
373
- - Search across all fields
374
- - Filter by HTTP method (GET, POST, etc.)
375
- - Filter by status code
376
- - Filter by protocol
377
- - Filter by direction (Request/Response)
378
- - Filter by session ID
379
- - Filter by server name
380
- - **Packet Details**: Click any packet to see:
381
- - Full headers
382
- - Request/response body
383
- - Timing information
384
- - JSON-RPC details
385
- - Raw, JSON, and Hex views
386
- - **Export**: Export filtered results in JSON, CSV, or TXT formats
387
- - **Statistics**: View traffic statistics including request counts and unique sessions
388
-
389
- #### MCP Playground
390
-
391
- Interactive testing environment for MCP servers:
392
-
393
- - **Tools Section**:
394
- - Browse all available tools from all servers
395
- - Call tools with custom arguments
396
- - View results in real-time
397
- - See tool descriptions and parameters
398
- - **Prompts Section**:
399
- - List all prompts from all servers
400
- - Test prompts with different arguments
401
- - View prompt results
402
- - **Resources Section**:
403
- - Browse available resources
404
- - Read resource contents
405
- - Explore resource URIs
406
- - **Session Management**: Maintains session state for stateful interactions
407
-
408
- This is the perfect place to explore your MCP servers, test tools, and understand what capabilities are available.
409
-
410
- #### Smart Scan
411
-
412
- AI-powered security analysis for your MCP servers:
413
-
414
- - **Server Discovery** — Automatically discover MCP servers from your configuration
415
- - **Batch Scanning** — Scan multiple servers simultaneously
416
- - **Risk Assessment** — Get overall risk levels (LOW, MEDIUM, HIGH) for each server
417
- - **Compact Results View** — Single-row display showing:
418
- - Server name
419
- - Risk level badge (e.g., "medium risk", "low risk")
420
- - Quick "view results" button to access full reports
421
- - Status indicators (Cached, Success)
422
- - **Detailed Analysis** — View comprehensive security findings including:
423
- - Tool security analysis
424
- - Prompt injection risks
425
- - Resource access patterns
426
- - Security recommendations
427
- - **Cached Results** — Results are cached for quick access without re-scanning
428
- - **Full Report Access** — Click "view results" to see complete analysis with detailed findings
429
- - Opens full reports in a new tab at [https://smart.mcpshark.sh](https://smart.mcpshark.sh)
430
- - View comprehensive security analysis, findings, and recommendations
431
- - Access historical scan results and compare scans over time
432
-
433
- Smart Scan helps you identify potential security issues in your MCP servers before they become problems. View detailed scan reports and analysis at [https://smart.mcpshark.sh](https://smart.mcpshark.sh).
434
-
435
- #### MCP Shark Logs
436
-
437
- Server console output and debugging:
438
-
439
- - **Real-time Logs**: See server output as it happens
440
- - **Log Filtering**: Filter by log type (stdout, stderr, error)
441
- - **Export Logs**: Export logs as text files
442
- - **Auto-scroll**: Automatically scrolls to latest logs
443
- - **Color-coded**: Different colors for different log types
444
-
445
- #### MCP Server Setup
446
-
447
- Configuration and server management:
448
-
449
- - **Config Detection** — Automatically detects config files from:
450
- - Cursor: `~/.cursor/mcp.json`
451
- - Windsurf: `~/.codeium/windsurf/mcp_config.json`
452
- - **File Upload** — Upload your own MCP configuration file
453
- - **Service Selection** — Choose which servers to enable
454
- - **Config Viewer** — View and inspect configuration files
455
- - **Start/Stop Server** — Control the MCP Shark server
456
- - **Backup Management**:
457
- - View all backups with timestamps
458
- - Restore any backup
459
- - Delete backups
460
- - View backup contents
461
-
462
- ### Advanced Features
463
-
464
- #### Exporting Data
465
-
466
- **Traffic Export:**
467
-
468
- 1. Go to **Traffic Capture** tab
469
- 2. Apply any filters (optional)
470
- 3. Click **Export** button
471
- 4. Choose format:
472
- - **JSON**: Full structured data with all metadata
473
- - **CSV**: Spreadsheet-friendly format
474
- - **TXT**: Human-readable text format
475
-
476
- **Log Export:**
477
-
478
- 1. Go to **MCP Shark Logs** tab
479
- 2. Click **Export Logs** button
480
- 3. Logs are exported as a text file
481
-
482
- #### Backup Management
483
-
484
- MCP Shark automatically creates backups before modifying your configuration:
485
-
486
- 1. Go to **MCP Server Setup** tab
487
- 2. Scroll to **"Backed Up Configuration Files"** section
488
- 3. View all backups with:
489
- - Original file path
490
- - Backup location
491
- - Creation timestamp
492
- - File size
493
- 4. Actions available:
494
- - **View**: Inspect backup contents
495
- - **Restore**: Restore backup to original location
496
- - **Delete**: Remove backup file
497
-
498
- #### Session Management
499
-
500
- - **Automatic Session Tracking** — Sessions are automatically tracked and displayed
501
- - **Session Filtering** — Filter traffic by specific session IDs
502
- - **Session Grouping** — View traffic grouped by session for conversation analysis
503
- - **Session Persistence** — Sessions are maintained across requests
504
-
505
- #### Performance Analysis
506
-
507
- Each request/response includes:
508
-
509
- - **Duration** — Total request/response time
510
- - **Latency** — Network latency measurements
511
- - **Payload Size** — Request and response sizes
512
- - **Status Codes** — HTTP status codes
513
- - **Timing Breakdown** — Detailed timing information
514
-
515
- ## 🏗️ Architecture
516
-
517
- ![MCP Shark Architecture](images/architecture.svg)
518
-
519
- The diagram above illustrates how MCP Shark works:
520
-
521
- 1. **Your IDE** (Cursor, Windsurf, etc.) connects to MCP Shark Server via HTTP
522
- 2. **MCP Shark Server** (Port 9851) acts as a gateway, aggregating multiple MCP servers
523
- 3. **MCP Servers** (GitHub, Filesystem, Database, Custom) handle the actual requests
524
- 4. **SQLite Database** stores all traffic for audit logging
525
- 5. **MCP Shark UI** (Port 9853) reads from the database and provides real-time monitoring
526
-
527
- **Data Flow:**
528
-
529
- - Requests flow from IDE → MCP Shark Server → MCP Servers
530
- - Responses flow back through the same path
531
- - All traffic is logged to SQLite Database
532
- - UI reads from database and can control the server
533
-
534
- ## 🔧 Supported MCP Methods
535
-
536
- MCP Shark supports all standard MCP methods:
537
-
538
- - **`tools/list`** - List all tools from all servers
539
- - **`tools/call`** - Call a tool from any server (with server prefix: `server:tool_name`)
540
- - **`prompts/list`** - List all prompts from all servers
541
- - **`prompts/get`** - Get a specific prompt
542
- - **`resources/list`** - List all resources from all servers
543
- - **`resources/read`** - Read a specific resource
544
-
545
- ### Tool Naming Convention
546
-
547
- When calling tools, prefix with the server name:
548
-
549
- - `github:search_repositories` - Calls `search_repositories` from the `github` server
550
- - `@21st-dev/magic:create_component` - Calls `create_component` from the `@21st-dev/magic` server
551
-
552
- ## 📝 Audit Logging
553
-
554
- All MCP communications are logged to SQLite (default location: `~/.mcp-shark/db/mcp-shark.sqlite`) with:
555
-
556
- - **Request/Response Tracking**: Full payload logging with correlation IDs
557
- - **Performance Metrics**: Duration, latency, and timing information
558
- - **Error Tracking**: Comprehensive error logging with stack traces
559
- - **Session Management**: Session ID tracking for stateful interactions
560
- - **Server Identification**: Track which external server handled each request
561
- - **Request Correlation**: Match requests with their responses
562
-
563
- ### Database Schema
86
+ ```
564
87
 
565
- The database includes:
88
+ 3. **Access the UI:**
89
+ Navigate to `http://localhost:9853` (or it will open automatically with `--open`)
566
90
 
567
- - **`mcp_communications`**: All request/response communications
568
- - **`mcp_request_response_pairs`**: Correlated request/response pairs
569
- - **Sessions**: Automatic session tracking
91
+ 4. **Configure servers:**
92
+ Go to the "MCP Server Setup" tab and select your IDE configuration or upload a custom config file.
570
93
 
571
- The database can be accessed directly for advanced analysis or exported through the UI in JSON, CSV, or TXT formats.
94
+ 5. **Start monitoring:**
95
+ Click "Start MCP Shark" to begin capturing traffic.
572
96
 
573
- ## ⚙️ Configuration
97
+ For detailed instructions, see [Getting Started Guide](docs/getting-started.md).
574
98
 
575
- ### Automatic Configuration
99
+ ## Table of Contents
576
100
 
577
- MCP Shark automatically detects and converts configuration files from:
578
-
579
- - **Cursor** — `~/.cursor/mcp.json`
580
- - **Windsurf** — `~/.codeium/windsurf/mcp_config.json`
581
-
582
- ### Manual Configuration
583
-
584
- If you need to configure manually, create a file at `~/.mcp-shark/mcps.json`:
585
-
586
- **HTTP Server:**
587
-
588
- ```json
589
- {
590
- "servers": {
591
- "github": {
592
- "type": "http",
593
- "url": "https://api.githubcopilot.com/mcp/",
594
- "headers": {
595
- "Authorization": "Bearer YOUR_TOKEN"
596
- }
597
- }
598
- }
599
- }
600
- ```
601
-
602
- **stdio Server:**
603
-
604
- ```json
605
- {
606
- "servers": {
607
- "@21st-dev/magic": {
608
- "type": "stdio",
609
- "command": "npx",
610
- "args": ["-y", "@21st-dev/magic@latest", "API_KEY=\"your-api-key\""]
611
- }
612
- }
613
- }
614
- ```
615
-
616
- ## 🎯 Use Cases
617
-
618
- ### Development & Debugging
619
-
620
- - Debug MCP server interactions
621
- - Inspect request/response payloads
622
- - Analyze performance bottlenecks
623
- - Track down errors and issues
624
-
625
- ### Testing & QA
626
-
627
- - Test MCP tools, prompts, and resources using the Playground
628
- - Verify server responses
629
- - Validate configuration changes
630
- - Test with different arguments
631
-
632
- ### Monitoring & Analytics
633
-
634
- - Monitor MCP server usage
635
- - Track API call patterns
636
- - Analyze traffic statistics
637
- - Export data for reporting
638
-
639
- ### Learning & Exploration
640
-
641
- - Understand MCP protocol
642
- - Explore available tools and resources using the Playground
643
- - Learn how different servers work
644
- - Experiment with MCP capabilities
645
-
646
- ### Security Analysis
647
-
648
- - Scan MCP servers for security risks
649
- - Identify potential vulnerabilities
650
- - Get security recommendations
651
- - Track security posture over time
652
-
653
- ## 📋 Requirements
654
-
655
- - **Node.js** 18+ and npm
656
- - **Git** (for installing dependencies from GitHub, if needed)
101
+ - [Desktop Application](#desktop-application)
102
+ - [npm Package](#npm-package)
103
+ - [Quick Start](#quick-start)
104
+ - [About](#about)
105
+ - [Features](#features)
106
+ - [Documentation](#documentation)
107
+ - [Requirements](#requirements)
108
+ - [License](#license)
657
109
 
658
- ## 🔍 Troubleshooting
110
+ ## About
659
111
 
660
- ### Server Won't Start
112
+ MCP Shark is a monitoring and aggregation solution for Model Context Protocol (MCP) servers. It provides a unified interface for multiple MCP servers (both HTTP and stdio-based) with real-time traffic inspection, security analysis, and interactive testing capabilities.
661
113
 
662
- - Check if port 9851 is already in use
663
- - Verify configuration file is valid JSON
664
- - Check logs in the "MCP Shark Logs" tab
665
- - Ensure all required dependencies are installed
114
+ Key capabilities:
666
115
 
667
- ### No Traffic Appearing
116
+ - **Multi-server aggregation**: Connect to multiple MCP servers simultaneously
117
+ - **Real-time monitoring**: Wireshark-like interface for inspecting all MCP communications
118
+ - **Interactive playground**: Test tools, prompts, and resources directly in the UI
119
+ - **Security analysis**: AI-powered scanning for security risks and vulnerabilities
120
+ - **IDE integration**: Automatic configuration for Cursor, Windsurf, and other IDEs
668
121
 
669
- - Verify MCP Shark server is running (check status in Setup tab)
670
- - Ensure your IDE is configured to use `http://localhost:9851/mcp`
671
- - Check that your original config file was updated correctly
672
- - Restart the MCP Shark server
122
+ ## Features
673
123
 
674
- ### Configuration Issues
124
+ - **Traffic Capture**: Real-time monitoring with advanced filtering and search
125
+ - **MCP Playground**: Interactive testing environment for tools, prompts, and resources
126
+ - **Smart Scan**: AI-powered security analysis for MCP servers
127
+ - **Session Management**: Track and analyze conversation sessions
128
+ - **Export & Backup**: Export data in multiple formats and manage configuration backups
129
+ - **Statistics & Analytics**: Performance metrics and traffic analysis
675
130
 
676
- - Verify your config file is valid JSON
677
- - Check that server URLs are accessible
678
- - Ensure stdio commands are available in PATH
679
- - Review backup files if original config was modified
131
+ For detailed feature documentation, see [Features Guide](docs/features.md).
680
132
 
681
- ### Installation Issues
133
+ ## Documentation
682
134
 
683
- If you encounter issues with npm installation:
135
+ Comprehensive documentation is available in the [`docs/`](docs/) directory:
684
136
 
685
- ```bash
686
- # Clear npm cache
687
- npm cache clean --force
137
+ - **[Getting Started](docs/getting-started.md)** - Installation, setup, and first steps
138
+ - **[Features](docs/features.md)** - Detailed feature documentation
139
+ - **[User Guide](docs/user-guide.md)** - Complete guide to using MCP Shark
140
+ - **[Architecture](docs/architecture.md)** - System architecture and design
141
+ - **[API Reference](docs/api-reference.md)** - API endpoints and WebSocket protocol
142
+ - **[Configuration](docs/configuration.md)** - Configuration options and file formats
143
+ - **[Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions
144
+ - **[Development](docs/development.md)** - Developer guide and contribution guidelines
688
145
 
689
- # Try installing again
690
- npm install -g @mcp-shark/mcp-shark
691
- ```
146
+ ## Requirements
692
147
 
693
- For npx issues:
148
+ - **Node.js**: 18.0.0 or higher
149
+ - **npm**: Comes with Node.js
150
+ - **Operating System**: macOS, Windows, or Linux
694
151
 
695
- ```bash
696
- # Ensure you have the latest npm
697
- npm install -g npm@latest
152
+ ## License
698
153
 
699
- # Try running again
700
- npx @mcp-shark/mcp-shark
701
- ```
154
+ Source-Available Non-Commercial License
702
155
 
703
- ## 🤝 Contributing
156
+ This is not an OSI-approved open source license. The source code is available, but commercial use is prohibited without a separate commercial agreement.
704
157
 
705
- We welcome contributions! Please see:
158
+ **Summary:**
159
+ - ✅ **Allowed**: View, fork, modify, and run for personal, educational, or internal company use
160
+ - ❌ **Not Allowed**: Sell, resell, or integrate into paid products/services without written permission
706
161
 
707
- - **[CONTRIBUTING.md](./CONTRIBUTING.md)**: Guidelines for contributing
708
- - **[DEVELOPERS.md](./DEVELOPERS.md)**: Developer guide and setup
709
- - **[SETUP.md](./SETUP.md)**: Initial setup instructions
162
+ See the [LICENSE](LICENSE) file for full terms and conditions.
710
163
 
711
- ## 🔗 Related Projects
164
+ ## Related Projects
712
165
 
713
166
  - **[mcp-shark-app](https://github.com/mcp-shark/mcp-shark-app)**: Electron desktop application wrapper
714
167
  - **[mcp-shark-site](https://github.com/mcp-shark/mcp-shark-site)**: Official website and documentation
715
168
  - **[smart-scan-web-app](https://github.com/mcp-shark/smart-scan-web-app)**: Smart Scan web interface
716
169
 
717
- ## 📄 License
718
-
719
- Source-Available Non-Commercial License
720
-
721
- > **Note**: This is **not** an OSI-approved open source license. The source code is available, but **commercial use is prohibited** without a separate commercial agreement.
722
-
723
- **Summary:**
724
-
725
- - ✅ **Allowed**: View, fork, modify, and run the code for personal, educational, or internal company use
726
- - ❌ **Not Allowed**:
727
- - Sell this project or resell hosted versions
728
- - Integrate it into a paid product/service without written permission
729
- - Use the name, logo, or branding to imply endorsement
170
+ ## Support
730
171
 
731
- **Commercial Use**: Commercial use requires a separate written commercial license agreement. To inquire about a commercial license, please contact the project maintainers.
732
-
733
- See the [LICENSE](LICENSE) file for full terms and conditions.
172
+ - **Documentation**: [docs/](docs/)
173
+ - **Issues**: [GitHub Issues](https://github.com/mcp-shark/mcp-shark/issues)
174
+ - **Website**: [https://mcpshark.sh](https://mcpshark.sh)
734
175
 
735
176
  ---
736
177
 
737
- **Built with ❤️ for the MCP community**
738
-
739
- For more information, visit [https://mcpshark.sh](https://mcpshark.sh)
178
+ **Version**: 1.5.0 | **Homepage**: [https://mcpshark.sh](https://mcpshark.sh)