MCPJam Inspector: Electron-Based Testing Platform for Model Context Protocol Servers
┌─────────────────────────────────────────────────────┐
│ Analysis Summary │
├─────────────────────────────────────────────────────┤
│ Type: Platform │
│ Primary Language: typescript + markdown + javascript│
│ LOC: 42K │
│ Test Files: 0 │
│ Architecture: typescript │
│ Confidence: Medium │
└─────────────────────────────────────────────────────┘
Analyzed: 35781ac2 from 2025-10-14
MCPJam Inspector: Electron-Based Testing Platform for Model Context Protocol Servers
The MCPJam Inspector is a comprehensive testing and debugging platform specifically designed for Model Context Protocol (MCP) servers. This Electron-based application provides developers with tools to inspect protocol handshakes, test server implementations, and validate MCP compliance across different transport methods including STDIO, SSE, and HTTP.
The codebase analysis reveals a sophisticated architecture combining an Electron desktop application with an embedded Hono.js web server. The platform supports multiple AI providers (OpenAI, Anthropic, Google, DeepSeek) and includes integrated testing capabilities for protocol validation, OAuth implementation, and server behavior analysis.
Quick Start
npx @mcpjam/inspector@latest
The application also supports Docker deployment:
docker run -p 3001:3001 mcpjam/mcp-inspector:latest
Time to first result: ~2 minutes
Alternative Approaches
| Solution | Setup Time | Transport Support | LLM Integration | Testing Features |
|---|---|---|---|---|
| MCPJam Inspector | Low | STDIO/SSE/HTTP | Multi-provider | Protocol validation |
| Manual curl/Postman | High | HTTP only | None | Basic API testing |
| Custom test scripts | Very High | Custom | Custom | Limited |
| MCP CLI tools | Medium | STDIO mainly | None | Basic inspection |
| Browser DevTools | Low | HTTP/SSE | None | Network inspection |
Architecture and Implementation
The application follows a dual-process architecture typical of Electron applications, with the main process managing the desktop window and an embedded web server handling the application logic.
The main process initialization in src/main.ts:62-76 demonstrates the server startup sequence:
async function startHonoServer(): Promise<number> {
try {
const port = app.isPackaged ? 3000 : await findAvailablePort(3000);
// Set environment variables to tell the server it's running in Electron
process.env.ELECTRON_APP = "true";
process.env.IS_PACKAGED = app.isPackaged ? "true" : "false";
process.env.ELECTRON_RESOURCES_PATH = process.resourcesPath;
process.env.NODE_ENV = app.isPackaged ? "production" : "development";
const honoApp = createHonoApp();
// Bind to 127.0.0.1 when packaged to avoid IPv6-only localhost issues
const hostname = app.isPackaged ? "127.0.0.1" : "localhost";
The port detection mechanism in src/main.ts:41-55 shows careful handling of development vs production environments:
async function findAvailablePort(startPort = 3000): Promise<number> {
return new Promise((resolve, reject) => {
const net = require("net");
const server = net.createServer();
server.listen(startPort, () => {
const port = server.address()?.port;
server.close(() => {
resolve(port);
});
});
server.on("error", () => {
// Port is in use, try next one
findAvailablePort(startPort + 1)
The window configuration in src/main.ts:91-105 establishes security best practices:
function createMainWindow(serverUrl: string): BrowserWindow {
const window = new BrowserWindow({
width: 1400,
height: 900,
minWidth: 800,
minHeight: 600,
icon: path.join(__dirname, "../assets/icon.png"), // You can add an icon later
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
// Vite plugin outputs main.js and preload.js into the same directory (.vite/build)
preload: path.join(__dirname, "preload.js"),
},
titleBarStyle: process.platform === "darwin" ? "hiddenInset" : "default",
show: false, // Don't show until ready
The server implementation includes utility functions for enhanced developer experience, as seen in server/index.ts:35-49:
function logBox(content: string, title?: string) {
const lines = content.split("\n");
const maxLength = Math.max(...lines.map((line) => line.length));
const width = maxLength + 4;
console.log("┌" + "─".repeat(width) + "┐");
if (title) {
const titlePadding = Math.floor((width - title.length - 2) / 2);
console.log(
"│" +
" ".repeat(titlePadding) +
title +
" ".repeat(width - title.length - titlePadding) +
"│",
);
Performance Characteristics
Bundle Impact:
- Core Electron application: Desktop runtime overhead
- Hono.js server: Lightweight HTTP framework
- Total dependencies: 95 packages
- TypeScript codebase: 34,978 lines
Other Considerations:
- Runtime dependencies: 95 total packages including AI SDKs
- Test coverage: No test files found in analysis
- Build tooling: Vite, Electron Forge, TypeScript
- Multi-platform support: macOS, Windows, Linux
Best for: MCP server development, protocol testing, multi-transport validation
When to Use MCPJam Inspector
The evidence suggests this project fits well for:
- MCP server development workflows where protocol compliance testing is critical, as demonstrated by the comprehensive transport support (STDIO, SSE, HTTP)
- Multi-provider AI integration testing given the extensive AI SDK dependencies (@ai-sdk/anthropic, @ai-sdk/openai, @ai-sdk/google, @ai-sdk/deepseek)
- Desktop-first development environments where the Electron wrapper provides better integration with local development tools and file system access
Consider alternatives when:
- Simple HTTP API testing is sufficient, where browser developer tools or Postman would be more lightweight
- CI/CD pipeline integration is the primary use case, where headless CLI tools would be more appropriate
- Resource-constrained environments where the Electron desktop application overhead is prohibitive
The analysis covered 285 files totaling 41,520 lines of code, with the codebase showing strong TypeScript adoption (84% of total lines) and comprehensive dependency management for AI provider integration.