You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No need to care about the low-level details of native MCP Java SDK and how to create the MCP resources, prompts, and tools. Just annotate them like this:
39
39
40
-
[source,java]
41
-
----
40
+
```java
42
41
@McpResources
43
42
publicclassMyMcpResources {
44
43
@@ -51,10 +50,9 @@ public class MyMcpResources {
51
50
52
51
// Your other MCP resources here...
53
52
}
54
-
----
53
+
```
55
54
56
-
[source,java]
57
-
----
55
+
```java
58
56
@McpTools
59
57
publicclassMyMcpTools {
60
58
@@ -68,45 +66,43 @@ public class MyMcpTools {
68
66
69
67
// Your other MCP tools here...
70
68
}
71
-
----
69
+
```
72
70
73
71
Now it's all set, run your MCP server, choose one MCP client you like and start your MCP exploration journey.
74
72
75
-
[WARNING]
76
-
77
-
Please note that this project is under development and is not ready for production use.
73
+
> [!WARNING]
74
+
> Please note that this project is under development and is not ready for production use.
78
75
79
-
== Getting Started
76
+
##Getting Started
80
77
81
-
=== Requirements
78
+
###Requirements
82
79
83
80
- Java 17 or later (Restricted by MCP Java SDK)
84
81
85
-
=== Installation
82
+
###Installation
86
83
87
84
Add the following Maven dependency to your project:
88
85
89
-
[source,xml]
90
-
----
86
+
```xml
91
87
<!-- Internally relies on native MCP Java SDK 0.9.0 -->
92
88
<dependency>
93
89
<groupId>io.github.codeboyzhou</groupId>
94
90
<artifactId>mcp-declarative-java-sdk</artifactId>
95
91
<version>0.2.0</version>
96
92
</dependency>
97
-
----
93
+
```
98
94
99
-
=== Examples
95
+
###Examples
100
96
101
-
You can find more examples and usages in this https://github.com/codeboyzhou/mcp-declarative-java-sdk-examples[repository].
97
+
You can find more examples and usages in this [repository](https://github.com/codeboyzhou/mcp-declarative-java-sdk-examples).
102
98
103
-
== What is MCP?
99
+
##What is MCP?
104
100
105
-
The https://modelcontextprotocol.io[Model Context Protocol (MCP)] lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
101
+
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:
106
102
107
103
- Expose data through **Resources** (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
108
104
- Provide functionality through **Tools** (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
109
105
- Define interaction patterns through **Prompts** (reusable templates for LLM interactions)
110
106
- And more!
111
107
112
-
You can start exploring everything about *MCP* from https://modelcontextprotocol.io[here].
108
+
You can start exploring everything about **MCP** from [here](https://modelcontextprotocol.io).
0 commit comments