mcpField
E
EasyChatDM - Demonstrates creating a simple MCP Server tools

EasyChatDM - Demonstrates creating a simple MCP Server tools

Local
github.com/coteGames & Entertainment16Updated 54w ago

About EasyChatDM - Demonstrates creating a simple MCP Server tools

EasyChatDM is a D&D example project for developers learning to build MCP tools with Spring AI MCP. It supplies random rulings and game material, and includes a persistent DM journal.

Key features

  1. 01Provide random rulings and game material
  2. 02Persist the DM Journal
  3. 03Use SQLite by default, with PostgreSQL as an option
  4. 04Demonstrate tools, resources, and prompts

Use cases

  1. 01Generate random outcomes for D&D sessions
  2. 02Introduce events or characters into a game
  3. 03Learn to create Spring AI MCP tools

MCP support

The project provides tools for Claude desktop and other MCP clients, and demonstrates MCP resources and prompts.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

EasyChatDM - Demonstrates creating a simple MCP Server tools

Example MCP Server tools for playing D&D with generative AIs. These tools are oracles that are used to determine random yes/no questions but also descriptions, events, NPCs, etc. They are "random tables" to use when you want to introduce some uncertainty, twists and turns, and randomness to your gaming. This project is for educational purposes, so little attention is given to good code design.

These tools are MCP Server tools that will work with Claude desktop and other MCP Clients. They're written in Spring AI MCP. This project is for education, so no consideration is given to good design. Instead, the code is written to make it easy to follow step-by-step how to create tools.

Running it

You should copy over the contents of contents of src/main/easychatdmdir/prompts/ to ~/.easychatdm. These are files for prompts, oracles, etc. uses.

Database configuration

The DM Journal now persists to a database instead of plain JSON files. Local runs default to SQLite with the database file stored under ~/.easychatdm/easychatdm.db. Switching between SQLite and PostgreSQL is controlled entirely through system properties or environment variables.

Available properties
PropertyDefaultDescription
easychatdm.dir${user.home}/.easychatdmBase directory for prompts/oracles and, for SQLite, the database file location.
easychatdm.db.typesqliteSelects sqlite (local file) or postgres (remote database).
easychatdm.db.sqlite.path(derived from easychatdm.dir)Overrides the full path to the SQLite database. If set to a directory, the file name below is appended.
easychatdm.db.sqlite.file-nameeasychatdm.dbName used when creating the SQLite database under the resolved directory.
easychatdm.db.sqlite.pool-size1HikariCP pool size when using SQLite (typically keep at 1).
easychatdm.db.postgres.url(required when db.type=postgres)JDBC URL for the PostgreSQL instance.
easychatdm.db.postgres.username(required when db.type=postgres)Database username.
easychatdm.db.postgres.password(empty string)Database password.
easychatdm.db.postgres.pool-size4HikariCP pool size when using PostgreSQL.
easychatdm.journal.export-filestrue for SQLite, false for PostgresMirrors journal contents to JSON/Markdown files when enabled.

For Cloud Foundry (or any remote deployment) set the system properties with JAVA_OPTS, for example:

JAVA_OPTS: >-
  -Deasychatdm.db.type=postgres
  -Deasychatdm.db.postgres.url=${JDBC_DATABASE_URL}
  -Deasychatdm.db.postgres.username=${JDBC_DATABASE_USERNAME}
  -Deasychatdm.db.postgres.password=${JDBC_DATABASE_PASSWORD}

Acknowledgements

More

See the ChatDM project for a more complex, feature-ful somewhat better designed version of this EasyChatDM.

Here are some videos going over the project:

  1. Part one of a video series
    where I build a very simple MCP too-land.
  2. In part two of the video series where I build a file-based oracle and go over how to use the logs Claude makes and start doing your own logging.
  3. In part three, I build an MCP Resource to serve as a DM Journal to persist game information between play sessions.
  4. Finally, I get around to making an MCP Prompt, which is really exciting.
    This is the first glimpse at something that feels "agentic."

Keep an eye on the playlist for the rest of the videos as they come out.

References

Versions

  • 0.0.4 - DM Journal stored in SQLite by default, switchable to PostgreSQL via system properties.
  • 0.0.3 - relativly stable, before converting over to use services for DM journal storage. This version still depends on file access.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.