solon-ai-embedded-examples
solon ai(&mcp) embedded examples。支持 MCP_2025_06_18(mcp streamable)。示例项目包括各种框架嵌入:(Solon、SpringBoot、jFinal、Vert.X、Quarkus、Micronaut)
claude mcp add --transport stdio opensolon-solon-ai-embedded-examples java -jar solon-ai-embedded-examples-mcp-server.jar \ --env JAVA_OPTS="Optional: additional Java options" \ --env SOLON_MCP_PROTOCOL="MCP protocol version (e.g., MCP_2025_03_26) - default if not set"
How to use
This MCP server package provides example implementations for Solon-based AI integrations with MCP (Model Context Protocol). It includes sample configurations for LLM usage, tool calls, and skills, as well as MCP server and client patterns (supporting the MCP_2025_03_26 protocol). The server is intended to run within a Solon container environment, and demonstrates how to expose LLM prompts, tool calls, and Retrieval-Augmented Generation (RAG) workflows through a consistent MCP interface. To use it, start the MCP server jar and connect an MCP client to exchange requests (e.g., chat, tool calls, and skill invocations) following the examples illustrated in the repository. Ensure your environment has a compatible Java runtime and a Solon container if you plan to run the server inside that ecosystem.
How to install
Prerequisites:
- Java 8+ (preferably Java 11+ for compatibility) installed on your system
- Maven or Gradle for building from source (depending on project setup)
- Git to clone the repository
Step-by-step:
-
Clone the repository git clone <repository-url> cd solon-ai-embedded-examples
-
Build the project (example using Maven; adapt if using Gradle) mvn -q -DskipTests package
or if there is a specific module for the MCP server
mvn -q -pl :solon-ai-embedded-examples-mcp-server -DskipTests package
-
Locate the built MCP server jar
Typical path after build
ls target | grep mcp-server
-
Run the MCP server java -jar target/solon-ai-embedded-examples-mcp-server.jar
-
Run within a Solon container (optional but recommended)
Ensure the container has Java and network access to MCP clients
docker run -it --rm -v /path/to/config:/config -p 8080:8080 your-solon-container-image:latest
Prerequisites recap:
- Java Runtime Environment 8+ (prefer newer for long-term support)
- Build tool (Maven or Gradle) according to project setup
- Access to a Solon container if you intend to run with Solon integration
Note: If your environment uses a specific container or build script, adjust the commands accordingly based on the project’s provided guidance.
Additional notes
Tips and notes:
- This example set supports MCP_2025_03_26 protocol; confirm the protocol version in your environment if you have multiple MCP versions in use.
- The repository mentions multiple Java versions (Java 8, 11, 17, 21, 25) for compatibility; ensure your runtime matches the Java version the package was built with.
- If you encounter startup issues, verify that the Solon container has network access to MCP clients and that the MCP server jar path is correct.
- Environment variables such as JAVA_OPTS or SOLON_MCP_PROTOCOL can be used to tune performance or protocol behavior; supply appropriate values in your deployment environment.
- The MCP server exposes both server and client examples; when testing, use a compatible MCP client to validate chat, tool calls, skills, and RAG workflows.
Related MCP Servers
mesh
One secure endpoint for every MCP server. Deploy anywhere.
Remote
A type-safe solution to remote MCP communication, enabling effortless integration for centralized management of Model Context.
mcp-in-action
极客时间MCP新课已经上线!超2000同学一起开启MCP学习之旅!
mcp-typescript-sdk
A TypeScript SDK for implementing Model Context Protocol (MCP) over MQTT, supporting both browser and Node.js environments.
quarkus-workshop-langchain4j
Quarkus Langchain4J Workshop
mcpx-py
Python client library for https://mcp.run - call portable & secure tools for your AI Agents and Apps