@mcp-shark/mcp-shark 1.4.1 โ 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.
- package/README.md +84 -645
- package/bin/mcp-shark.js +30 -36
- package/mcp-server/index.js +115 -0
- package/mcp-server/lib/auditor/audit.js +34 -42
- package/mcp-server/lib/common/error.js +1 -1
- package/mcp-server/lib/server/external/all.js +5 -6
- package/mcp-server/lib/server/external/config.js +1 -3
- package/mcp-server/lib/server/external/kv.js +21 -40
- package/mcp-server/lib/server/external/single/request.js +3 -6
- package/mcp-server/lib/server/external/single/run.js +8 -19
- package/mcp-server/lib/server/internal/handlers/prompts-get.js +5 -7
- package/mcp-server/lib/server/internal/handlers/prompts-list.js +5 -4
- package/mcp-server/lib/server/internal/handlers/resources-list.js +5 -4
- package/mcp-server/lib/server/internal/handlers/resources-read.js +5 -4
- package/mcp-server/lib/server/internal/handlers/tools-call.js +8 -10
- package/mcp-server/lib/server/internal/handlers/tools-list.js +6 -5
- package/mcp-server/lib/server/internal/run.js +5 -17
- package/mcp-server/lib/server/internal/server.js +14 -15
- package/mcp-server/lib/server/internal/session.js +8 -13
- package/mcp-server/mcp-shark.js +16 -66
- package/package.json +23 -38
- package/ui/dist/assets/index-Cc-IUa83.css +1 -0
- package/ui/dist/assets/index-srLDlk97.js +35 -0
- package/ui/dist/index.html +17 -0
- package/ui/dist/og-image.png +0 -0
- package/ui/server/routes/backups/deleteBackup.js +54 -0
- package/ui/server/routes/backups/index.js +15 -0
- package/ui/server/routes/backups/listBackups.js +75 -0
- package/ui/server/routes/backups/restoreBackup.js +83 -0
- package/ui/server/routes/backups/viewBackup.js +47 -0
- package/ui/server/routes/composite/index.js +46 -0
- package/ui/server/routes/composite/servers.js +18 -0
- package/ui/server/routes/composite/setup.js +129 -0
- package/ui/server/routes/composite/status.js +7 -0
- package/ui/server/routes/composite/stop.js +39 -0
- package/ui/server/routes/composite/utils.js +45 -0
- package/ui/server/routes/config.js +34 -30
- package/ui/server/routes/conversations.js +3 -3
- package/ui/server/routes/help.js +2 -2
- package/ui/server/routes/logs.js +5 -5
- package/ui/server/routes/playground.js +91 -62
- package/ui/server/routes/requests.js +112 -108
- package/ui/server/routes/sessions.js +4 -4
- package/ui/server/routes/settings.js +199 -0
- package/ui/server/routes/smartscan/discover.js +7 -6
- package/ui/server/routes/smartscan/scans/clearCache.js +3 -2
- package/ui/server/routes/smartscan/scans/createBatchScans.js +4 -3
- package/ui/server/routes/smartscan/scans/createScan.js +2 -1
- package/ui/server/routes/smartscan/scans/getCachedResults.js +2 -1
- package/ui/server/routes/smartscan/scans/getScan.js +2 -1
- package/ui/server/routes/smartscan/scans/listScans.js +5 -4
- package/ui/server/routes/smartscan/scans.js +3 -3
- package/ui/server/routes/smartscan/token.js +4 -3
- package/ui/server/routes/smartscan/transport.js +1 -1
- package/ui/server/routes/smartscan.js +1 -1
- package/ui/server/routes/statistics.js +13 -10
- package/ui/server/utils/config-update.js +140 -112
- package/ui/server/utils/config.js +4 -4
- package/ui/server/utils/logger.js +2 -0
- package/ui/server/utils/paths.js +210 -2
- package/ui/server/utils/port.js +2 -2
- package/ui/server/utils/process.js +0 -67
- package/ui/server/utils/scan-cache/all-results.js +76 -59
- package/ui/server/utils/scan-cache/directory.js +1 -1
- package/ui/server/utils/scan-cache/file-operations.js +19 -16
- package/ui/server/utils/scan-cache/server-operations.js +14 -9
- package/ui/server/utils/serialization.js +9 -3
- package/ui/server/utils/smartscan-token.js +4 -3
- package/ui/server.js +87 -41
- package/ui/src/App.jsx +5 -5
- package/ui/src/CompositeLogs.jsx +20 -20
- package/ui/src/CompositeSetup.jsx +9 -9
- package/ui/src/HelpGuide/HelpGuideFooter.jsx +1 -0
- package/ui/src/HelpGuide/HelpGuideHeader.jsx +2 -1
- package/ui/src/HelpGuide.jsx +17 -4
- package/ui/src/IntroTour.jsx +19 -5
- package/ui/src/LogDetail.jsx +1 -0
- package/ui/src/LogTable.jsx +24 -6
- package/ui/src/PacketDetail.jsx +21 -16
- package/ui/src/PacketFilters.jsx +29 -14
- package/ui/src/PacketList.jsx +4 -5
- package/ui/src/SmartScan.jsx +5 -5
- package/ui/src/TabNavigation.jsx +5 -5
- package/ui/src/components/App/HelpButton.jsx +4 -0
- package/ui/src/components/App/TrafficTab.jsx +4 -4
- package/ui/src/components/App/useAppState.js +118 -24
- package/ui/src/components/BackupList.jsx +6 -2
- package/ui/src/components/CollapsibleSection.jsx +16 -2
- package/ui/src/components/ConfigViewerModal.jsx +17 -3
- package/ui/src/components/ConfirmationModal.jsx +20 -3
- package/ui/src/components/DetailsTab/BodySection.jsx +3 -1
- package/ui/src/components/DetailsTab/CollapsibleRequestResponse.jsx +14 -3
- package/ui/src/components/DetailsTab/InfoSection.jsx +4 -2
- package/ui/src/components/DetailsTab/RequestDetailsSection.jsx +7 -5
- package/ui/src/components/DetailsTab/ResponseDetailsSection.jsx +7 -5
- package/ui/src/components/DetectedPathsList.jsx +5 -2
- package/ui/src/components/FileInput.jsx +3 -1
- package/ui/src/components/GroupHeader.jsx +14 -0
- package/ui/src/components/GroupedByMcpView.jsx +3 -10
- package/ui/src/components/GroupedByServerView.jsx +1 -1
- package/ui/src/components/GroupedBySessionView.jsx +1 -1
- package/ui/src/components/HexTab.jsx +17 -4
- package/ui/src/components/LogsToolbar.jsx +3 -1
- package/ui/src/components/McpPlayground/LoadingModal.jsx +7 -3
- package/ui/src/components/McpPlayground/PromptsSection/PromptCallPanel.jsx +5 -0
- package/ui/src/components/McpPlayground/PromptsSection/PromptItem.jsx +52 -23
- package/ui/src/components/McpPlayground/PromptsSection/PromptsList.jsx +13 -11
- package/ui/src/components/McpPlayground/PromptsSection.jsx +2 -1
- package/ui/src/components/McpPlayground/ResourcesSection/ResourceCallPanel.jsx +3 -0
- package/ui/src/components/McpPlayground/ResourcesSection/ResourceItem.jsx +66 -34
- package/ui/src/components/McpPlayground/ResourcesSection/ResourcesList.jsx +13 -11
- package/ui/src/components/McpPlayground/ResourcesSection.jsx +2 -1
- package/ui/src/components/McpPlayground/ToolsSection/ToolCallPanel.jsx +5 -0
- package/ui/src/components/McpPlayground/ToolsSection/ToolItem.jsx +52 -23
- package/ui/src/components/McpPlayground/ToolsSection/ToolsList.jsx +13 -11
- package/ui/src/components/McpPlayground/ToolsSection.jsx +2 -1
- package/ui/src/components/McpPlayground/hooks/useMcpDataLoader.js +107 -0
- package/ui/src/components/McpPlayground/hooks/useMcpRequest.js +70 -0
- package/ui/src/components/McpPlayground/hooks/useMcpServerStatus.js +90 -0
- package/ui/src/components/McpPlayground/useMcpPlayground.js +118 -159
- package/ui/src/components/McpPlayground.jsx +105 -23
- package/ui/src/components/PacketDetailHeader.jsx +8 -3
- package/ui/src/components/PacketFilters/ExportControls.jsx +2 -1
- package/ui/src/components/PacketFilters/FilterInput.jsx +1 -1
- package/ui/src/components/RawTab.jsx +15 -2
- package/ui/src/components/RequestRow/OrphanedResponseRow.jsx +10 -2
- package/ui/src/components/RequestRow/RequestRowMain.jsx +12 -3
- package/ui/src/components/RequestRow/ResponseRow.jsx +11 -3
- package/ui/src/components/RequestRow.jsx +17 -9
- package/ui/src/components/ServerControl.jsx +3 -1
- package/ui/src/components/ServiceSelector.jsx +2 -0
- package/ui/src/components/SmartScan/AnalysisResult.jsx +2 -2
- package/ui/src/components/SmartScan/BatchResultsDisplay/BatchResultItem.jsx +2 -1
- package/ui/src/components/SmartScan/BatchResultsDisplay/BatchResultsHeader.jsx +1 -1
- package/ui/src/components/SmartScan/BatchResultsDisplay.jsx +9 -3
- package/ui/src/components/SmartScan/EmptyState.jsx +3 -0
- package/ui/src/components/SmartScan/ErrorDisplay.jsx +4 -2
- package/ui/src/components/SmartScan/ExpandableSection.jsx +4 -0
- package/ui/src/components/SmartScan/FindingsTable.jsx +46 -42
- package/ui/src/components/SmartScan/ListViewContent.jsx +2 -2
- package/ui/src/components/SmartScan/NotablePatternsSection.jsx +13 -8
- package/ui/src/components/SmartScan/OverallSummarySection.jsx +36 -29
- package/ui/src/components/SmartScan/RecommendationsSection.jsx +10 -8
- package/ui/src/components/SmartScan/ScanDetailHeader.jsx +2 -1
- package/ui/src/components/SmartScan/ScanDetailView.jsx +4 -4
- package/ui/src/components/SmartScan/ScanListView/ScanListHeader.jsx +2 -1
- package/ui/src/components/SmartScan/ScanListView/ScanListItem.jsx +15 -1
- package/ui/src/components/SmartScan/ScanOverviewSection.jsx +3 -1
- package/ui/src/components/SmartScan/ScanResultsDisplay.jsx +1 -1
- package/ui/src/components/SmartScan/ScanViewContent.jsx +2 -2
- package/ui/src/components/SmartScan/ScanningProgress.jsx +4 -2
- package/ui/src/components/SmartScan/ServerInfoSection.jsx +3 -1
- package/ui/src/components/SmartScan/ServerSelectionRow.jsx +4 -2
- package/ui/src/components/SmartScan/SingleResultDisplay.jsx +5 -3
- package/ui/src/components/SmartScan/SmartScanControls.jsx +11 -7
- package/ui/src/components/SmartScan/SmartScanHeader.jsx +1 -1
- package/ui/src/components/SmartScan/ViewModeTabs.jsx +2 -0
- package/ui/src/components/SmartScan/hooks/useCacheManagement.js +1 -2
- package/ui/src/components/SmartScan/hooks/useMcpDiscovery.js +22 -26
- package/ui/src/components/SmartScan/hooks/useScanList.js +10 -9
- package/ui/src/components/SmartScan/hooks/useScanOperations.js +23 -14
- package/ui/src/components/SmartScan/hooks/useServerStatus.js +2 -2
- package/ui/src/components/SmartScan/hooks/useTokenManagement.js +2 -2
- package/ui/src/components/SmartScan/scanDataUtils.js +22 -17
- package/ui/src/components/SmartScan/useSmartScan.js +4 -4
- package/ui/src/components/SmartScan/utils.js +3 -1
- package/ui/src/components/SmartScanIcons.jsx +6 -3
- package/ui/src/components/TabNavigation/DesktopTabs.jsx +8 -3
- package/ui/src/components/TabNavigation/MobileDropdown.jsx +3 -1
- package/ui/src/components/TabNavigation.jsx +8 -3
- package/ui/src/components/TabNavigationIcons.jsx +4 -4
- package/ui/src/components/TourOverlay.jsx +1 -1
- package/ui/src/components/TourTooltip/TourTooltipButtons.jsx +3 -0
- package/ui/src/components/TourTooltip/TourTooltipHeader.jsx +1 -0
- package/ui/src/components/TourTooltip/TourTooltipIcons.jsx +9 -0
- package/ui/src/components/TourTooltip/useTooltipPosition.js +63 -36
- package/ui/src/components/TourTooltip.jsx +11 -3
- package/ui/src/components/ViewModeTabs.jsx +3 -1
- package/ui/src/config/tourSteps.jsx +0 -2
- package/ui/src/hooks/useAnimation.js +15 -12
- package/ui/src/hooks/useConfigManagement.js +8 -8
- package/ui/src/hooks/useServiceExtraction.js +1 -1
- package/ui/src/index.css +3 -8
- package/ui/src/theme.js +3 -3
- package/ui/src/utils/hexUtils.js +11 -5
- package/ui/src/utils/mcpGroupingUtils.js +18 -10
- package/ui/src/utils/requestPairing.js +89 -0
- package/ui/src/utils/requestUtils.js +37 -105
- package/ui/vite.config.js +1 -1
- package/mcp-server/.editorconfig +0 -15
- package/mcp-server/.prettierignore +0 -11
- package/mcp-server/.prettierrc +0 -12
- package/mcp-server/README.md +0 -280
- package/mcp-server/commitlint.config.cjs +0 -42
- package/mcp-server/eslint.config.js +0 -131
- package/mcp-server/package-lock.json +0 -4784
- package/mcp-server/package.json +0 -30
- package/ui/README.md +0 -212
- package/ui/package-lock.json +0 -3574
- package/ui/package.json +0 -12
- package/ui/paths.js +0 -282
- package/ui/server/routes/backups.js +0 -251
- package/ui/server/routes/composite.js +0 -244
package/mcp-server/package.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mcp-shark-server",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "MCP Shark server - aggregate multiple MCP servers",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"bin": {
|
|
8
|
-
"mcp-shark": "./mcp-shark.js"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"lint": "eslint . --ext .js",
|
|
12
|
-
"lint:fix": "eslint . --ext .js --fix",
|
|
13
|
-
"format": "prettier --write \"**/*.{js,json,css,md}\"",
|
|
14
|
-
"format:check": "prettier --check \"**/*.{js,json,css,md}\"",
|
|
15
|
-
"prepare": "husky install",
|
|
16
|
-
"start": "node mcp-shark.js"
|
|
17
|
-
},
|
|
18
|
-
"lint-staged": {
|
|
19
|
-
"*.js": [
|
|
20
|
-
"eslint --fix",
|
|
21
|
-
"prettier --write"
|
|
22
|
-
],
|
|
23
|
-
"*.{json,css,md}": [
|
|
24
|
-
"prettier --write"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"keywords": [],
|
|
28
|
-
"author": "",
|
|
29
|
-
"license": "ISC"
|
|
30
|
-
}
|
package/ui/README.md
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
# MCP Shark UI
|
|
2
|
-
|
|
3
|
-
A real-time web interface for monitoring and inspecting MCP (Model Context Protocol) communications. Built with React and Express, this tool provides a sleek, dark-themed dashboard for viewing server logs, filtering communications, and analyzing request/response patterns.
|
|
4
|
-
|
|
5
|
-
## โจ Features
|
|
6
|
-
|
|
7
|
-
- **Real-time Updates**: WebSocket-powered live log streaming
|
|
8
|
-
- **Advanced Filtering**: Filter by server, direction (request/response), HTTP method, and status
|
|
9
|
-
- **Detailed Log View**: Inspect individual log entries with full payload details
|
|
10
|
-
- **Performance Metrics**: View duration, payload size, and status for each communication
|
|
11
|
-
- **Dark Theme UI**: Modern, developer-friendly interface
|
|
12
|
-
- **SQLite Backend**: Efficient storage and querying of communication logs
|
|
13
|
-
- **MCP Server Management**: Configure and manage MCP Shark server from the UI
|
|
14
|
-
|
|
15
|
-
## ๐ ๏ธ Tech Stack
|
|
16
|
-
|
|
17
|
-
- **Frontend**: React 18, Vite
|
|
18
|
-
- **Backend**: Express.js, WebSocket (ws)
|
|
19
|
-
- **Database**: SQLite (better-sqlite3)
|
|
20
|
-
- **Build Tool**: Vite
|
|
21
|
-
|
|
22
|
-
## ๐ฆ Installation
|
|
23
|
-
|
|
24
|
-
From the root directory:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# Install all dependencies (recommended)
|
|
28
|
-
npm run install:all
|
|
29
|
-
|
|
30
|
-
# Or install UI dependencies only
|
|
31
|
-
cd ui
|
|
32
|
-
npm install
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## ๐ Usage
|
|
36
|
-
|
|
37
|
-
### Starting the UI
|
|
38
|
-
|
|
39
|
-
**Production Mode:**
|
|
40
|
-
|
|
41
|
-
1. Build the frontend:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
npm run build
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
2. Start the server:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npm start
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Or specify a custom database path:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
DB_PATH=/path/to/mcp-shark.sqlite npm start
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
The server will start on port `9853` by default (configurable via `UI_PORT` environment variable).
|
|
60
|
-
|
|
61
|
-
**Development Mode:**
|
|
62
|
-
|
|
63
|
-
Start the development server with hot reload:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
npm run dev
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
The UI will be available at `http://localhost:5173` (or the port Vite assigns).
|
|
70
|
-
|
|
71
|
-
### Managing the MCP Server
|
|
72
|
-
|
|
73
|
-
The MCP server is **managed through the UI**, not started separately:
|
|
74
|
-
|
|
75
|
-
1. Start the UI server (see above)
|
|
76
|
-
2. Open `http://localhost:9853` in your browser
|
|
77
|
-
3. Navigate to the **"MCP Server Setup"** tab
|
|
78
|
-
4. Select or provide your MCP configuration file (e.g., `~/.cursor/mcp.json`)
|
|
79
|
-
5. Click **"Start MCP Shark"** to start the server
|
|
80
|
-
|
|
81
|
-
The UI will:
|
|
82
|
-
|
|
83
|
-
- Convert your MCP config format automatically
|
|
84
|
-
- Start the MCP server on port 9851
|
|
85
|
-
- Display server logs in real-time
|
|
86
|
-
- Allow you to stop/restart the server
|
|
87
|
-
|
|
88
|
-
**Note:** The MCP server is started as a child process by the UI server. When you stop the UI, the MCP server will also be stopped automatically.
|
|
89
|
-
|
|
90
|
-
### Environment Variables
|
|
91
|
-
|
|
92
|
-
- `UI_PORT`: Port for the server (default: `9853`)
|
|
93
|
-
- `DB_PATH`: Path to the SQLite database file (default: `~/.mcp-shark/db/mcp-shark.sqlite`)
|
|
94
|
-
|
|
95
|
-
## ๐ก API Endpoints
|
|
96
|
-
|
|
97
|
-
### Traffic & Monitoring
|
|
98
|
-
|
|
99
|
-
- `GET /api/requests` - Retrieve communication requests/responses with optional filtering
|
|
100
|
-
- `GET /api/conversations` - Get request/response conversation pairs
|
|
101
|
-
- `GET /api/sessions` - List all sessions
|
|
102
|
-
- `GET /api/statistics` - Get traffic statistics
|
|
103
|
-
|
|
104
|
-
### MCP Server Management
|
|
105
|
-
|
|
106
|
-
- `GET /api/composite/status` - Get the status of the MCP Shark server
|
|
107
|
-
- `GET /api/composite/logs` - Get MCP Shark server logs
|
|
108
|
-
- `POST /api/composite/setup` - Configure and start the MCP Shark server
|
|
109
|
-
- `POST /api/composite/stop` - Stop the MCP Shark server
|
|
110
|
-
- `POST /api/composite/logs/clear` - Clear server logs
|
|
111
|
-
|
|
112
|
-
### Configuration
|
|
113
|
-
|
|
114
|
-
- `GET /api/config/detect` - Detect default MCP config file paths
|
|
115
|
-
- `GET /api/config/read` - Read MCP configuration file
|
|
116
|
-
|
|
117
|
-
## ๐ WebSocket
|
|
118
|
-
|
|
119
|
-
The server broadcasts real-time updates via WebSocket on the same port as the HTTP server.
|
|
120
|
-
|
|
121
|
-
**Connection:**
|
|
122
|
-
|
|
123
|
-
- Development: `ws://localhost:9853`
|
|
124
|
-
- Production: `wss://your-domain.com` (if using HTTPS)
|
|
125
|
-
|
|
126
|
-
**Message Format:**
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"type": "update",
|
|
131
|
-
"data": [
|
|
132
|
-
/* array of log entries */
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## ๐จ UI Features
|
|
138
|
-
|
|
139
|
-
### Filtering
|
|
140
|
-
|
|
141
|
-
- **Server**: Filter by server name
|
|
142
|
-
- **Direction**: Filter by request or response
|
|
143
|
-
- **Method**: Filter by HTTP method (GET, POST, etc.)
|
|
144
|
-
- **Status**: Filter by status (success, error, pending)
|
|
145
|
-
|
|
146
|
-
### Log Table
|
|
147
|
-
|
|
148
|
-
Displays:
|
|
149
|
-
|
|
150
|
-
- Timestamp
|
|
151
|
-
- Server name
|
|
152
|
-
- Direction (request/response)
|
|
153
|
-
- HTTP method
|
|
154
|
-
- Status (color-coded)
|
|
155
|
-
- Duration (ms)
|
|
156
|
-
- Payload size (KB)
|
|
157
|
-
|
|
158
|
-
### Log Detail Panel
|
|
159
|
-
|
|
160
|
-
Click any log entry to view:
|
|
161
|
-
|
|
162
|
-
- Full log metadata
|
|
163
|
-
- Request ID
|
|
164
|
-
- Error messages (if any)
|
|
165
|
-
- Formatted JSON payload
|
|
166
|
-
|
|
167
|
-
## ๐ Project Structure
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
ui/
|
|
171
|
-
โโโ src/
|
|
172
|
-
โ โโโ App.jsx # Main application component
|
|
173
|
-
โ โโโ LogTable.jsx # Log table component
|
|
174
|
-
โ โโโ LogDetail.jsx # Log detail panel component
|
|
175
|
-
โ โโโ PacketList.jsx # Packet list component
|
|
176
|
-
โ โโโ PacketDetail.jsx # Packet detail component
|
|
177
|
-
โ โโโ CompositeLogs.jsx # MCP Shark server logs
|
|
178
|
-
โ โโโ CompositeSetup.jsx # MCP Shark server setup
|
|
179
|
-
โ โโโ TabNavigation.jsx # Tab navigation
|
|
180
|
-
โ โโโ main.jsx # Application entry point
|
|
181
|
-
โ โโโ index.css # Global styles
|
|
182
|
-
โโโ server.js # Express server with WebSocket
|
|
183
|
-
โโโ vite.config.js # Vite configuration
|
|
184
|
-
โโโ package.json # Dependencies and scripts
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## ๐งช Development
|
|
188
|
-
|
|
189
|
-
### Available Scripts
|
|
190
|
-
|
|
191
|
-
- `npm run dev`: Start Vite dev server with hot reload
|
|
192
|
-
- `npm run build`: Build for production
|
|
193
|
-
- `npm run preview`: Preview production build
|
|
194
|
-
- `npm start`: Start the production server
|
|
195
|
-
|
|
196
|
-
### Database Schema
|
|
197
|
-
|
|
198
|
-
The application expects a SQLite database with tables for packets, conversations, and sessions. The database is created and managed by the MCP Shark server using the `mcp-shark-common` package.
|
|
199
|
-
|
|
200
|
-
The database schema includes:
|
|
201
|
-
|
|
202
|
-
- `packets`: Individual HTTP request/response packets with full metadata
|
|
203
|
-
- `conversations`: Correlated request/response pairs
|
|
204
|
-
- `sessions`: Session tracking for stateful MCP interactions
|
|
205
|
-
|
|
206
|
-
## ๐ค Contributing
|
|
207
|
-
|
|
208
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
209
|
-
|
|
210
|
-
## ๐ License
|
|
211
|
-
|
|
212
|
-
ISC
|