Skip to content

Arithmetic + Logic MCP Implementation - #2

Closed
Alexandre-Roussel48 wants to merge 7 commits into
mainfrom
dev
Closed

Alexandre-Roussel48 wants to merge 7 commits into
mainfrom
dev

Conversation

@Alexandre-Roussel48

Copy link
Copy Markdown
Owner

This pull request introduces the implementation of an Arithmetic + Logic MCP (Model Context Protocol) server in Scala 3 using ZIO and Circe. It establishes a modular, layered architecture for a JSON-RPC server over STDIO, providing arithmetic and logic tools for editor integrations such as VS Code with Copilot Agent Mode. The changes include project setup, a comprehensive README, the main application entrypoint, configuration and data models for the MCP protocol, error handling, and the initial routing and handler layers.

The most important changes are:

Project Setup & Documentation

  • Added a detailed README.md describing the server's purpose, architecture, usage with Docker and VS Code, Copilot Agent Mode requirements, and testing approach.
  • Added project build files: build.properties specifying sbt version and plugins.sbt adding the assembly plugin for packaging. [1] [2]

Core Application & Architecture

  • Introduced the main application entrypoint in Main.scala, composing ZIO layers for configuration, session, tool registry, routing, and STDIO transport, and implementing the main loop for handling JSON-RPC messages.
  • Defined the configuration layer in ServerConfig.scala, including server metadata and capabilities, exposed as a ZIO layer.

Protocol & Data Models

  • Implemented JSON-RPC protocol data models: message envelopes (JsonRpcMessage.scala), error codes (JsonRpcError.scala), and request IDs (JsonRpcId.scala). [1] [2] [3]
  • Added MCP protocol data models for initialization, capabilities, and tool invocation, including codecs for Circe serialization. [1] [2] [3]

Routing & Error Handling

  • Added the initial routing and handler layers, including InitializeHandler.scala for handling initialization requests, and ErrorMapping.scala for mapping internal errors to JSON-RPC error responses. [1] [2]

These changes lay the foundation for a robust, testable MCP server providing arithmetic and logic tools over a standard protocol for editor integrations.

  • Project Setup & Documentation:

    • Added detailed README.md and project build files (build.properties, plugins.sbt). [1] [2] [3]
  • Core Application & Architecture:

    • Implemented Main.scala with ZIO layer composition and main server loop.
    • Provided configuration via ServerConfig.scala as a ZIO layer.
  • Protocol & Data Models:

    • Defined JSON-RPC message, error, and ID models with Circe codecs. [1] [2] [3]
    • Added MCP protocol models for initialization, capabilities, and tools. [1] [2] [3]
  • Routing & Error Handling:

    • Implemented InitializeHandler for initialization requests and ErrorMapping for error translation. [1] [2]

@Alexandre-Roussel48 Alexandre-Roussel48 self-assigned this Nov 15, 2025
@Alexandre-Roussel48
Alexandre-Roussel48 marked this pull request as draft November 15, 2025 23:26
Repository owner locked as resolved and limited conversation to collaborators Nov 16, 2025
Repository owner unlocked this conversation Nov 16, 2025
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