Skip to content

Dev - #4

Merged
Alexandre-Roussel48 merged 7 commits into
mainfrom
dev
Nov 16, 2025
Merged

Dev#4
Alexandre-Roussel48 merged 7 commits into
mainfrom
dev

Conversation

@Alexandre-Roussel48

Copy link
Copy Markdown
Owner

This pull request introduces the initial implementation of an Arithmetic & Logic Model Context Protocol (MCP) server in Scala 3, built with ZIO and Circe. It establishes a modular, testable architecture for serving arithmetic and logic tools over a JSON-RPC (STDIO) transport, with Docker support and detailed documentation. The changes include the core server entrypoint, protocol models, routing and error handling, configuration, and build infrastructure.

Key changes:

Core Server Architecture

  • Added Main.scala, which composes ZIO layers for configuration, session management, tool registry, routing, and STDIO transport, then starts the main server loop to read and handle JSON-RPC messages.
  • Introduced a modular package structure for transport, router, session, tools, model, config, and utility code, as described in the new documentation.

Protocol and Data Models

  • Implemented JSON-RPC protocol models: JsonRpcMessage, JsonRpcId, and JsonRpcError with Circe codecs for serialization and deserialization. [1] [2] [3]
  • Added MCP protocol models for initialization, capabilities, and tool invocation, including InitializeParams, InitializeResult, ToolDefinition, and related types. [1] [2] [3]

Routing and Error Handling

  • Added RequestRouter, InitializeHandler, and ToolsHandler for dispatching and handling JSON-RPC requests, including robust error mapping from domain errors to JSON-RPC errors. [1] [2]

Configuration and Build

  • Defined ServerConfig and ServerInfo for server metadata and capabilities, provided as a ZIO layer.
  • Added a multi-stage Dockerfile for building and running the server as a container, and included SBT build configuration and the sbt-assembly plugin for fat JAR packaging. [1] [2] [3]

Documentation

  • Rewrote README.md to provide a comprehensive overview of the server's architecture, usage, Docker integration, VS Code setup, and testing approach, targeting both contributors and end users.

@Alexandre-Roussel48
Alexandre-Roussel48 merged commit 24ffa93 into main Nov 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant