Human in the Loop

v1.0.0Communicationstable

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

human-in-the-loopmcpai-integration
Share:
224
Stars
0
Downloads
0
Weekly
0/5

What is Human in the Loop?

Human in the Loop is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp (model context protocol) server that allows ai assistants to ask questions to humans via discord.

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

This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • An MCP (Model Context Protocol) server that allows AI assist

Use Cases

Allow AI assistants to ask humans questions via Discord.
Enable collaborative decision-making workflows.
Incorporate human feedback into agent operations.
KOBA789

Maintainer

LicenseMIT
Languagerust
Versionv1.0.0
UpdatedMay 6, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y human-in-the-loop

Manual Installation

npx -y human-in-the-loop

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Human in the Loop

Human in the Loop is an MCP server written in Rust that bridges AI assistants and human collaborators through Discord. When an AI agent needs clarification, approval, or input it cannot infer on its own, it invokes the `ask_human` tool, which posts the question in a specified Discord channel, mentions the target user, and waits for a reply before continuing. This makes it ideal for agentic workflows where certain decisions — approving code changes, confirming sensitive actions, or answering ambiguous requirements — should remain with a human.

Prerequisites

  • Rust toolchain (cargo) installed for building from source, or a pre-built binary
  • A Discord account and a Discord bot with the Message Content intent enabled
  • The bot must be invited to your server with permission to read and send messages in the target channel
  • Your Discord bot token, the target channel ID, and your Discord user ID
  • An MCP-compatible client such as Claude Desktop
1

Create a Discord bot

In the Discord Developer Portal (discord.com/developers/applications), create a new application and bot. Enable the Message Content privileged intent under Bot settings. Copy the bot token.

2

Invite the bot to your server

Generate an OAuth2 invite URL with the `bot` scope and permissions for Send Messages and Read Message History. Open the URL and add the bot to your Discord server.

3

Install the MCP server binary

Build and install the human-in-the-loop binary from source using Cargo.

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

Get your channel and user IDs

In Discord, enable Developer Mode (Settings > Advanced), then right-click the target channel to copy its ID and right-click your user to copy your user ID.

5

Configure your MCP client

Add the server to your claude_desktop_config.json with the Discord token, channel ID, and user ID.

{
  "mcpServers": {
    "human-in-the-loop": {
      "command": "human-in-the-loop",
      "args": [
        "--discord-channel-id", "YOUR_CHANNEL_ID",
        "--discord-user-id", "YOUR_USER_ID"
      ],
      "env": {
        "DISCORD_TOKEN": "YOUR_BOT_TOKEN"
      }
    }
  }
}
6

Test the integration

Restart Claude Desktop and ask it to perform a task that requires human input. The AI will use ask_human to post a question in your Discord channel and wait for your reply.

Human in the Loop Examples

Client configuration

Full claude_desktop_config.json snippet for the human-in-the-loop MCP server.

{
  "mcpServers": {
    "human-in-the-loop": {
      "command": "human-in-the-loop",
      "args": [
        "--discord-channel-id", "1234567890123456789",
        "--discord-user-id", "9876543210987654321"
      ],
      "env": {
        "DISCORD_TOKEN": "MTA0..."
      }
    }
  }
}

Prompts to try

Example prompts that trigger the ask_human tool and demonstrate the human-in-the-loop flow.

- "Refactor the authentication module. Ask me before deleting any existing functions."
- "Write and deploy the blog post draft, but check with me before publishing."
- "You can ask me any questions you need to complete this task accurately."

Troubleshooting Human in the Loop

The bot posts the message but never receives a reply

Ensure the Message Content privileged intent is enabled in the Discord Developer Portal. Without it, the bot cannot read message content in replies.

cargo install fails with a compilation error

Update your Rust toolchain with `rustup update stable`. The project requires Rust 1.70 or later. Run `rustc --version` to verify.

The MCP server starts but the bot does not appear online in Discord

Double-check that DISCORD_TOKEN in your config is the bot token (not the OAuth client secret). Regenerate the token in the Developer Portal if needed.

Frequently Asked Questions about Human in the Loop

What is Human in the Loop?

Human in the Loop is a Model Context Protocol (MCP) server that mcp (model context protocol) server that allows ai assistants to ask questions to humans via discord. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Human in the Loop?

Install via npm with the command: npx -y human-in-the-loop. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Human in the Loop?

Human in the Loop works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Human in the Loop free to use?

Yes, Human in the Loop is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Communication MCP Servers

Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "human-in-the-loop": { "command": "npx", "args": ["-y", "human-in-the-loop"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Human in the Loop?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides