β οΈ ALPHA VERSION - STILL TESTING
This is an alpha version of MCP Shark App. 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.
Electron desktop application for MCP Shark - Aggregate multiple Model Context Protocol (MCP) servers into a single unified interface
MCP Shark App is a cross-platform Electron application that provides a desktop interface for MCP Shark. It uses mcp-shark as an npm dependency, providing a seamless experience for aggregating and monitoring multiple MCP servers.
- π₯οΈ Desktop Application: Native Electron app for Windows, macOS, and Linux
- π¦ NPM Dependency: Uses mcp-shark as an npm package directly from GitHub
- π§ Easy Setup: Simple
npm installto get everything set up automatically - π Process Management: Automatically manages MCP server and UI server processes
- π Integrated UI: Built-in browser window for the MCP Shark monitoring interface
- π¨ Auto-Build: Automatically builds the UI on first run if needed
- π Port Management: Automatically handles port conflicts and cleans up processes
- π§Ή Clean Exit: Comprehensive cleanup of all child processes on app exit
- Node.js 18+ (required for building and development)
- npm (comes with Node.js)
- Git (for installing mcp-shark from GitHub)
- No Node.js needed! The packaged app includes everything and uses Electron's bundled Node.js runtime.
See REQUIREMENTS.md for detailed information.
- Node.js 18+ and npm (for development only)
- Git (for cloning)
- Clone or navigate to this directory:
cd mcp-shark-app- Install dependencies:
npm installThis automatically:
- Installs all dependencies
- Installs mcp-shark and its dependencies
- Rebuilds native modules for Electron (via
rebuild:native) - Builds the UI
- Run the app:
npm startIf you encounter NODE_MODULE_VERSION errors or update Electron/mcp-shark:
npm run rebuild:nativeSee NATIVE-MODULES.md for details.
The app will:
- Install mcp-shark and all its dependencies (via npm)
- Automatically build the UI if not already built
- Start the UI server on port 9853
- Open the Electron window with the MCP Shark interface
npm run devThis runs the app with developer tools enabled. The Electron DevTools will be automatically opened for debugging.
Build for your current platform:
npm run buildBuild for specific platforms:
# macOS
npm run build:mac
# Windows
npm run build:win
# Linux
npm run build:linuxBuild for all platforms at once:
npm run build:allThis will create installers for macOS, Windows, and Linux in the dist/ directory.
To build the macOS app on your Mac:
-
Prerequisites:
- macOS (required - you can only build macOS apps on macOS)
- Node.js 18+ and npm
- Git (for GitHub dependencies)
-
Install Dependencies:
npm install
This automatically installs all dependencies, rebuilds native modules for Electron, and builds the UI.
-
Build the macOS App:
npm run build:mac
-
Output Files: After building, you'll find these files in the
dist/directory:dist/mac/MCP Shark.app- The app bundle (double-click to run)dist/mac/MCP Shark-1.0.0-mac.zip- ZIP archivedist/MCP Shark-1.0.0.dmg- DMG installer
-
Run the Built App:
# Option 1: From terminal open "dist/mac/MCP Shark.app" # Option 2: Double-click in Finder # Navigate to dist/mac/ and double-click MCP Shark.app
-
First Run (Gatekeeper): If you see "MCP Shark is damaged" when opening:
- Right-click the app β Select "Open" β Click "Open" in the dialog
- Or run:
xattr -cr "dist/mac/MCP Shark.app"in terminal - See MACOS-GATEKEEPER-FIX.md for details
Quick Build Command:
# Full build from scratch
npm install && npm run build:mac && open "dist/mac/MCP Shark.app"For more detailed build instructions and troubleshooting, see BUILD.md.
mcp-shark-app/
βββ src/
β βββ main/ # Electron main process
β β βββ main.js # Main entry point and window management
β β βββ server-manager.js # Manages MCP server process
β β βββ ui-manager.js # Manages UI server process and builds
β βββ preload/ # Preload scripts
β βββ preload.js # Exposes safe IPC APIs to renderer
βββ assets/ # App assets (icons, etc.)
βββ package.json # Dependencies and build config
βββ SETUP.md # Detailed setup instructions
βββ README.md # This file
-
Installation:
npm installdownloads mcp-shark from GitHub and installs it as a dependency- Post-install script automatically:
- Installs Electron native dependencies
- Runs
npm run install:allin mcp-shark to install sub-dependencies - Builds the UI (
npm run buildin mcp-shark/ui)
-
Launch:
- App locates mcp-shark in
node_modules/mcp-shark - Checks if UI is built (looks for
dist/index.html) - If not built, automatically builds the UI using Vite
- Checks for port conflicts and automatically frees ports if needed
- Starts the UI server on port 9853
- Opens the Electron window pointing to
http://localhost:9853
- App locates mcp-shark in
-
Process Management:
- Electron main process manages both MCP server and UI server as child processes
- Automatically detects and kills child processes (including npm and node processes)
- Cleans up processes on ports 9851 and 9853 on app exit
- Provides IPC APIs for the renderer to control servers
- Handles SIGINT, SIGTERM, and window close events for proper cleanup
The app uses mcp-shark directly from node_modules/mcp-shark.
To update to a newer version:
npm update mcp-shark
npm run install:mcp-shark
npm run build:mcp-shark-uiOr reinstall everything:
rm -rf node_modules package-lock.json
npm installThe app uses fixed ports:
- UI Server: Port 9853
- MCP Server: Port 9851
These ports are automatically managed - the app will free them if in use. To change ports, modify the port constants in:
src/main/ui-manager.js(UI server port)src/main/server-manager.js(MCP server port)
The preload script exposes the following APIs to the renderer:
// Start/stop MCP server
await window.electronAPI.startMCPServer(configPath);
await window.electronAPI.stopMCPServer();
await window.electronAPI.isMCPServerRunning();
// Check UI server status
await window.electronAPI.isUIServerRunning();
// Get version info
await window.electronAPI.getAppVersion();
await window.electronAPI.getMCPSharkVersion();- Check that Node.js 18+ is installed:
node --version - Ensure you have internet connection (for npm install)
- Check Electron console or terminal output for errors
- Verify mcp-shark was installed:
ls node_modules/mcp-shark
- Verify internet connection
- Check that you have access to GitHub (for git-based npm install)
- Try deleting
node_modulesandpackage-lock.json, then runnpm installagain - If mcp-shark install fails, try manually:
cd node_modules/mcp-shark && npm run install:all
- Check that all dependencies are installed:
cd node_modules/mcp-shark/ui && npm list - Try building manually:
cd node_modules/mcp-shark/ui && npm run build - Check for Vite errors in the console output
- Ensure Node.js version is 18 or higher
- The app automatically detects and frees ports 9851 and 9853
- If issues persist, manually kill processes:
lsof -ti:9853 | xargs kill -9 - Check for other instances:
ps aux | grep -E "(npm|node.*server)"
- The app should automatically clean up all child processes
- If processes remain, they will be killed on next app start (port cleanup)
- Manually clean up:
lsof -ti:9853,9851 | xargs kill -9
The app can be packaged for distribution using electron-builder:
# Build for current platform
npm run build
# Build for specific platforms
npm run build:mac # macOS (DMG and ZIP)
npm run build:win # Windows (NSIS installer and portable)
npm run build:linux # Linux (AppImage and DEB)
# Build for ALL platforms at once
npm run build:all # Creates installers for macOS, Windows, and LinuxBefore Building: Ensure native modules are rebuilt for Electron:
# If you just ran npm install, rebuild:native already ran automatically
# But if you're unsure or had issues, run:
npm run rebuild:native
npm run build:macBuilt applications will be in the dist/ directory.
Note:
- The packaged app includes mcp-shark and all its dependencies, so the final package size will be larger
- The UI is pre-built during the packaging process
- Native modules must be rebuilt for Electron (done automatically in
postinstall, or runnpm run rebuild:nativemanually) - Building for all platforms requires the build tools for each platform (you can only build macOS on Mac, Windows on Windows, etc.)
- For cross-platform building, consider using CI/CD services like GitHub Actions
Important for macOS users: When downloading the app, macOS may show "MCP Shark is damaged and can't be opened". This is not because the app is damagedβit's macOS Gatekeeper blocking unsigned applications.
Quick Fix:
- Right-click on the app β Select "Open" β Click "Open" in the security dialog
- Or run:
xattr -cr "/path/to/MCP Shark.app"in terminal - Or use the helper script:
./scripts/fix-gatekeeper.sh "/path/to/MCP Shark.app"
For detailed instructions, see: MACOS-GATEKEEPER-FIX.md
- mcp-shark: The core MCP Shark server and UI components
- mcp-shark-common: Shared utilities for database and configuration management
ISC
Contributions are welcome! Please ensure your code follows the project's style guidelines.
Built with β€οΈ using Electron and MCP Shark