- Explore MCP Servers
- mcp-micronaut-poc
Mcp Micronaut Poc
What is Mcp Micronaut Poc
mcp-micronaut-poc is a Proof of Concept (PoC) project that demonstrates the integration of the Model Context Protocol (MCP) with the Micronaut framework, allowing Micronaut beans to be exposed as MCP tools for AI models or other MCP clients.
Use cases
Use cases include creating reusable tools for AI models, integrating Micronaut applications with other services via MCP, and developing applications that require dynamic tool invocation.
How to use
To use mcp-micronaut-poc, create a Micronaut bean with methods annotated with @Tool. The tool will be automatically registered with the MCP server upon application startup, and clients can call the tool using the MCP protocol over standard input/output.
Key features
Key features include the ability to expose Micronaut beans as MCP tools, automatic registration of tools with the MCP server, and support for standard input/output communication.
Where to use
mcp-micronaut-poc can be used in fields that require integration of AI models with application services, particularly in scenarios where tools need to be exposed for remote invocation.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Micronaut Poc
mcp-micronaut-poc is a Proof of Concept (PoC) project that demonstrates the integration of the Model Context Protocol (MCP) with the Micronaut framework, allowing Micronaut beans to be exposed as MCP tools for AI models or other MCP clients.
Use cases
Use cases include creating reusable tools for AI models, integrating Micronaut applications with other services via MCP, and developing applications that require dynamic tool invocation.
How to use
To use mcp-micronaut-poc, create a Micronaut bean with methods annotated with @Tool. The tool will be automatically registered with the MCP server upon application startup, and clients can call the tool using the MCP protocol over standard input/output.
Key features
Key features include the ability to expose Micronaut beans as MCP tools, automatic registration of tools with the MCP server, and support for standard input/output communication.
Where to use
mcp-micronaut-poc can be used in fields that require integration of AI models with application services, particularly in scenarios where tools need to be exposed for remote invocation.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCPNaut Cli Example
PoC of MCP (Model Context Protocol) integration into Micronaut framework.
Overview
This project demonstrates how to integrate the Model Context Protocol (MCP) with the Micronaut framework. It provides a way to expose Micronaut beans as MCP tools that can be called by AI models or other MCP clients.
Installation
Prerequisites
- JDK 17 or higher
Building the Project
./gradlew build
Running the Application
./gradlew run
Usage
Creating an MCP Tool
- Create a Micronaut bean with methods annotated with
@Tool:
@Singleton
class MyTool {
@Tool(
name = "myTool",
description = "A tool that does something useful"
)
fun doSomething(
@ToolArg(description = "First parameter") param1: String,
@ToolArg(description = "Second parameter") param2: Int
): String {
return "Result: $param1 $param2"
}
}
-
The tool will be automatically registered with the MCP server when the application starts.
-
Clients can call the tool using the MCP protocol over standard input/output.
Project Structure
MicronautMcpCliCommand.kt- Main command class that sets up the MCP serverServerWrapper.kt- Wrapper for the MCP serverToolBuilder.kt- Processes methods annotated with@Tooland registers them as MCP toolsToolAnnotations.kt- Defines the@Tooland@ToolArgannotationsTypeConverter.kt- Converts JDK types to MCP typesArgumentConverter.kt- Converts MCP arguments to JDK typesFooTool.kt- Example tool implementation
Limitations
- Not a library now, just example App
- CLI (StdInOut) communication only
- Tools only (no Prompts…)
- Only int, boolean, number and strings and arrays (one or multidimensional) as parameters
- Only one String on output, no pictures, music
- no configuration of the server
- Temporary (?) package
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the Apache License 2.0.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










