Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดJava SDK for building custom Model Context Protocol (MCP) servers quickly, with runnable MySQL and Redis server examples.
MCP.so listings: MySQL MCP Server for Java · Redis MCP Server for Java
Full walkthrough: 5-Minute Quick Start.
Core SDK:
<dependency>
<groupId>io.github.6000fish</groupId>
<artifactId>mcp-sdk</artifactId>
<version>0.1.1</version>
</dependency>
Spring Boot starter:
<dependency>
<groupId>io.github.6000fish</groupId>
<artifactId>mcp-spring-boot-starter</artifactId>
<version>0.1.1</version>
</dependency>
Build the no-database quick-start server:
mvn package -pl mcp-examples/quick-start -am -DskipTests
Add the runnable jar to your MCP Agent configuration:
{
"mcpServers": {
"quick-start": {
"type": "stdio",
"command": "java",
"args": [
"-jar",
"/absolute/path/to/mcp-java/mcp-examples/quick-start/target/quick-start-0.1.1.jar"
]
}
}
}
Restart the Agent and ask:
Use the quick-start MCP server to greet Alice and get the current time.
The demo exposes greet, current_time, calculate, text_transform, and resource server://info.
For a copyable annotation-based template:
mvn package -pl mcp-examples/custom-server-template -am -DskipTests
Configure the generated jar:
{
"mcpServers": {
"custom-template": {
"type": "stdio",
"command": "java",
"args": [
"-jar",
"/absolute/path/to/mcp-java/mcp-examples/custom-server-template/target/custom-server-template-0.1.1.jar"
]
}
}
}
Then edit CustomMcpServer.java and add your own @McpTool, @McpResource, or @McpPrompt methods.
Minimal SDK API example:
McpServer server = DefaultMcpServer.builder()
.name("my-server")
.version("1.0.0")
.build();
server.tool("greet", "Greet someone", arguments -> {
String name = (String) arguments.getOrDefault("name", "World");
return ToolCallResult.success("Hello, " + name + "!");
});
server.start(new StdioTransport());
Annotation example:
@McpServer(name = "my-server", version = "1.0.0")
public class MyServer {
@McpTool(name = "hello", description = "Say hello")
public String hello(@Param(name = "name") String name) {
return "Hello, " + name + "!";
}
}
Build the currently published ready-to-use server modules:
mvn package -pl mcp-server-collection/mcp-server-mysql -am -DskipTests
mvn package -pl mcp-server-collection/mcp-server-redis -am -DskipTests
MySQL server config:
{
"mcpServers": {
"mysql": {
"type": "stdio",
"command": "java",
"args": [
"-jar",
"/absolute/path/to/mcp-java/mcp-server-collection/mcp-server-mysql/target/mcp-server-mysql-0.1.1.jar"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_DATABASE": "mcp_demo",
"MYSQL_USERNAME": "my_user",
"MYSQL_PASSWORD": "your_password"
}
}
}
}
Redis server config:
{
"mcpServers": {
"redis": {
"type": "stdio",
"command": "java",
"args": [
"-jar",
"/absolute/path/to/mcp-java/mcp-server-collection/mcp-server-redis/target/mcp-server-redis-0.1.1.jar"
],
"env": {
"REDIS_HOST": "localhost",
"REDIS_PORT": "6379",
"REDIS_PASSWORD": ""
}
}
}
}
Before connecting real data, read the Security Guide. Keep credentials in local Agent configuration or environment variables only.
User documentation:
Maintainer documentation:
The stdio servers are designed for mainstream MCP clients and Agents:
tools/list, tools/call, and client _meta fields.Compatibility safeguards include required inputSchema on tools, tolerant request parsing for client extension fields such as _meta, omitted null fields in stdio responses, and logging to stderr so stdout stays reserved for MCP JSON-RPC messages.
mcp-java/
├── mcp-sdk/ # Core SDK
├── mcp-spring-boot-starter/ # Spring Boot integration
├── mcp-server-collection/ # Ready-to-use server implementations
└── mcp-examples/ # SDK examples and templates
git clone https://github.com/6000fish/mcp-java.git
cd mcp-java
mvn clean install
Release instructions are in docs/release.md. Do not commit Maven Central credentials, GPG passphrases, private keys, or settings.xml.
Java 生态的 MCP 基础设施,包含 SDK + 常用 Server 实现
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
MCP Java ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-11-05 Java 生态的 MCP 基础设施,包含 SDK + 常用 Server 实现