feat: Add comprehensive multi-server support to MCP Inspector #749
+23,796
−556
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Multi-Server Support for MCP Inspector
Overview
This pull request introduces comprehensive multi-server support to the MCP Inspector, transforming it from a single-server debugging tool into a powerful multi-server management platform. This enhancement addresses the growing need for developers to work with multiple MCP servers simultaneously while maintaining full backward compatibility with existing workflows.
Problem Statement
The original MCP Inspector was designed to work with a single MCP server at a time, which created several limitations for developers:
Solution Overview
We implemented a comprehensive multi-server architecture that extends the MCP Inspector with:
🏗️ Server-Side Architecture
🎨 Client-Side Interface
Technical Implementation
Backend Implementation (
server/src/multiserver/
)The server-side implementation follows a modular architecture:
Key Components:
For detailed technical documentation, see
server/src/multiserver/README.md
.Frontend Implementation (
client/src/components/multiserver/
)The client-side implementation provides a rich, interactive interface:
Key Features:
For detailed technical documentation, see
client/src/components/multiserver/README.md
.Visual Demonstration
Dashboard Overview
The multi-server dashboard provides a comprehensive view of all configured servers:
Server Management
Users can easily add new servers with support for both STDIO and HTTP transports:
Multi-Server Operations
The interface supports managing multiple servers simultaneously:
Server Interaction
Each server provides dedicated tabs for resources, tools, and prompts:
Monitoring and Error Handling
Comprehensive monitoring and error tracking across all servers:
Configuration Management
Easy server configuration editing with validation:
Key Features
🔄 Real-Time Updates
🛠️ Server Management
🔌 Connection Control
📊 Monitoring & Debugging
💾 State Persistence
🔒 Security & Reliability
Backward Compatibility
Full backward compatibility maintained:
API Reference
Core Endpoints
Server Management (
/api/servers
)GET /api/servers
- List all serversPOST /api/servers
- Create serverGET /api/servers/:id
- Get server by IDPUT /api/servers/:id
- Update serverDELETE /api/servers/:id
- Delete serverConnection Management (
/api/connections
)GET /api/connections
- Get all connection statusesPOST /api/connections/:id/connect
- Connect to serverPOST /api/connections/:id/disconnect
- Disconnect from serverMCP Proxy (
/api/mcp
)POST /api/mcp/:id/request
- Generic MCP requestGET /api/mcp/:id/resources
- List resourcesGET /api/mcp/:id/tools
- List toolsGET /api/mcp/:id/prompts
- List promptsEvent Streaming (
/api/events
)GET /api/events
- Subscribe to real-time event streamTesting
Comprehensive Test Coverage
.http
filesTest Categories
Usage
Getting Started
npx @modelcontextprotocol/inspector
http://localhost:6274
Example Server Configuration
STDIO Server:
HTTP Server:
Impact
This multi-server implementation transforms the MCP Inspector from a single-server debugging tool into a comprehensive multi-server management platform, enabling:
Future Enhancements
The multi-server architecture provides a foundation for future enhancements:
This implementation represents a significant evolution of the MCP Inspector, maintaining its core debugging capabilities while adding powerful multi-server management features that scale with the growing MCP ecosystem.
This PR is submitted by Elad Ariel on behalf of the SAP AI Guild (IL).