KH

koba789/human-in-the-loop

Developer tools

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

234 stars 20 forks 品質 61 トレンド 0MIT

koba789/human-in-the-loopは、https://github.com/koba789/human-in-the-loop.からインポートされたMCPサーバー候補です。

概要

koba789/human-in-the-loopは、https://github.com/koba789/human-in-the-loop.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

Discordを通じてAIアシスタントが人間に質問できるMCP(Model Context Protocol)サーバーです。

概要

このMCPサーバーは、AIアシスタントが作業中に人間の入力や判断を必要とする場合に使用されます。例えば:

  • LLMがドキュメントを作成する場合、AIが構造を設計し、人間が特定のコンテンツを提供します
  • AIが不確かな決定の確認を必要とする場合
  • 専門知識や個人情報が必要な場合

要件

  • 錆(1.70以上)
  • Discordアカウントとボット
  • MCP互換AIクライアント(Claude Desktop、Copilot Editsなど)

セットアップ

1.Discordボットを作成する

  1. Discord開発者ポータルへアクセス
  2. 新しいアプリケーションを作成する
  3. ボットセクションでボットを作成し、トークンを取得する
  4. 必要な権限を設定する:
  • メッセージ送信
  • 公開スレッドの作成
  • メッセージ履歴を読む
  1. ボットセクションで特権ゲートウェイの意図を有効にする:
  • メッセージ内容意図

2.設置

MCPクライアントとの接続

Claude Desktop Configuration

[T0]]に以下を加えます:

クロードコード設定

Claude Code(claude.ai/code)については、MCPの設定に追加してください:

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

README

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

Human-in-the-Loop MCP Server

An MCP (Model Context Protocol) server that allows AI assistants to ask questions to humans via Discord.

Overview

This MCP server is used when AI assistants need human input or judgment during their work. For example:

  • When having an LLM create documentation, the AI designs the structure while humans provide specific content
  • When the AI needs confirmation on uncertain decisions
  • When specialized knowledge or personal information is required

Requirements

  • Rust (1.70 or higher)
  • Discord account and bot
  • MCP-compatible AI client (Claude Desktop, Copilot Edits, etc.)

Setup

1. Create Discord Bot

  1. Go to Discord Developer Portal
  2. Create a new application
  3. Create a bot in the Bot section and obtain the token
  4. Set required permissions:
    • Send Messages
    • Create Public Threads
    • Read Message History
  5. Enable privileged gateway intents in Bot section:
    • Message Content Intent

2. Install

cargo install --git https://github.com/KOBA789/human-in-the-loop.git

Connecting with MCP Clients

Claude Desktop Configuration

Add the following to claude_desktop_config.json:

{
  "mcpServers": {
    "human-in-the-loop": {
      "command": "human-in-the-loop",
      "args": [
        "--discord-channel-id", "channel-id",
        "--discord-user-id", "user-id"
      ],
      "env": {
        "DISCORD_TOKEN": "your-discord-bot-token"
      }
    }
  }
}

Claude Code Configuration

For Claude Code (claude.ai/code), add to your MCP settings:

{
  "mcpServers": {
    "human-in-the-loop": {
      "command": "human-in-the-loop",
      "args": [
        "--discord-channel-id", "channel-id",
        "--discord-user-id", "user-id"
      ]
    }
  }
}

Set the Discord token as an environment variable before running Claude Code:

export DISCORD_TOKEN="your-discord-bot-token"
claude

Note: The server automatically reads the Discord token from the DISCORD_TOKEN environment variable. You can also pass it via --discord-token argument if needed.

Usage

AI assistants can ask questions to humans using the ask_human tool:

Human: Please create a documentation outline. You can ask the human as you need.
Assistant: I'll create a documentation outline. Let me ask you some questions first.
[Uses ask_human tool]

The AI posts questions in Discord and mentions the specified user. When the user replies in Discord, the response is returned to the AI.

How It Works

  1. AI assistant calls the ask_human tool
  2. MCP server creates a thread in the specified Discord channel (or uses existing thread)
  3. Posts the question and mentions the specified user
  4. Waits for user’s reply
  5. Returns the reply content to the AI assistant
GitHub で README 全文を見る

インストール

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

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

設定

{ "mcpServers": { "human-in-the-loop": { "command": "human-in-the-loop", "args": [ "--discord-channel-id", "channel-id", "--discord-user-id", "user-id" ], "env": { "DISCORD_TOKEN": "your-discord-bot-token" } } } }