Fire in da houseTop Tip:Most people pay way too much for Perplexity, MidJourney, Runway, ChatGPT - but you can actually get all that for $15 instead of $225+ per month. And free to test!Fire in da houseCheck it out

quarkus-mcp-server

MCP.Pizza Chef: quarkiverse

The Quarkus MCP Server extension provides developers with declarative and programmatic APIs to easily implement Model Context Protocol (MCP) server features. MCP is an open protocol designed to facilitate seamless integration between large language model (LLM) applications and external data sources or tools. This extension simplifies building MCP servers within the Quarkus framework, enabling real-time, structured context sharing with LLMs. It supports secure, scoped, and observable interactions, making it ideal for creating AI-enhanced workflows and agents. The project complements MCP clients like LangChain4j, offering a robust ecosystem for LLM integration across providers such as OpenAI, Claude, and Gemini.

Use This MCP server To

Implement MCP server features in Quarkus applications Expose structured data sources to LLMs Enable real-time context sharing with AI models Build secure and observable AI-enhanced workflows Integrate external tools with LLMs via MCP Develop declarative MCP server APIs Create programmatic MCP server interfaces

README

Quarkus Model Context Protocol (MCP) Server

All Contributors

Version

"Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools."

This extension provides declarative and programmatic APIs that enable developers to implement the MCP server features easily.

Note

The LangChain4j project provides the MCP client functionality, either as a low-level programmatic API or as a full-fledged integration into AI-infused applications.

Get Started

Step #1

Add the following dependency to your POM file:

<dependency>
    <groupId>io.quarkiverse.mcp</groupId>
    <!-- use 'quarkus-mcp-server-stdio' if you want to use the STDIO transport instead of the HTTP/SSE transport -->
    <artifactId>quarkus-mcp-server-sse</artifactId>
    <version>${project-version}</version>
</dependency>

Step #2

Add server features (prompts, resources and tools) represented by annotated business methods of CDI beans.

import jakarta.inject.Inject;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

import io.quarkiverse.mcp.server.BlobResourceContents;
import io.quarkiverse.mcp.server.Prompt;
import io.quarkiverse.mcp.server.PromptArg;
import io.quarkiverse.mcp.server.PromptMessage;

import io.quarkiverse.mcp.server.Tool;
import io.quarkiverse.mcp.server.Resource;
import io.quarkiverse.mcp.server.TextContent;

// This class is automatically registered as a @Singleton CDI bean
public class ServerFeatures {

    @Inject
    CodeService codeService;

    @Tool(description = "Converts the string value to lower case")
    String toLowerCase(String value) {
        return value.toLowerCase();
    }

    @Prompt(name = "code_assist")
    PromptMessage codeAssist(@PromptArg(name = "lang") String language) {
        return PromptMessage.withUserRole(new TextContent(codeService.assist(language)));
    }

    @Resource(uri = "file:///project/alpha")
    BlobResourceContents alpha(RequestUri uri) throws IOException{
        return BlobResourceContents.create(uri.value(), Files.readAllBytes(Path.of("alpha.txt")));
    }

}

Step #3

Run your Quarkus app and have fun!

Documentation

The full documentation is available at https://quarkiverse.github.io/quarkiverse-docs/quarkus-mcp-server/dev/index.html.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Martin Kouba
Martin Kouba

πŸ’» 🚧
Georgios Andrianakis
Georgios Andrianakis

πŸ’»
Max Rydahl Andersen
Max Rydahl Andersen
πŸ’‘
Rostislav Svoboda
Rostislav Svoboda
πŸ’»
George Gastaldi
George Gastaldi

πŸš‡
Jan Martiska
Jan Martiska

πŸ“–
Ioannis Canellos
Ioannis Canellos
πŸ’»
Sergey Beryozkin
Sergey Beryozkin

πŸ’‘

This project follows the all-contributors specification. Contributions of any kind welcome!

quarkus-mcp-server FAQ

How do I add the Quarkus MCP Server extension to my project?
You can add the Quarkus MCP Server extension via Maven Central by including the appropriate dependency io.quarkiverse.mcp:quarkus-mcp-server-parent in your Quarkus project configuration.
Does the Quarkus MCP Server support secure and scoped interactions?
Yes, it supports secure, scoped, and observable model interactions as part of the MCP protocol standards.
Can I use the Quarkus MCP Server with different LLM providers?
Yes, it is provider-agnostic and works seamlessly with LLMs like OpenAI, Claude, and Gemini.
Is there a programmatic API available for implementing MCP server features?
Yes, the extension provides both declarative and programmatic APIs for flexible MCP server implementation.
How does the Quarkus MCP Server relate to LangChain4j?
LangChain4j provides MCP client functionality, complementing the Quarkus MCP Server which implements the server side.
Where can I find documentation or examples for using the Quarkus MCP Server?
Documentation and examples are available on the GitHub repository and the official MCP website.
Can the Quarkus MCP Server handle real-time context updates for LLMs?
Yes, it enables real-time, structured context sharing with large language models.
Is the Quarkus MCP Server suitable for building AI-enhanced workflows?
Absolutely, it is designed to facilitate AI-enhanced workflows and agents with secure and observable interactions.