Back to Home
softwaremill icon

chimp

Verified Safe

by softwaremill

Overview

A Scala 3 library for building Model Context Protocol (MCP) servers, exposing type-safe tools as a JSON-RPC HTTP API.

Installation

Run Command
scala-cli examples/src/main/scala/chimp/adderMcp.scala

Security Notes

The framework itself appears robust, leveraging Scala's type safety and Tapir's well-established endpoint definitions. No 'eval' or similar dangerous runtime code execution is evident. Hardcoded secrets are not present in the provided snippets. The primary security considerations would stem from how developers implement the 'handle' or 'handleWithHeaders' logic for their specific tools: - External Service Calls: Examples like 'weatherMcp' interact with external APIs (Nominatim, Open-Meteo). Misuse of these or lack of rate limiting/error handling in the custom logic could lead to denial-of-service or unexpected costs. - Header Handling: 'handleWithHeaders' provides direct access to HTTP headers. Custom tool logic must correctly validate and sanitize any sensitive information or user input from headers to prevent injection attacks or information leakage. - Input Validation: While Tapir and Circe provide type-safe decoding, complex business logic within 'handle' functions still requires careful validation of the input type to prevent logical flaws or resource exhaustion.

Similar Servers

Stats

Interest Score49
Security Score8
Cost ClassLow
Stars58
Forks4
Last Update2025-12-13

Tags

ScalaServerAPIJSON-RPCTapir