- Explore MCP Servers
- human-in-the-loop
Human In The Loop
What is Human In The Loop
The Human-in-the-Loop MCP Server is a protocol server that facilitates interaction between AI assistants and human users via Discord. It allows AI systems to seek human input or verification during tasks requiring specialized knowledge or judgment, enhancing the capabilities of AI in collaborative scenarios.
Use cases
Common use cases include drafting documentation where the AI structures the content but needs human input for specifics, confirming uncertain AI-generated decisions, and utilizing specialized knowledge that the AI lacks. It effectively bridges the gap between AI capabilities and human expertise.
How to use
To use the server, create a Discord bot and configure it with necessary permissions. Install the MCP server via Rust Cargo, and connect it with compatible AI clients like Claude through specific settings in their configuration files. AI assistants can invoke the ask_human
tool to pose questions to humans directly in Discord.
Key features
Key features include integration with Discord for real-time communication, thread management for organized discussions, and the ability to extract user responses directly from Discord. The system supports environment variable configuration for seamless integration with AI clients.
Where to use
This MCP server is optimal in environments where AI systems operate alongside human oversight, such as collaborative documentation creation, decision-making processes requiring human input, and situations necessitating expert knowledge. It is particularly valuable in professional and organizational settings using AI tools.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Human In The Loop
The Human-in-the-Loop MCP Server is a protocol server that facilitates interaction between AI assistants and human users via Discord. It allows AI systems to seek human input or verification during tasks requiring specialized knowledge or judgment, enhancing the capabilities of AI in collaborative scenarios.
Use cases
Common use cases include drafting documentation where the AI structures the content but needs human input for specifics, confirming uncertain AI-generated decisions, and utilizing specialized knowledge that the AI lacks. It effectively bridges the gap between AI capabilities and human expertise.
How to use
To use the server, create a Discord bot and configure it with necessary permissions. Install the MCP server via Rust Cargo, and connect it with compatible AI clients like Claude through specific settings in their configuration files. AI assistants can invoke the ask_human
tool to pose questions to humans directly in Discord.
Key features
Key features include integration with Discord for real-time communication, thread management for organized discussions, and the ability to extract user responses directly from Discord. The system supports environment variable configuration for seamless integration with AI clients.
Where to use
This MCP server is optimal in environments where AI systems operate alongside human oversight, such as collaborative documentation creation, decision-making processes requiring human input, and situations necessitating expert knowledge. It is particularly valuable in professional and organizational settings using AI tools.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
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
- Go to Discord Developer Portal
- Create a new application
- Create a bot in the Bot section and obtain the token
- Set required permissions:
- Send Messages
- Create Public Threads
- Read Message History
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:
{
"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
- AI assistant calls the
ask_human
tool - MCP server creates a thread in the specified Discord channel (or uses existing thread)
- Posts the question and mentions the specified user
- Waits for user’s reply
- Returns the reply content to the AI assistant
Finding Discord IDs
Getting Channel ID
- Enable Developer Mode in Discord (Settings → Advanced → Developer Mode)
- Right-click on channel → “Copy ID”
Getting User ID
- Right-click on user → “Copy ID”
Roadmap
- Future Migration to MCP Elicitation: Once MCP’s Elicitation implementation becomes more widespread and standardized, we plan to migrate the UI from Discord to native MCP Elicitation. This will provide a more integrated experience directly within MCP-compatible clients.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.