forked from quarkiverse/quarkus-mcp-servers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkiverse#12 from maxandersen/template
add template
- Loading branch information
Showing
7 changed files
with
255 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.quarkus.mcp.servers.{baseName}; | ||
|
||
import io.quarkiverse.mcp.server.Prompt; | ||
import io.quarkiverse.mcp.server.PromptArg; | ||
import io.quarkiverse.mcp.server.PromptMessage; | ||
import io.quarkiverse.mcp.server.TextContent; | ||
import io.quarkiverse.mcp.server.Tool; | ||
import io.quarkiverse.mcp.server.ToolArg; | ||
|
||
public class MCPServer{baseName} { | ||
|
||
@Tool(description = "Say hello") | ||
String hello(@ToolArg(description = "Who you want to be greeted") String who) { | ||
return "Hello " + who; | ||
} | ||
|
||
@Prompt(description = "Make a greeting") | ||
PromptMessage make_greeting(@PromptArg(description = "Who you want to be greeted") String who) { | ||
return PromptMessage.withUserRole(new TextContent( | ||
""" | ||
The assistants goal is to greet the user {who} | ||
""" | ||
)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Model Context Protocol Server for \{baseName\} | ||
|
||
This Model Context Protocol(MCP) server enables Large Language Models (LLMs) to work with {basename}. | ||
|
||
 | ||
|
||
|
||
## General Usage | ||
|
||
1. Install [jbang](https://www.jbang.dev/download/) | ||
2. Configure your MCP Client to run the server (see [Claude Desktop Config](#claude-desktop-config) below) | ||
|
||
Below are examples of command lines to use for configuring the server. | ||
|
||
Start server: | ||
|
||
```shell | ||
jbang mcp-server-{basename}@quarkusio | ||
``` | ||
|
||
## Components | ||
|
||
Below are the MCP components provided by this server. | ||
|
||
### Tools | ||
|
||
* **hello_world** - say hello to the user | ||
|
||
### Prompts | ||
|
||
* **make_greeting** - example prompt to get started exploring the server | ||
|
||
## Claude Desktop Config and [mcp-cli](https://github.com/chrishayuk/mcp-cli) | ||
|
||
Add this to your `claude_desktop.json` or `server_config.json` file: | ||
|
||
```json | ||
{ | ||
"mcpServers": { | ||
"jdbc": { | ||
"command": "jbang", | ||
"args": [ | ||
"mcp-server-{basename}@quarkiverse/quarkus-mcp-server" | ||
] | ||
} | ||
} | ||
} | ||
``` |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>io.quarkus.mcp.servers</groupId> | ||
<artifactId>mcp-server-{baseName}</artifactId> | ||
|
||
<parent> | ||
<groupId>io.quarkiverse.mcp.servers</groupId> | ||
<artifactId>mcp-servers-parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
</parent> | ||
|
||
<properties> | ||
|
||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>$\{quarkus.platform.group-id}</groupId> | ||
<artifactId>$\{quarkus.platform.artifact-id}</artifactId> | ||
<version>$\{quarkus.platform.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus.mcp.servers</groupId> | ||
<artifactId>mcp-server-shared</artifactId> | ||
<version>$\{version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-jackson</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-qute</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-arc</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>$\{quarkus.platform.group-id}</groupId> | ||
<artifactId>quarkus-maven-plugin</artifactId> | ||
<version>$\{quarkus.platform.version}</version> | ||
<extensions>true</extensions> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>build</goal> | ||
<goal>generate-code</goal> | ||
<goal>generate-code-tests</goal> | ||
<goal>native-image-agent</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>$\{compiler-plugin.version}</version> | ||
<configuration> | ||
<parameters>true</parameters> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>$\{surefire-plugin.version}</version> | ||
<configuration> | ||
<systemPropertyVariables> | ||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> | ||
<maven.home>$\{maven.home}</maven.home> | ||
</systemPropertyVariables> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>$\{surefire-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<systemPropertyVariables> | ||
<native.image.path> | ||
$\{project.build.directory}/$\{project.build.finalName}-runner</native.image.path> | ||
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> | ||
<maven.home>$\{maven.home}</maven.home> | ||
</systemPropertyVariables> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |