@nithish611/mcp-inspector
v0.1.1
Published
A modern Model Context Protocol (MCP) client with beautiful UI, HTTP logging, and OAuth 2.1 support
Maintainers
Readme
MCP Client
A modern, feature-rich Model Context Protocol (MCP) client with a beautiful UI, comprehensive HTTP logging, and OAuth 2.1 support.
Features
- 🎨 Beautiful Modern UI - Clean, Postman-like interface for interacting with MCP servers
- 🔐 OAuth 2.1 Support - Full OAuth 2.1 with PKCE and Dynamic Client Registration (DCR)
- 📡 Multiple Server Connections - Connect to and manage multiple MCP servers simultaneously
- 📝 Comprehensive Logging - View detailed HTTP request/response logs with headers
- 🛠️ Tools, Resources & Prompts - Full support for all MCP capabilities
- 🔍 Search & Filter - Quickly find servers and tools
- 💾 Persistent State - Remembers your server configurations and tool inputs
- ⌨️ Keyboard Shortcuts - Execute tools with Cmd+Enter
Installation
Using npx (Recommended)
npx @nithish611/mcp-inspectorGlobal Installation
npm install -g @nithish611/mcp-inspector
mcp-clientFrom Source
git clone https://github.com/nithish611/mcp-inspector.git
cd mcp-inspector
npm install
npm run build
npm startUsage
Basic Usage
# Start on default port 3000
mcp-client
# Start on a custom port
mcp-client --port 8080
mcp-client -p 4000Command Line Options
| Option | Description | Default |
|--------|-------------|---------|
| -p, --port <number> | Port to run the server on | 3000 |
| -h, --help | Show help message | - |
| -v, --version | Show version number | - |
Environment Variables
| Variable | Description |
|----------|-------------|
| PORT | Server port (overridden by --port flag) |
| OAUTH_ENCRYPTION_KEY | Encryption key for OAuth tokens |
| AUTH_ENCRYPTION_SECRET | Alternative encryption key for OAuth tokens |
| OAUTH_REDIRECT_URI | OAuth redirect URI |
Connecting to MCP Servers
HTTP/SSE Servers
- Click "Add" to add a new server
- Enter a name and the server URL
- For OAuth-protected servers, enable OAuth and configure scopes
- Click "Connect"
Stdio Servers
- Click "Add" to add a new server
- Select "Stdio" transport type
- Enter the command and arguments
- Click "Connect"
OAuth 2.1 Support
MCP Client supports OAuth 2.1 with:
- PKCE (Proof Key for Code Exchange) for enhanced security
- Dynamic Client Registration (RFC 7591) for automatic client setup
- Protected Resource Metadata (RFC 9728) for server discovery
- Authorization Server Metadata (RFC 8414) for auth server discovery
Connecting to OAuth-Protected Servers
- Add a new server with the MCP server URL
- Enable OAuth in the server configuration
- (Optional) Add custom scopes
- Click "Connect" - you'll be redirected to the authorization server
- After authorization, you'll be redirected back and connected
Development
Prerequisites
- Node.js >= 18.0.0
- npm >= 8.0.0
Setup
# Install dependencies
npm install
# Start development servers (client + server with hot reload)
npm run dev
# Build for production
npm run build
# Start production server
npm startProject Structure
mcp-client/
├── bin/ # CLI entry point
├── client/ # React frontend (Vite + TypeScript)
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── hooks/ # React hooks
│ │ ├── stores/ # Zustand stores
│ │ └── lib/ # Utilities
│ └── ...
├── server/ # Express backend (TypeScript)
│ ├── src/
│ │ ├── oauth/ # OAuth 2.1 implementation
│ │ └── ...
│ └── ...
├── scripts/ # Build scripts
└── dist/ # Production build outputAPI Reference
The server exposes the following API endpoints:
Connection
POST /api/connect- Connect to an MCP serverPOST /api/disconnect- Disconnect from an MCP serverGET /api/status- Get connection statusGET /api/servers/connected- List connected servers
MCP Operations
GET /api/tools- List available toolsPOST /api/tools/call- Execute a toolGET /api/resources- List available resourcesPOST /api/resources/read- Read a resourceGET /api/prompts- List available promptsPOST /api/prompts/get- Get a prompt
OAuth
POST /api/oauth/authorize- Initiate OAuth flowGET /api/oauth/callback- OAuth callback handlerGET /api/oauth/status- Get OAuth statusPOST /api/oauth/revoke- Revoke authorization
Logs
GET /api/logs- Get all logsDELETE /api/logs- Clear logs
WebSocket
ws://localhost:PORT/ws- Real-time updates
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE for details.
Acknowledgments
- Built with Model Context Protocol
- UI powered by React, Tailwind CSS, and shadcn/ui
- Code editor by Monaco Editor
