scala-mcp

[md]Pomodoro MCP server

modules/example-pomodoro-mcp · HTTP + SSE · JVM · port 25000

A JVM HTTP server demonstrating dynamic resources with subscription notifications, server-initiated logging, argument-based prompts, and MCP cancellation. Uses McpHttp.streaming with per-session state — each client session gets its own PomodoroTimer wired to the notification sink.

Build and run (in-memory state)

sbt examplePomodoro/run
# Server starts on http://0.0.0.0:25000
# Explorer UI at http://localhost:25000 (redirects to /explorer/index.html)

Build and run (Redis-backed state, port 25001)

# Requires a Redis server on redis://localhost:6379
sbt 'examplePomodoro/runMain net.andimiller.mcp.examples.pomodoro.PomodoroMcpServerRedis'

Configure in Claude Code

.mcp.json:

{
  "mcpServers": {
    "pomodoro": {
      "type": "streamable-http",
      "url": "http://localhost:25000/mcp"
    }
  }
}