QU

Quarkus MCP Server for Java Microservices

Deploy scalable Java microservices with a Quarkus MCP server that simplifies configuration, observability, and fast, lightweight runtime performance.

Quick Install
npx -y @quarkiverse/quarkus-mcp-servers

Overview

Quarkus MCP Server for Java Microservices is a lightweight, Quarkus-based server implementation of the Model Context Protocol (MCP) tailored for building scalable microservices. It provides a compact runtime footprint, fast startup times, and native-image friendliness that aligns with the Quarkus philosophy. The server focuses on simplifying configuration, observability, and integration into cloud-native deployment pipelines.

Designed for Java developers who need predictable performance and operational features out of the box, the MCP server exposes HTTP endpoints for model context handling, health checks, and telemetry. It integrates with Quarkus extensions (metrics, tracing, health) so you can monitor and operate MCP-based microservices using standard tooling.

Features

  • Fast, low-latency runtime built on Quarkus (dev mode, JVM, native)
  • Simple extension-based installation via Quarkus tooling
  • Config-driven behavior (application.properties / environment variables)
  • Health checks and readiness/liveness endpoints for orchestration
  • Metrics and tracing integration (SmallRye Metrics / OpenTelemetry)
  • Lightweight footprint suitable for containers and serverless
  • Example resources and starter templates for common MCP patterns
  • Kubernetes-friendly deployment patterns and example manifests

Installation / Configuration

Add the MCP server extension to your Quarkus project. Using the Quarkus CLI or Maven plugin is the recommended way:

Using the Quarkus CLI:

quarkus create app org.example:my-mcp-app --extension=quarkus-mcp-servers
cd my-mcp-app

Using Maven to add the extension:

mvn quarkus:add-extension -Dextensions="quarkus-mcp-servers"

Run locally in development mode:

mvn quarkus:dev

Example configuration (application.properties — illustrative):

# Server basics
quarkus.http.port=8080
mcp.server.context-path=/mcp
mcp.server.max-connections=200

# Observability
quarkus.smallrye-metrics.enabled=true
quarkus.otel.traces.enabled=true

# Health checks (examples)
quarkus.health.root-path=/health
mcp.server.health-checks.enabled=true

Note: property names above are examples to show patterns for configuration. Consult the project’s README and reference documentation in the GitHub repository for the definitive configuration keys and supported options.

Available Resources

  • GitHub repository: https://github.com/quarkiverse/quarkus-mcp-servers — source code, issue tracker, and examples
  • Example projects: check the repo’s examples folder for starter templates and sample usages
  • Quarkus docs: use Quarkus extensions (metrics, smallrye, OpenTelemetry) for production-quality observability
  • Container images: build a container using the standard Quarkus container build or native-image workflows
  • Community support: open issues and discussions on the GitHub project; Quarkus community channels for broader help

Use Cases

  1. Context management for language models

    • Deploy an MCP server that stores and serves model context for downstream model inference services. Use the server to standardize how prompts, conversation histories, and context metadata are retrieved and updated across multiple model backends.
  2. Model routing and multi-tenant serving

    • Implement routing rules that direct requests to different model implementations or tenants based on incoming request headers or tenant IDs. The MCP server acts as the consistent control plane for context selection and metadata enrichment.
  3. Edge or low-latency inference services

    • Take advantage of Quarkus native compilation to build a small, fast binary for edge deployments. The MCP server enables low-latency context retrieval with minimal resource overhead, suitable for autoscaling Kubernetes pods.
  4. Observability and compliance

    • Centralize context-related telemetry with integrated metrics and tracing. Use Quarkus observability extensions to export metrics to Prometheus and traces to OpenTelemetry backends, enabling detailed request auditing and performance analysis.

Example: Kubernetes Deployment

A minimal Deployment + Service example to run the MCP server in Kubernetes:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: mcp-server
spec:
  replicas: 3
  selector:
    matchLabels:
      app: mcp-server
  template:
    metadata:
      labels:
        app: mcp-server
    spec:
      containers:
      - name: mcp-server
        image: your-registry/mcp-server:latest
        ports:
        - containerPort: 8080
        env:
        - name: QUARKUS_HTTP_PORT
          value: "8080"
---
apiVersion: v1
kind: Service
metadata:
  name: mcp-server
spec:
  selector:
    app: mcp-server
  ports:
  - port: 80
    targetPort: 8080

Comparison (Dev vs. Production)

ConcernDevelopmentProduction
StartupFast interactive dev modeOptimize for native image or JVM with tuned GC
ObservabilityLocal metrics/tracing via dev toolsExport to Prometheus/OpenTelemetry backends
ScalingSingle instance, hot reloadMultiple replicas, health probes, autoscaling
Configurationapplication.propertiesEnvironment variables / ConfigMaps & Secrets

Next Steps

  • Clone the GitHub repository to explore code and examples: https://github.com/quarkiverse/quarkus-mcp-servers
  • Try the Quarkus dev mode (mvn quarkus:dev) and inspect endpoints
  • Add Quarkus metrics and OpenTelemetry extensions to integrate telemetry
  • Build a container image and test in a Kubernetes environment using the sample manifest above

For full configuration details and the latest examples, refer to the project repository and official Quarkus documentation.