human-in-the-loop-mcp
v0.1.0
Published
Micro-manage your agentic LLM promptly with your favorite messaging App, and more.
Readme

Human-In-The-Loop MCP
What is this?
A Model Context Protocol (MCP) server that enables human oversight for AI assistants through Discord or HTTP. When your AI needs clarification or approval, it can reach out to you directly.
Usage
Discord Transport
Connect your AI to Discord for real-time human feedback:
bunx human-in-the-loop-mcp discord \
--token YOUR_DISCORD_BOT_TOKEN \
--user-id YOUR_DISCORD_USER_IDRun bunx human-in-the-loop-mcp discord --help to see all available options.
HTTP Transport
Integrate with your own HTTP endpoint:
bunx human-in-the-loop-mcp http \
--url https://your-endpoint.com/questionsRun bunx human-in-the-loop-mcp http --help to see all available options.
Telegram Transport
Connect your AI to Telegram for real-time human feedback:
bunx human-in-the-loop-mcp telegram \
--token YOUR_TELEGRAM_BOT_TOKEN \
--user-id YOUR_TELEGRAM_USER_IDRun bunx human-in-the-loop-mcp telegram --help to see all available options.
Slack Transport
Under development
stdio Transport
Under development
🛠️ Installation
Requirements
- Node.js >= v20.0.0 or Bun >= 1.2.20
- Discord Bot Token or HTTP endpoint
- An MCP Client (Claude Desktop, Cursor, VSCode, etc.)
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server
Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}Run this command. See Claude Code MCP docs for more info.
claude mcp add human-in-the-loop -- bunx -y human-in-the-loop-mcp discord --token YOUR_DISCORD_BOT_TOKEN --user-id YOUR_DISCORD_USER_IDAdd this to your Windsurf MCP config file. See Windsurf MCP docs for more info.
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}Add this to your VS Code MCP config file. See VS Code MCP docs for more info.
"mcp": {
"servers": {
"human-in-the-loop": {
"type": "stdio",
"command": "bunx",
"args": ["-y", "human-in-the-loop-mcp", "discord", "--token", "YOUR_DISCORD_BOT_TOKEN", "--user-id", "YOUR_DISCORD_USER_ID"]
}
}
}You can easily install Human-In-The-Loop through the Cline MCP Server Marketplace by following these instructions:
- Open Cline.
- Click the hamburger menu icon (☰) to enter the MCP Servers section.
- Use the search bar within the Marketplace tab to find Human-In-The-Loop.
- Click the Install button.
Or you can directly edit MCP servers configuration:
- Open Cline.
- Click the hamburger menu icon (☰) to enter the MCP Servers section.
- Choose Local Servers tab.
- Click the Edit Configuration button.
- Add human-in-the-loop to
mcpServers:
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}Add this to your Zed settings.json. See Zed Context Server docs for more info.
{
"context_servers": {
"human-in-the-loop": {
"command": {
"path": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
},
"settings": {}
}
}
}To configure Human-In-The-Loop MCP in Augment Code, you can use either the graphical interface or manual configuration.
A. Using the Augment Code UI
Click the hamburger menu.
Select Settings.
Navigate to the Tools section.
Click the + Add MCP button.
Enter the following command:
bunx -y human-in-the-loop-mcp discord --token YOUR_DISCORD_BOT_TOKEN --user-id YOUR_DISCORD_USER_IDName the MCP: Human-In-The-Loop.
Click the Add button.
Once the MCP server is added, you can start using Human-In-The-Loop's features directly within Augment Code.
B. Manual Configuration
- Press Cmd/Ctrl Shift P or go to the hamburger menu in the Augment panel
- Select Edit Settings
- Under Advanced, click Edit in settings.json
- Add the server configuration to the
mcpServersarray in theaugment.advancedobject
"augment.advanced": {
"mcpServers": [
{
"name": "human-in-the-loop",
"command": "bunx",
"args": ["-y", "human-in-the-loop-mcp", "discord", "--token", "YOUR_DISCORD_BOT_TOKEN", "--user-id", "YOUR_DISCORD_USER_ID"]
}
]
}Once the MCP server is added, restart your editor. If you receive any errors, check the syntax to make sure closing brackets or commas are not missing.
Add this to your Roo Code MCP configuration file. See Roo Code MCP docs for more info.
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}See Gemini CLI Configuration for details.
- Open the Gemini CLI settings file. The location is
~/.gemini/settings.json(where~is your home directory). - Add the following to the
mcpServersobject in yoursettings.jsonfile:
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}If the mcpServers object does not exist, create it.
Open Claude Desktop developer settings and edit your claude_desktop_config.json file to add the following configuration. See Claude Desktop MCP docs for more info.
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}Add this to your Opencode configuration file. See Opencode MCP docs for more info.
{
"mcp": {
"human-in-the-loop": {
"type": "local",
"command": [
"bunx",
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
],
"enabled": true
}
}
}See OpenAI Codex for more information.
Add the following configuration to your OpenAI Codex MCP server settings:
[mcp_servers.human-in-the-loop]
args = ["-y", "human-in-the-loop-mcp", "discord", "--token", "YOUR_DISCORD_BOT_TOKEN", "--user-id", "YOUR_DISCORD_USER_ID"]
command = "bunx"See JetBrains AI Assistant Documentation for more details.
- In JetBrains IDEs, go to
Settings->Tools->AI Assistant->Model Context Protocol (MCP) - Click
+ Add. - Click on
Commandin the top-left corner of the dialog and select the As JSON option from the list - Add this configuration and click
OK
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}- Click
Applyto save changes. - The same way human-in-the-loop could be added for JetBrains Junie in
Settings->Tools->Junie->MCP Settings
See Kiro Model Context Protocol Documentation for details.
- Navigate
Kiro>MCP Servers - Add a new MCP server by clicking the
+ Addbutton. - Paste the configuration given below:
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}- Click
Saveto apply the changes.
Use the Add manually feature and fill in the JSON configuration information for that MCP server. For more details, visit the Trae documentation.
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}Use these alternatives to run the local Human-In-The-Loop MCP server with other runtimes. These examples work for any client that supports launching a local MCP server via command + args.
Bun
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}Deno
{
"mcpServers": {
"human-in-the-loop": {
"command": "deno",
"args": [
"run",
"--allow-env=NO_DEPRECATION,TRACE_DEPRECATION",
"--allow-net",
"npm:human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}Install the human-in-the-loop.dxt file from the dxt folder and add it to your client. For more information, please check out the desktop extensions docs.
The configuration on Windows is slightly different compared to Linux or macOS (Cline is used in the example). The same principle applies to other editors; refer to the configuration of command and args.
{
"mcpServers": {
"human-in-the-loop": {
"command": "cmd",
"args": [
"/c",
"bunx",
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
],
"disabled": false,
"autoApprove": []
}
}
}Add this to your Amazon Q Developer CLI configuration file. See Amazon Q Developer CLI docs for more details.
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}See Warp Model Context Protocol Documentation for details.
- Navigate
Settings>AI>Manage MCP servers. - Add a new MCP server by clicking the
+ Addbutton. - Paste the configuration given below:
{
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
],
"env": {},
"working_directory": null,
"start_on_launch": true
}
}- Click
Saveto apply the changes.
Using Human-In-The-Loop with Copilot Coding Agent
Add the following configuration to the mcp section of your Copilot Coding Agent configuration file Repository->Settings->Copilot->Coding agent->MCP configuration:
{
"mcpServers": {
"human-in-the-loop": {
"type": "stdio",
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
],
"tools": ["AskQuestion"]
}
}
}For more information, see the official GitHub documentation.
See LM Studio MCP Support for more information.
Manual set-up:
- Navigate to
Program(right side) >Install>Edit mcp.json. - Paste the configuration given below:
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}- Click
Saveto apply the changes. - Toggle the MCP server on/off from the right hand side, under
Program, or by clicking the plug icon at the bottom of the chat box.
You can configure Human-In-The-Loop MCP in Visual Studio 2022 by following the Visual Studio MCP Servers documentation.
Add this to your Visual Studio MCP config file (see the Visual Studio docs for details):
{
"mcp": {
"servers": {
"human-in-the-loop": {
"type": "stdio",
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}
}For more information and troubleshooting, refer to the Visual Studio MCP Servers documentation.
Add this to your Crush configuration file. See Crush MCP docs for more info.
{
"$schema": "https://charm.land/crush.json",
"mcp": {
"human-in-the-loop": {
"type": "stdio",
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}Open the "Settings" page of the app, navigate to "Plugins," and enter the following JSON:
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}Once saved, enter in the chat AskQuestion followed by your question. More information is available on BoltAI's Documentation site. For BoltAI on iOS, see this guide.
Edit your Rovo Dev CLI MCP config by running the command below -
acli rovodev mcpExample config -
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}To configure Human-In-The-Loop MCP in Zencoder, follow these steps:
- Go to the Zencoder menu (...)
- From the dropdown menu, select Agent tools
- Click on the Add custom MCP
- Add the name and server configuration from below, and make sure to hit the Install button
{
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}Once the MCP server is added, you can easily continue using it.
See Qodo Gen docs for more details.
- Open Qodo Gen chat panel in VSCode or IntelliJ.
- Click Connect more tools.
- Click + Add new MCP.
- Add the following configuration:
{
"mcpServers": {
"human-in-the-loop": {
"command": "bunx",
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
]
}
}
}See Local and Remote MCPs for Perplexity for more information.
- Navigate
Perplexity>Settings - Select
Connectors. - Click
Add Connector. - Select
Advanced. - Enter Server Name:
Human-In-The-Loop - Paste the following JSON in the text area:
{
"args": [
"-y",
"human-in-the-loop-mcp",
"discord",
"--token",
"YOUR_DISCORD_BOT_TOKEN",
"--user-id",
"YOUR_DISCORD_USER_ID"
],
"command": "bunx",
"env": {}
}- Click
Save.
git clone https://github.com/AndyRightNow/human-in-the-loop-mcp.git
cd human-in-the-loop-mcp
bun install
bun run build
bun start discord --token YOUR_DISCORD_BOT_TOKEN --user-id YOUR_DISCORD_USER_IDHow It Works
- Your AI encounters a decision point requiring human input
- It uses the
AskQuestiontool to request guidance - You receive a notification through your chosen transport (Discord DM or HTTP webhook)
- You provide your response
- The AI continues with your feedback
- The process repeats as needed
API
HTTP Endpoint Requirements
Your endpoint must accept POST requests with this payload:
{
questions: string; // Questions from the AI
}Expected response:
{
answers: string; // Your response
}Status codes:
- 200: Success
- 4xx: Client error
- 5xx: Server error
Examples
Discord Setup
- Create a Discord bot and get its token
- Get your Discord user ID
- Run the command with your credentials
- The bot will DM you when the AI needs input
HTTP Webhook
Simple Express.js endpoint example:
app.post('/questions', (req, res) => {
console.log('Questions received:', req.body.questions);
// Implement your response logic
res.json({ answers: 'Your response here' });
});Troubleshooting
Q: The bot isn't sending me messages
A: Ensure you have DMs enabled from server members in your Discord privacy settings.
Q: Timeout errors
A: Increase the timeout value with the --timeout flag (in milliseconds).
Q: HTTP endpoint not working
A: Verify your endpoint URL, check any required headers, and ensure the endpoint is accessible.
Contributing
Bug reports and feature requests are welcome. Please open an issue on GitHub.
License
MIT
