Human in the Loop
An MCP (Model Context Protocol) server that allows AI assistants to ask questions to humans via Discord.
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
Maintainer
Works with
Installation
NPM
npx -y human-in-the-loopManual Installation
npx -y human-in-the-loopConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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.
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.
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.gitGet 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.
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"
}
}
}
}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.
Human in the Loop Alternatives — Similar Communication Servers
Looking for alternatives to Human in the Loop? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
★ 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
★ 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
★ 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
★ 5.8k🐬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
★ 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
★ 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
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.
Set Up Human in the Loop in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.