Quarkus MCP Server

The production-ready way to build Model Context Protocol servers in Java.

Quarkus MCP Server: The production-ready way to build https://modelcontextprotocol.io/[Model Context Protocol] servers in Java.

Quarkus MCP Server brings enterprise-grade reliability and performance to MCP server development. Build native executables with instant startup times, leverage build-time optimization for minimal resource usage, and deploy AI-powered tools that scale.

In a Glance

Create a tool in seconds with declarative annotations:

import io.quarkiverse.mcp.server.Tool;

public class WeatherTools {

    @Tool(description = "Get current weather for a city")
    String getWeather(String city) {
        return "Sunny, 25°C in " + city;
    }
}

That’s it. No configuration files, no boilerplate, no manual registration. The @Tool annotation does it all.

Why Quarkus MCP Server?

Build-Time Magic

Quarkus analyzes your code at build time, not runtime. Tools, resources, and prompts are discovered and validated during compilation. This means:

  • Instant startup : Native executables start in milliseconds

  • Minimal memory : Production servers run on ~30MB of RAM

  • Zero reflection : Everything is known at build time

Production Ready, Out of the Box

  • Multiple transports : STDIO, HTTP, SSE, WebSocket all supported

  • Enterprise integration : Full CDI support with dependency injection, interceptors, and decorators

  • Security built-in : Integrate with Quarkus Security for authentication and authorization

  • Reactive by default : Built on Eclipse Vert.x for non-blocking I/O, also supports virtual threads

  • Comprehensive testing - McpAssured testing library for all transport types

Developer Experience

  • Live reload - Change code and see results instantly in dev mode

  • Dev UI - Test tools and resources from your browser

  • Traffic logging - See every JSON-RPC message during development

  • Type-safe - Leverage Java’s type system for robust tool definitions

Protocol Support

This project implements the Model Context Protocol specification 2025-11-25.

Full support for:

  • Tools - Expose callable functions to AI clients

  • Resources - Share data and files with templates and subscriptions

  • Prompts - Provide reusable prompt templates

  • Sampling - Request LLM completions from clients

  • Elicitation - Request additional information from clients

  • Progress - Send progress notifications during long-running operations

  • Cancellation - Handle client-requested cancellations gracefully

  • Roots - Discover client working directories

Getting Started

Choose your transport and create your first MCP server:

# STDIO transport (for local clients like Claude Desktop)
mvn io.quarkus:quarkus-maven-plugin:3.27.2:create \
    -Dextensions="io.quarkiverse.mcp:quarkus-mcp-server-stdio:1.9.0"

# HTTP transport (for web-based clients)
mvn io.quarkus:quarkus-maven-plugin:3.27.2:create \
    -Dextensions="io.quarkiverse.mcp:quarkus-mcp-server-http:1.9.0"

Then follow one of our tutorials:

Key Features

Declarative Tool Definition

Use annotations to define tools with minimal code:

@Tool(description = "Calculate the sum of two numbers")
int add(
    @ToolArg(description = "First number") int a,
    @ToolArg(description = "Second number") int b
) {
    return a + b;
}

JSON schema generation, parameter validation, and error handling are automatic.

Multiple Server Configurations

Run multiple isolated MCP servers in a single application:

public class MultiServerTools {

    @Tool(description = "Public API")
    String publicTool() {
        return "Available to all clients";
    }

    @McpServer("admin")
    @Tool(description = "Admin API")
    String adminTool() {
        return "Requires authentication";
    }
}

Each server can have different endpoints, security policies, and features.

Native Compilation

Build lightweight native executables with GraalVM:

mvn package -Dnative

Deploy MCP servers that:

  • Start in milliseconds

  • Use minimal memory

  • Run anywhere (no JVM required)

Project Information

License

Apache License 2.0

Source Code

github.com/quarkiverse/quarkus-mcp-server

Issue Tracker

Report an issue

MCP Protocol

2025-11-25

Current Version

1.9.0

Community & Support

What’s Next?

Getting Started

Build your first MCP server in 5 minutes

Implementing Tools

Learn all the ways to define and customize tools

Multiple Servers

Run different APIs with different security policies

Testing

Write comprehensive tests with McpAssured

Architecture

Understand how Quarkus optimizes your MCP server