mcp -dice-parser
MCP Server for dice notation parsing
claude mcp add --transport stdio diceroll-dev-mcp-server-dice-parser java -jar <absolute-path-to-project-directory>/target/mcp-roller-0.0.1-SNAPSHOT.jar --logging.file.name=<log-dir>/mcp-dice-parser.log
How to use
This MCP server is a Java-based dice notation parser that communicates via standard I/O. It uses Spring AI under the hood to interpret dice expressions and produce structured results. After launching the server with the provided configuration, clients can send prompts containing dice notation (for example, 3d6+2) and receive parsed outcomes, roll results, and any computed metadata. The server is designed to be integrated into existing clients via stdio, so you can pipe prompts to the process and read responses from its stdout. The included example prompt demonstrates how a user might interact with a tabletop RPG scenario; the server will parse dice expressions embedded in natural language prompts and return the computed roll results and any additional interpretation.
Usage typically involves starting the MCP server process and then sending a request prompt that contains the dice notation you want evaluated. The server will respond with structured data describing the roll results, totals, and any breakdowns you request in your prompt. If you need to customize logging, you can pass the --logging.file.name flag to direct log output to a file for troubleshooting.
How to install
Prerequisites:
- Java 11+ (or as required by the project)
- Maven Wrapper (mvnw) included in the repository or a Maven installation
Step-by-step installation:
- Ensure Java and Maven are installed:
- java -version
- ./mvnw -version (or mvn -version if using a system-wide Maven)
- Build the MCP server JAR using Maven:
or if you don’t have the wrapper:./mvnw verifymvn verify - Locate the built JAR in the target directory. The README references: mcp-roller-0.0.1-SNAPSHOT.jar Ensure the path in your client configuration points to this JAR.
- Configure your client to use the provided mcpServers entry (see mcp_config) and start the server process.
- (Optional) adjust logging and environment as needed by editing the command line flags or wrapping with a supervisor script.
Additional notes
Tips and notes:
- The server communicates via stdio, so your client should spawn the process and pipe prompts to its stdin while reading responses from stdout.
- The example command uses --logging.file.name to direct logs; you can change this path as needed for your environment.
- If you modify the client configuration, remember to restart the client application to pick up changes.
- Ensure the absolute path to the JAR in mcp_config is correct for your deployment environment.
- If you encounter issues, check the log file specified by --logging.file.name for hints about parsing or runtime errors.