Logo Chimp

Chimp

Tổ chức
softwaremill

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

Nhà phát hànhsoftwaremill
Kho mãchimp
Ngôn ngữScala
Bản fork
10
Sao
102
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Chimp cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    102 sao và 10 bản fork từ kho mã được liên kết.

Chimp MCP

CI Scala 3

An SDK for building MCP (Model Context Protocol) servers and clients in Scala 3 using boilerplate-less, type-safe APIs based on Tapir and sttp, supporting the variety of the Scala ecosystem.

Transport

Chimp implements both streamable HTTP and stdio transports. Additional integration modules unlock streaming features of the MCP protocol with bidirectional communication between server and client. Currently supporting Ox, ZIO and Pekko.

Quickstart

HTTP

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

scala
//> 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:

scala
//> 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:

scala
//> 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:

scala
//> 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:

scala
//> 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:

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

import chimp.client.McpClient
import chimp.client.notifications.ServerNotification
import chimp.client.transport.ox.OxClientHttpTransport
import chimp.protocol.{Implementation, ToolContent}
import io.circe.Json
import ox.supervised
import sttp.client4.DefaultSyncBackend
import sttp.model.Uri.UriContext
import sttp.shared.Identity

@main def streamingClient(): Unit =
  supervised:
    val backend = DefaultSyncBackend()
    val transport = OxClientHttpTransport(backend, uri"http://localhost:8080/mcp")
    val client = McpClient.bidirectional[Identity](transport, Implementation("my-client", "0.1.0"))

    client.onServerNotification:
      case ServerNotification.Progress(params)       => println(s"progress: ${params.progress}")
      case ServerNotification.LoggingMessage(params) => println(s"log: ${params.data}")
      case _                                         => ()

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

    client.close()
    backend.close()

Documentation

Full documentation is available at chimp.softwaremill.com.

Contributing

Contributions are welcome! Please open issues or pull requests.

Commercial Support

We offer commercial support for Chimp and related technologies, as well as development services. Contact us to learn more about our offer!

Copyright

Copyright (C) 2025-2026 SoftwareMill https://softwaremill.com.

Dùng MCP Chimp với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Chimp, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Chimp làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Chimp.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "chimp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Chimp, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Chimp.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Chimp giúp tôi làm việc này không?
Chimp
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Chimp.

Câu hỏi thường gặp

Máy chủ MCP Chimp dùng để làm gì?

Chimp là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Chimp với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Chimp với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Chimp với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Chimp, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Chimp với TypingMind?

Chimp hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Chimp cung cấp những công cụ nào trong TypingMind?

Chimp cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Chimp không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Chimp yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇