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
// or start with yaml config file (compatible with the Spring AI framework)
40
+
servers.startServer();
41
+
// or start with a custom config file (compatible with the Spring AI framework)
42
+
servers.startServer("my-mcp-server.yml");
45
43
}
46
44
47
45
}
@@ -54,16 +52,21 @@ enabled: true
54
52
stdio: false
55
53
name: mcp-server
56
54
version: 1.0.0
57
-
instructions: mcp-server
58
-
request-timeout: 30000
59
-
type: SYNC
60
-
resource-change-notification: true
61
-
prompt-change-notification: true
62
-
tool-change-notification: true
63
-
sse-message-endpoint: /mcp/message
64
-
sse-endpoint: /sse
65
-
base-url: http://localhost:8080
66
-
sse-port: 8080
55
+
type: ASYNC
56
+
request-timeout: 20000
57
+
capabilities:
58
+
resource: true
59
+
prompt: true
60
+
tool: true
61
+
change-notification:
62
+
resource: true
63
+
prompt: true
64
+
tool: true
65
+
sse:
66
+
message-endpoint: /mcp/message
67
+
endpoint: /sse
68
+
base-url: http://localhost:8080
69
+
port: 8080
67
70
```
68
71
69
72
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:
@@ -74,6 +77,8 @@ public class MyMcpResources {
74
77
75
78
// This method defines a MCP resource to expose the OS env variables
0 commit comments