HM

hugoduncan/mcp-clj

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

58 stars 10 forks 品質 64 トレンド 0EPL-2.0

hugoduncan/mcp-clj は [https://github.com/hugoduncan/mcp-clj.] からインポートされた MCP サーバーの候補です

概要

hugoduncan/mcp-clj は [https://github.com/hugoduncan/mcp-clj.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

モデルコンテクストプロトコル(MCP)の Clojure の実装は、最小限の依存性と自己完結させた Clojure REPL の統合です。

クイックスタート

Jump to: インストール • クライアント使用 • クロードコード設定 • クロードデスクトップセットアップ • 開発

何と理由

mcp-clj は、MCP サーバー とclient の実装を Clojure で提供しています。

  • 自己完結 REPL: サーバープロセスで直接 Clojure を評価する (nREPL 依存関係なし) -低依存関係:[[[T0]のみ]
  • 複数の輸送:テストのためのSSE (HTTP)、stdioおよび内部記憶
  • ビルトインツール: Clojure 評価(clj-eval)とファイルリスト([ls])をgitignoreサポート -MCPクライアント: Clojure から他の MCP サーバーに接続する

mcp-clj を使用する場合:

  • Claudeデスクトップまたは他のMCPクライアントにClojure REPL機能を公開
  • MCPサービスを消費するClojureアプリケーションの構築
  • 外部REPLの依存関係のないシンプルな展開

トレードオフ対クロージュmcp:

  • ✅ 単純設定、自己完結評価
  • 既存のリモートREPLに接続できません。 ・フェーアー内蔵ツール

インストール

##Gitの依存関係(推奨)

##CLI の使用法

サーバーの使用法

##基本サーバ

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

mcp-clj

A Clojure implementation of the Model Context Protocol (MCP) with minimal dependencies and self-contained Clojure REPL integration.

Quick Start

# Add to deps.edn
{:deps {org.hugoduncan/mcp-clj
        {:git/url   "https://github.com/hugoduncan/mcp-clj"
         :git/sha   "latest-commit-sha"
         :deps/root "projects/server"}}}
;; Start MCP server
(require 'mcp-clj.mcp-server.core)
(def server (mcp-clj.mcp-server.core/create-server {:transport {:type :stdio}}))

;; Server exposes tools like clj-eval and ls
;; Connect with Claude Desktop via stdio transport (see Claude Desktop Setup)

Jump to: Installation • Client Usage • Claude Code Setup • Claude Desktop Setup • Development

What & Why

mcp-clj provides both MCP server and client implementations in Clojure:

  • Self-contained REPL: Evaluates Clojure directly in the server process (no nREPL dependency)
  • Low dependencies: Only requires org.clojure/data.json
  • Multiple transports: SSE (HTTP), stdio, and in-memory for testing
  • Built-in tools: Clojure evaluation (clj-eval) and file listing (ls) with gitignore support
  • MCP client: Connect to other MCP servers from Clojure

When to use mcp-clj:

  • Expose Clojure REPL functionality to Claude Desktop or other MCP clients
  • Build Clojure applications that consume MCP services
  • Simple deployment without external REPL dependencies

Trade-offs vs clojure-mcp:

  • ✅ Simpler setup, self-contained evaluation
  • ❌ Cannot connect to existing remote REPLs
  • ❌ Fewer built-in tools

Installation

;; deps.edn
{:deps {org.hugoduncan/mcp-clj
        {:git/url   "https://github.com/hugoduncan/mcp-clj"
         :git/sha   "latest-commit-sha"  ; Replace with actual latest SHA
         :deps/root "projects/server"}}}

CLI Usage

# Clone and run directly
git clone https://github.com/hugoduncan/mcp-clj
cd mcp-clj

# Start stdio server (recommended for Claude Desktop)
clj -M:stdio-server

# Start SSE server (HTTP) on port 3001 (default)
clj -M:sse-server

# Start SSE server on custom port
clj -M:sse-server --port 8080

Server Usage

Basic Server

(require 'mcp-clj.mcp-server.core)

;; Stdio server (recommended for Claude Desktop)
(def server (mcp-clj.mcp-server.core/create-server
             {:transport {:type :stdio}}))

;; SSE server (for HTTP-based clients)
(def server (mcp-clj.mcp-server.core/create-server
             {:transport {:type :sse :port 3001}}))

;; Stop server
((:stop server))

Custom Tools

(def echo-tool
  {:name "echo"
   :description "Echo the input text"
   :inputSchema {:type "object"
                 :properties {"text" {:type "string"}}
                 :required ["text"]}
   :implementation (fn [{:keys [text]}]
GitHub で README 全文を見る

インストール

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

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "mcp-clj": { "command": "/opt/homebrew/bin/bash", "args": [ "-c", "cd /path/to/your/project && clojure -M:mcp" ], "env": { "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin" } } } }