mcp
spring-ai+mcp示例
claude mcp add --transport stdio destiny-say-mcp-server docker run -i destiny-say/mcp-server \ --env MCP_PORT="25565" \ --env JAVA_OPTS="-Xmx1G" \ --env MCP_LOG_LEVEL="info"
How to use
This MCP server is a Spring-based example that demonstrates integration with the MCP protocol using AI-driven features. The server is packaged as a Docker container for easy deployment. To use, start the container with the provided environment variables to configure memory, port, and logging. The container exposes MCP endpoints and includes example tools for interacting with the MCP protocol, such as command handlers and event listeners. After starting, you can connect your MCP-compatible client to the configured port and begin sending requests to exercise the AI-enabled capabilities (e.g., automated responses, data enrichment, or rule-based interactions) exposed by the example server.
How to install
Prerequisites:
- Docker installed and running
- Basic familiarity with MCP protocol and Minecraft/Craft environments (if applicable)
Step-by-step:
-
Pull and run the Docker image: docker run -i destiny-say/mcp-server
Optional: expose a specific port and set memory options docker run -p 25565:25565 -e JAVA_OPTS="-Xmx1G" -e MCP_PORT=25565 destiny-say/mcp-server
-
Verify the container is running and listening on the configured MCP port (default 25565).
-
Connect your MCP client to localhost:25565 and begin issuing MCP commands to interact with the AI-enhanced features.
-
(Optional) Customize via environment variables:
- JAVA_OPTS: JVM options for memory and tuning
- MCP_PORT: port exposed for MCP clients
- MCP_LOG_LEVEL: logging verbosity (trace, debug, info, warn, error)
If you prefer building from source, consult the repository for Maven/Gradle build instructions and run the Spring-based application locally, then containerize as needed.
Additional notes
Notes:
- The provided image is configured to run with a default MCP port of 25565. Change MCP_PORT to match your environment if necessary.
- If you encounter connection issues, check container logs for errors related to port binding or AI services initialization.
- Ensure network access between your MCP client and the server container; firewalls or NAT may require port mapping adjustments.
- JAVA_OPTS can be used to optimize memory usage depending on available system resources.
- The example focuses on showing a Spring AI integration with MCP; for production, consider securing the endpoints and applying appropriate authentication if exposed publicly.