A comprehensive testing application for Model Context Protocol (MCP) servers. This application allows you to connect to and test MCP servers using different transport protocols (stdio and SSE) and test all MCP features including Resources, Prompts, and Tools.
-
Server Connection
- Connect to MCP servers using stdio or SSE protocols
- View connection status and logs
- Disconnect from servers
-
Resources Testing
- List available resources and resource templates
- Fetch and view resource content
- Test resource parameters
-
Prompts Testing
- List available prompts
- Test prompts with custom arguments
- View prompt results
-
Tools Testing
- List available tools
- Call tools with custom parameters
- View tool execution results
- Support for JSON parameter input
-
Debugging
- Comprehensive logging of all MCP communications
- Error handling and display
- Request/response inspection
- Node.js 18.x or higher
- npm or yarn
-
Clone the repository:
git clone https://github.com/yourusername/mcpclient.git cd mcpclient -
Install dependencies:
npm install # or yarn install -
Start the development server:
npm run dev # or yarn dev -
Open your browser and navigate to
http://localhost:3000
- Select the protocol (stdio or SSE)
- For stdio:
- Enter the command to start the server (e.g.,
node test-server.js) - Optionally provide command-line arguments
- Enter the command to start the server (e.g.,
- For SSE:
- Enter the server URL (e.g.,
http://localhost:3001/mcp)
- Enter the server URL (e.g.,
- Click "Connect"
This repository includes a simple test server (test-server.js) that you can use to test the MCP client. The test server provides:
- A simple addition tool that adds two numbers
- A greeting resource that returns a personalized greeting
- A greeting prompt template
To use the test server:
- In the connection panel, select the "stdio" protocol
- Enter
node test-server.jsas the command - Click "Connect"
- Once connected, you can test the resources, prompts, and tools provided by the server
- After connecting, the app will automatically fetch available resources
- Click on a resource to fetch its content
- Or enter a resource URI manually and click "Fetch"
- After connecting, the app will automatically fetch available prompts
- Select a prompt from the list
- Fill in the required arguments
- Click "Get Prompt" to execute
- After connecting, the app will automatically fetch available tools
- Select a tool from the list
- Fill in the required parameters (using form fields or JSON mode)
- Click "Call Tool" to execute
- Next.js
- React
- Flowbite (UI components)
- TypeScript
- MCP TypeScript SDK
This project is licensed under the MIT License - see the LICENSE file for details.
- Model Context Protocol for the protocol specification
- MCP TypeScript SDK for the client implementation