Skip to main content

JME DeploymentLog Example

Source on GitHub

This example project shows how to assemble a runnable deployment-log service using the jeap-deploymentlog-service-instance starter. The starter contains all the necessary components (REST API, persistence, security) to set up a deployment-log service instance; this project wires it up with a minimal pom.xml/configuration and a PostgreSQL database, without any custom application code of its own.

What this example demonstrates​

A deployment log records, per system and environment, which component version was deployed, when, by whom, and which artifact was used — used to answer "what is running where" questions. This example shows the minimal setup needed to run such a service:

  • Depending on jeap-deploymentlog-service-instance to get the deployment-log REST API and persistence out of the box.
  • Adding the optional jeap-deploymentlog-mcp module to offer an MCP server, so AI agents can read the deployed versions and search the deployment history (see MCP server).
  • application.yml configuring the service name, database schema, and enabling Swagger.
  • A PostgreSQL database provisioned via docker/docker-compose.yml.
  • An integration test (DeploymentLogExampleIT) that starts the service and exercises its API end to end: registering a new deployment via PUT /api/deployment/{id} (with basic-auth write credentials), then reading it back via GET /api/deployment/{id} (with basic-auth read credentials) and via the MCP tools find_deployments, get_systems and get_components.

Prerequisites​

To use this project, ensure you have the following installed:

  1. Java Development Kit (JDK): Version 25.
  2. Docker: For running the required infrastructure.

Note: Use the provided maven wrapper to build and run the project.

Getting started​

Infrastructure​

Before the examples can be started the infrastructure has to be started using docker. This starts the PostgreSQL database the deployment-log service persists its data to:

docker-compose -f docker/docker-compose.yml up

Build​

The project itself can be built with a simple

./mvnw install

Start​

Then the project can be started using

./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Trying it out​

Once the application is running, open the Swagger UI at http://localhost:8080/jme-deploymentlog-service/swagger-ui.html to explore the deployment-log API — registering a deployment (PUT /api/deployment/{id}) requires basic-auth credentials with a write role, reading one back (GET /api/deployment/{id}) requires a read role. See DeploymentLogExampleIT for a runnable end-to-end example of both calls.

MCP server​

The dependency on jeap-deploymentlog-mcp is all it takes: the service then also offers a Streamable HTTP MCP server at http://localhost:8080/jme-deploymentlog-service/mcp with the read-only tools get_systems, get_components (the components of one system), get_deployed_version and find_deployments. The MCP endpoint is open, it requires no authentication; the REST API keeps its basic authentication.

Connect an MCP client to the running service, for example:

# Claude Code
claude mcp add --transport http deploymentlog http://localhost:8080/jme-deploymentlog-service/mcp

# GitHub Copilot CLI
copilot mcp add --transport http deploymentlog http://localhost:8080/jme-deploymentlog-service/mcp

Then ask the agent e.g. which versions of a system are deployed on DEV, after registering a deployment as described above. The tools, their parameters and the operating limits are described in the MCP server documentation of the DeploymentLog service.

Profiles​

  • application-local: Contains all configurations for running the application locally.