Dev - #4
Merged
Merged
Dev#4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.Protocol and Data Models
JsonRpcMessage,JsonRpcId, andJsonRpcErrorwith Circe codecs for serialization and deserialization. [1] [2] [3]InitializeParams,InitializeResult,ToolDefinition, and related types. [1] [2] [3]Routing and Error Handling
RequestRouter,InitializeHandler, andToolsHandlerfor dispatching and handling JSON-RPC requests, including robust error mapping from domain errors to JSON-RPC errors. [1] [2]Configuration and Build
ServerConfigandServerInfofor server metadata and capabilities, provided as a ZIO layer.Dockerfilefor building and running the server as a container, and included SBT build configuration and thesbt-assemblyplugin for fat JAR packaging. [1] [2] [3]Documentation
README.mdto provide a comprehensive overview of the server's architecture, usage, Docker integration, VS Code setup, and testing approach, targeting both contributors and end users.