Skip to content
Back to search

chimp

Build type-safe, boilerplate-less MCP servers and clients in Scala

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/softwaremill/chimp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/softwaremill/chimp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/softwaremill--chimp/badge.svg)](/listings/softwaremill--chimp)

HTML

<a href="/listings/softwaremill--chimp"><img src="/api/listings/softwaremill--chimp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

HTTP

Run a basic MCP server with Netty exposing a simple adder tool:

//> using dep com.softwaremill.chimp::chimp-server:0.6.0
//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.13.19

import chimp.server.*
import io.circe.Codec
import sttp.tapir.*
import sttp.tapir.server.netty.sync.NettySyncServer

case class AdderInput(a: Int, b: Int) derives Codec, Schema

@main def server(): Unit =
  val adder = tool("adder").description("Adds two numbers").input[AdderInput]
    .handle(i => ToolResult.text(s"Result: ${i.a + i.b}"))

  NettySyncServer().port(8080).addEndpoint(McpServer(tools = List(adder)).endpoint(List("mcp"))).startAndWait()

Connect and invoke the tool as an MCP client:

//> using dep com.softwaremill.chimp::chimp-client:0.6.0
//> using dep com.softwaremill.sttp.client4::core:4.0.24

import chimp.client.*
import chimp.client.transport.ClientHttpTransport
import chimp.protocol.*
import sttp.client4.*
import io.circe.Json

@main def client(): Unit =
  val backend = DefaultSyncBackend()
  val transport = ClientHttpTransport(backend, uri"http://localhost:8080/mcp")
  val client = McpClient(transport, Implementation("my-client", "0.1.0"))

  val result = client.callTool("adder", Json.obj("a" -> Json.fromInt(2), "b" -> Json.fromInt(3)))
  val _ = result.content.collect { case ToolContent.Text(_, text) => println(text) }

  client.close()
  backend.close()

stdio

Run a basic MCP server using stdio transport:

//> using dep com.softwaremill.chimp::chimp-server:0.6.0

import chimp.server.*
import chimp.server.transport.ServerStdioTransport
import io.circe.Codec
import sttp.tapir.*

case class EchoInput(message: String) derives Codec, Schema

@main def stdioServer(): Unit =
  val echo = tool("echo").description("Echoes the message").input[EchoInput]
    .handle(i => ToolResult.text(i.message))

  ServerStdioTransport().serve(McpServer(tools = List(echo)))

Start the server as a subprocess and invoke the tool as an MCP client:

//> using dep com.softwaremill.chimp::chimp-client:0.6.0

import chimp.client.*
import chimp.client.transport.ClientStdioTransport
import chimp.protocol.*
import io.circe.Json

@main def stdioClient(): Unit =
  val transport = ClientStdioTransport(List("scala-cli", "run", "stdioServer.scala"))
  val client = McpClient(transport, Implementation("my-client", "0.1.0"))

  val result = client.callTool("echo", Json.obj("message" -> Json.fromString("hello")))
  val _ = result.content.collect { case ToolContent.Text(_, text) => println(text) }

  client.close()

Bidirectional streaming

With the integration modules (like `chimp-server-ox` and `chimp-client-ox` for ox) bidirectional communication becomes possible. For example, run a basic streaming MCP server using Netty and ox:

//> using dep com.softwaremill.chimp::chimp-server-ox:0.6.0

import chimp.protocol.LoggingLevel
import chimp.server.*
import chimp.server.ox.OxServerHttpTransport
import io.circe.{Codec, Json}
import sttp.shared.Identity
import sttp.tapir.*
import sttp.tapir.server.netty.sync.NettySyncServer

case class WorkInput(steps: Int) derives Codec, Schema

@main def streamingServer(): Unit =
  val work = tool("work")
    .description("Reports progress and logs while running")
    .input[WorkInput]
    .streamingServerLogic[Identity]: (in, ctx, _) =>
      for step <- 1 to in.steps do
        ctx.reportProgress(step.toDouble / in.steps, total = Some(1.0))
        ctx.log(LoggingLevel.Info, Json.fromString(s"step $step of ${in.steps}"))
      ToolResult.text("done")

  val server = StreamingMcpServer[Identity]().withLoggingLevel(_ => ()).addStreamingTool(work)
  NettySyncServer().port(8080).addEndpoint(OxServerHttpTransport(List("mcp")).serve(server)).startAndWait()

Connect and invoke the tool as an MCP client, receiving server's notifications while the tool call is in flight:

//> using dep com.softwaremill.chimp::chimp-client-ox:0.6.0

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 184 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Chimp MCP
  2. [![CI](https://github.com/softwaremill/chimp/actions/workflows/ci.yml/badge.svg)](https://github.com/softwaremill/chimp/actions/workflows/ci.yml)
  3. [![Scala 3](https://img.shields.io/badge/scala-3-blue.svg)](https://www.scala-lang.org/)
  4. An SDK for building [MCP](https://modelcontextprotocol.io/specification) (Model Context Protocol) servers and
  5. clients in Scala 3 using boilerplate-less, type-safe APIs based on [Tapir](https://tapir.softwaremill.com/)
  6. and [sttp](https://github.com/softwaremill/sttp), supporting the variety of the Scala ecosystem.
  7. ### Transport
  8. Chimp implements both streamable HTTP and stdio transports. Additional integration modules unlock streaming features of
  9. the MCP protocol with bidirectional communication between server and client. Currently supporting [Ox](https://ox.softwaremill.com/), [ZIO](https://zio.dev/) and [Pekko](https://pekko.apache.org/).
  10. ### Quickstart
  11. #### HTTP
  12. Run a basic MCP server with Netty exposing a simple adder tool:
  13. ```scala
  14. //> using dep com.softwaremill.chimp::chimp-server:0.6.0
  15. //> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.13.19
  16. import chimp.server.*
  17. import io.circe.Codec
  18. import sttp.tapir.*
  19. import sttp.tapir.server.netty.sync.NettySyncServer
  20. case class AdderInput(a: Int, b: Int) derives Codec, Schema
  21. @main def server(): Unit =
  22. val adder = tool("adder").description("Adds two numbers").input[AdderInput]
  23. .handle(i => ToolResult.text(s"Result: ${i.a + i.b}"))
  24. NettySyncServer().port(8080).addEndpoint(McpServer(tools = List(adder)).endpoint(List("mcp"))).startAndWait()
  25. ```
  26. Connect and invoke the tool as an MCP client:
  27. ```scala
  28. //> using dep com.softwaremill.chimp::chimp-client:0.6.0
  29. //> using dep com.softwaremill.sttp.client4::core:4.0.24
  30. import chimp.client.*
  31. import chimp.client.transport.ClientHttpTransport
  32. import chimp.protocol.*
  33. import sttp.client4.*
  34. import io.circe.Json
  35. @main def client(): Unit =
  36. val backend = DefaultSyncBackend()
  37. val transport = ClientHttpTransport(backend, uri"http://localhost:8080/mcp")
  38. val client = McpClient(transport, Implementation("my-client", "0.1.0"))
  39. val result = client.callTool("adder", Json.obj("a" -> Json.fromInt(2), "b" -> Json.fromInt(3)))
  40. val _ = result.content.collect { case ToolContent.Text(_, text) => println(text) }
  41. client.close()
  42. backend.close()
  43. ```
  44. #### stdio
  45. Run a basic MCP server using stdio transport:
  46. ```scala
  47. //> using dep com.softwaremill.chimp::chimp-server:0.6.0
  48. import chimp.server.*
  49. import chimp.server.transport.ServerStdioTransport
  50. import io.circe.Codec
  51. import sttp.tapir.*
  52. case class EchoInput(message: String) derives Codec, Schema
  53. @main def stdioServer(): Unit =
  54. val echo = tool("echo").description("Echoes the message").input[EchoInput]
  55. .handle(i => ToolResult.text(i.message))
  56. ServerStdioTransport().serve(McpServer(tools = List(echo)))
  57. ```
  58. Start the server as a subprocess and invoke the tool as an MCP client:
  59. ```scala
  60. //> using dep com.softwaremill.chimp::chimp-client:0.6.0
  61. import chimp.client.*
  62. import chimp.client.transport.ClientStdioTransport
  63. import chimp.protocol.*
  64. import io.circe.Json
  65. @main def stdioClient(): Unit =
  66. val transport = ClientStdioTransport(List("scala-cli", "run", "stdioServer.scala"))
  67. val client = McpClient(transport, Implementation("my-client", "0.1.0"))
  68. val result = client.callTool("echo", Json.obj("message" -> Json.fromString("hello")))
  69. val _ = result.content.collect { case ToolContent.Text(_, text) => println(text) }
  70. client.close()
  71. ```
  72. #### Bidirectional streaming
  73. With the integration modules (like `chimp-server-ox` and `chimp-client-ox` for ox) bidirectional communication becomes possible.
  74. For example, run a basic streaming MCP server using Netty and ox:
  75. ```scala
  76. //> using dep com.softwaremill.chimp::chimp-server-ox:0.6.0
  77. import chimp.protocol.LoggingLevel
  78. import chimp.server.*
  79. import chimp.server.ox.OxServerHttpTransport
  80. import io.circe.{Codec, Json}
  81. import sttp.shared.Identity
  82. import sttp.tapir.*
  83. import sttp.tapir.server.netty.sync.NettySyncServer
  84. case class WorkInput(steps: Int) derives Codec, Schema
  85. @main def streamingServer(): Unit =
  86. val work = tool("work")
  87. .description("Reports progress and logs while running")
  88. .input[WorkInput]
  89. .streamingServerLogic[Identity]: (in, ctx, _) =>
  90. for step <- 1 to in.steps do
  91. ctx.reportProgress(step.toDouble / in.steps, total = Some(1.0))
  92. ctx.log(LoggingLevel.Info, Json.fromString(s"step $step of ${in.steps}"))
  93. ToolResult.text("done")
  94. val server = StreamingMcpServer[Identity]().withLoggingLevel(_ => ()).addStreamingTool(work)
  95. NettySyncServer().port(8080).addEndpoint(OxServerHttpTransport(List("mcp")).serve(server)).startAndWait()
  96. ```
  97. Connect and invoke the tool as an MCP client, receiving server's notifications while the tool call is in flight:
  98. ```scala
  99. //> using dep com.softwaremill.chimp::chimp-client-ox:0.6.0
  100. import chimp.client.McpClient
  101. import chimp.client.notifications.ServerNotification
  102. import chimp.client.transport.ox.OxClientHttpTransport
  103. import chimp.protocol.{Implementation, ToolContent}
  104. import io.circe.Json
  105. import ox.supervised
  106. import sttp.client4.DefaultSyncBackend
  107. import sttp.model.Uri.UriContext
  108. import sttp.shared.Identity
  109. @main def streamingClient(): Unit =
  110. supervised:
  111. val backend = DefaultSyncBackend()
  112. val transport = OxClientHttpTransport(backend, uri"http://localhost:8080/mcp")
  113. val client = McpClient.bidirectional[Identity](transport, Implementation("my-client", "0.1.0"))
  114. client.onServerNotification:
  115. case ServerNotification.Progress(params) => println(s"progress: ${params.progress}")
  116. case ServerNotification.LoggingMessage(params) => println(s"log: ${params.data}")
  117. case _ => ()
  118. val result = client.callTool("work", Json.obj("steps" -> Json.fromInt(3)))
  119. val _ = result.content.collect { case ToolContent.Text(_, text) => println(text) }
  120. client.close()
  121. backend.close()
  122. ```
  123. ## Documentation
  124. Full documentation is available at **[chimp.softwaremill.com](https://chimp.softwaremill.com/)**.
  125. ## Contributing
  126. Contributions are welcome! Please open issues or pull requests.
  127. ## Commercial Support
  128. We offer commercial support for Chimp and related technologies, as well as development
  129. services. [Contact us](https://softwaremill.com) to learn more about our offer!
  130. ## Copyright
  131. Copyright (C) 2025-2026 SoftwareMill [https://softwaremill.com](https://softwaremill.com).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.