MM

metosin/mcp-toolkit

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

40 stars 6 forks 质量 58 趋势 12EPL-2.0

一个用于在Clojure(脚本)中构建MCP客户端和MCP服务器的库

概览

这个库是一个非常非官方的 Clojure MCP SDK。 它负责MCP客户端与服务器之间的通信,并试图为开发MCP生态系统的开发者提供类似Clojure的体验。 在 Claude Desktop 和 Claude Code 上测试,所实现的功能未发现问题。 - [x] 客户端和服务器的API - [x] CLJC - [x] Clojure - [x] Clojurescript - [ ] Babashka - I/O 无关库 - 使用 Promesa 支持提示符、资源和工具中的异步任务 - 兼容协议版本 - [x] 2024-11-05 - [x] 2025-03-26 - [ ] 2025-06-18(尚未实现) - MCP 功能已实现 - [x] 取消 - [x] Ping - [x] 进展 - [x] 根 - [x] 采样 - [x] 提示词 - [x] 资源 - [x] 工具 - [x] 完成 - [x] 日志 - [ ] 分页 - 示例项目 - [x]使用 STDIO 的 CLJC 服务器 - [x] 使用 STDIO 的 CLJC 客户端 - [x] 使用 HTTP/SSE 的 CLJ 服务器 - [ ] 使用可流式 HTTP 的 CLJ 服务器(欢迎 PR 服务) 请参见README。

概述(AI 翻译)

这个库是一个非常非官方的 Clojure MCP SDK。

它负责MCP客户端与MCP服务器之间的通信,并尝试提供 这对致力于扩展MCP生态系统的开发者来说,是一种类似Clojure的体验。

状态:alpha 质量

在 Claude Desktop 和 Claude Code 上测试,所实现的功能未发现问题。

已实现的功能

  • [x] 客户端和服务器的 API
  • [x] CLJC
  • [x] Clojure
  • [x] Clojurescript
  • [ ] 巴巴什卡
  • 输入输出无关库
  • 使用 Promesa 支持提示词、资源和工具中的异步任务
  • 兼容协议版本
  • [x] 2024-11-05
  • [x] 2025-03-26
  • [ ] 2025-06-18(尚未)
  • 实现的MCP功能
  • [x] 取消
  • [x] 叮
  • [x] 进展
  • [x] 根源
  • [x] 采样
  • [x] 提示
  • [x] 资源
  • [x] 工具
  • [x] 完备
  • [x] 伐木
  • [ ] 分页
  • 示例项目
  • [x] 使用 STDIO 的 CLJC 服务器
  • [x] 使用 STDIO 的 CLJC 客户端
  • [x] CLJ服务器使用 HTTP/SSE
  • [ ] CLJ服务器使用可流式HTTP(欢迎PR)

用途

请参见example/cljc-server-stdio/项目中的README.md,了解内容:

  • 如何使用该库在Clojure中创建自己的MCP服务器,以及

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP Toolkit

This library is a very unofficial MCP SDK in Clojure.

It handles the communication between MCP clients and MCP servers, and attempts to provide a Clojure-ish experience to developers working on expending the MCP ecosystem.

Status: alpha quality

Tested on Claude Desktop and Claude Code, no problems found for the features implemented.

Implemented features

  • [x] API for both clients & servers
  • [x] CLJC
    • [x] Clojure
    • [x] Clojurescript
    • [ ] Babashka
  • I/O agnostic library
  • Uses Promesa to support async tasks in prompts, resources and tools
  • Compatible with protocol versions
    • [x] 2024-11-05
    • [x] 2025-03-26
    • [ ] 2025-06-18 (not yet)
  • MCP features implemented
    • [x] Cancellation
    • [x] Ping
    • [x] Progress
    • [x] Roots
    • [x] Sampling
    • [x] Prompts
    • [x] Resources
    • [x] Tools
    • [x] Completion
    • [x] Logging
    • [ ] Pagination
  • Example projects

Usage

See the README.md in the example/cljc-server-stdio/ project to learn:

  • how to use this library to make your own MCP server in Clojure, and
  • how to develop its components (prompts, resources and tools) via the REPL while the server is running.

Additionally, see the documentation on CLJDocs or in the doc/ directory.

Testing

npm install
./bin/kaocha --watch

Its place in the AI ecosystem

MCP toolkit aims to be more convenient for the Clojure community than the official MCP SDKs for Java or Typescript.

It provides utilities to build an MCP server in Clojure(script), but doesn’t provide any prompts, resources or tools to help working on a Clojure codebase. It is typically used for building general purpose MCP stuffs.

Other MCP libs

Contributing

Only code typed and reviewed by a human will be accepted for review, discussion, and maybe merged. We have a policy of keeping the source code clean, organized, and easy to read for a human.

Advices for improving the chances for your PR to be accepted:

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →