A simple Quarkus-based web application that connects to an MCP (Model Context Protocol) server
A Quarkus-based web application that connects to an MCP (Model Context Protocol) server, discovers its tools, and provides an interactive HTML frontend for testing tool calls.
StreamableHttpMcpTransport + DefaultMcpClient)Edit src/main/resources/application.properties:
# Quarkus HTTP port
quarkus.http.port=8082
# MCP Server configuration
# Use the BASE URL (StreamableHttpMcpTransport handles the endpoints internally)
mcp.server.url=http://localhost:8480/mcpImportant: Use the base URL without
/sseor/messagessuffix. The LangChain4jStreamableHttpMcpTransporthandles the endpoint resolution automatically.
mvn clean package -DskipTestsmvn quarkus:devThe application will be available at: http://localhost:8082
java -jar target/quarkus-app/quarkus-run.jar./dev.sh # Development mode with hot reload
./start.sh # Production mode (packaged JAR)The application provides the following REST endpoints:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/mcp/server | Get MCP server information and connection status |
| POST | /api/mcp/connect | Connect to the MCP server |
| POST | /api/mcp/disconnect | Disconnect from the MCP server |
| GET | /api/mcp/tools | List all available tools |
| GET | /api/mcp/tools/{toolName} | Get details for a specific tool |
| POST | /api/mcp/tools/{toolName}/call | Call a tool with arguments |
| POST | /api/mcp/refresh | Refresh tool list from server |
# Connect to server
curl -X POST http://localhost:8082/api/mcp/connect
# List tools
curl http://localhost:8082/api/mcp/tools
# Call a tool
curl -X POST http://localhost:8082/api/mcp/tools/my-tool/call \
-H "Content-Type: application/json" \
-d '{"arguments": {"param1": "value1", "param2": 42}}'MCPTestClient/
├── src/main/java/com/example/mcp/
│ ├── dto/
│ │ ├── ToolDTO.java # Tool data transfer object
│ │ ├── ToolCallRequestDTO.java # Tool call request DTO
│ │ └── ToolCallResponseDTO.java # Tool call response DTO
│ ├── resource/
│ │ └── McpResource.java # REST API endpoints
│ └── service/
│ ├── McpClientService.java # MCP client (LangChain4j-based)
│ └── McpManager.java # MCP manager (startup connection test)
├── src/main/resources/
│ ├── META-INF/resources/
│ │ └── index.html # Web frontend
│ └── application.properties # Configuration
└── pom.xml # Maven build file// quarkus-mcp-server-sse dependency
// Runs at http://localhost:8480/mcpnpx -y @modelcontextprotocol/server-filesystem /tmpYou can implement your own MCP server using:
┌─────────────────────────────────────────────────────────────┐
│ Browser (HTML/JS) │
│ ┌───────────┐ ┌──────────────┐ ┌────────────────────┐ │
│ │ Server │ │ Tool List │ │ JSON Editor + │ │
│ │ Info │ │ (sidebar) │ │ Call/Result Panel │ │
│ └───────────┘ └──────────────┘ └────────────────────┘ │
└─────────────────────────┬───────────────────────────────────┘
│ REST API (JSON)
┌─────────────────────────┴───────────────────────────────────┐
│ Quarkus Backend │
│ ┌──────────────┐ ┌──────────────────────────────────────┐ │
│ │ McpResource │──│ McpClientService │ │
│ │ (REST API) │ │ • StreamableHttpMcpTransport │ │
│ └──────────────┘ │ • DefaultMcpClient (LangChain4j) │ │
│ │ • Tool cache + schema extraction │ │
│ └──────────────────────────────────────┘ │
└─────────────────────────┬───────────────────────────────────┘
│ Streamable HTTP
┌─────────────────────────┴───────────────────────────────────┐
│ MCP Server │
│ (Quarkus / Node.js / Python) │
└─────────────────────────────────────────────────────────────┘/sse suffix (e.g., http://localhost:8480/mcp)quarkus.http.port in application.properties if neededThis project is provided as-is for testing and learning purposes.
augmentia-de/MCPTestClient
April 13, 2026
April 13, 2026
HTML