@@ -22,6 +22,7 @@ Just put this one line code in your `main` method:
2222``` java
2323// You can use this annotation to specify the base package
2424// to scan for MCP resources, prompts, tools, but it's optional.
25+ // If not specified, it will scan the package where the main method is located.
2526@McpComponentScan (basePackage = " com.github.codeboyzhou.mcp.examples" )
2627public class MyMcpServer {
2728
@@ -42,7 +43,7 @@ No need to care about the low-level details of native MCP Java SDK and how to cr
4243public class MyMcpResources {
4344
4445 // This method defines a MCP resource to expose the OS env variables
45- @McpResource (uri = " env://variables" , name = " env " , description = " OS env variables" )
46+ @McpResource (uri = " env://variables" , description = " OS env variables" )
4647 public String getSystemEnv () {
4748 // Just put your logic code here, forget about the MCP SDK details.
4849 return System . getenv(). toString();
@@ -57,7 +58,7 @@ public class MyMcpResources {
5758public class MyMcpTools {
5859
5960 // This method defines a MCP tool to read a file
60- @McpTool (name = " read_file " , description = " Read complete file contents with UTF-8 encoding" )
61+ @McpTool (description = " Read complete file contents with UTF-8 encoding" )
6162 public String readFile (
6263 @McpToolParam (name = " path" , description = " filepath" , required = true ) String path ) {
6364 // Just put your logic code here, forget about the MCP SDK details.
0 commit comments