Skip to content
Back to search

human-in-the-loop

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

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/koba789--human-in-the-loop/badge.svg)](/listings/koba789--human-in-the-loop)

HTML

<a href="/listings/koba789--human-in-the-loop"><img src="/api/listings/koba789--human-in-the-loop/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Create Discord Bot

1. Go to [Discord Developer Portal](https://discord.com/developers/applications) 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

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 122 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Human-in-the-Loop MCP Server
  2. An MCP (Model Context Protocol) server that allows AI assistants to ask questions to humans via Discord.
  3. <img width="845" alt="Screenshot 2025-06-23 at 18 25 43" src="https://github.com/user-attachments/assets/dcdbb1a7-cb71-446e-b44d-bfe637059acb" />
  4. ## Overview
  5. This MCP server is used when AI assistants need human input or judgment during their work. For example:
  6. - When having an LLM create documentation, the AI designs the structure while humans provide specific content
  7. - When the AI needs confirmation on uncertain decisions
  8. - When specialized knowledge or personal information is required
  9. ## Requirements
  10. - Rust (1.70 or higher)
  11. - Discord account and bot
  12. - MCP-compatible AI client (Claude Desktop, Copilot Edits, etc.)
  13. ## Setup
  14. ### 1. Create Discord Bot
  15. 1. Go to [Discord Developer Portal](https://discord.com/developers/applications)
  16. 2. Create a new application
  17. 3. Create a bot in the Bot section and obtain the token
  18. 4. Set required permissions:
  19. - Send Messages
  20. - Create Public Threads
  21. - Read Message History
  22. 5. Enable privileged gateway intents in Bot section:
  23. - Message Content Intent
  24. ### 2. Install
  25. ```bash
  26. cargo install --git https://github.com/KOBA789/human-in-the-loop.git
  27. ```
  28. ## Connecting with MCP Clients
  29. ### Claude Desktop Configuration
  30. Add the following to `claude_desktop_config.json`:
  31. ```json
  32. {
  33. "mcpServers": {
  34. "human-in-the-loop": {
  35. "command": "human-in-the-loop",
  36. "args": [
  37. "--discord-channel-id", "channel-id",
  38. "--discord-user-id", "user-id"
  39. ],
  40. "env": {
  41. "DISCORD_TOKEN": "your-discord-bot-token"
  42. }
  43. }
  44. }
  45. }
  46. ```
  47. ### Claude Code Configuration
  48. For Claude Code (claude.ai/code), add to your MCP settings:
  49. ```json
  50. {
  51. "mcpServers": {
  52. "human-in-the-loop": {
  53. "command": "human-in-the-loop",
  54. "args": [
  55. "--discord-channel-id", "channel-id",
  56. "--discord-user-id", "user-id"
  57. ]
  58. }
  59. }
  60. }
  61. ```
  62. Set the Discord token as an environment variable before running Claude Code:
  63. ```bash
  64. export DISCORD_TOKEN="your-discord-bot-token"
  65. claude
  66. ```
  67. 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.
  68. ### Usage
  69. AI assistants can ask questions to humans using the `ask_human` tool:
  70. ```
  71. Human: Please create a documentation outline. You can ask the human as you need.
  72. Assistant: I'll create a documentation outline. Let me ask you some questions first.
  73. [Uses ask_human tool]
  74. ```
  75. The AI posts questions in Discord and mentions the specified user. When the user replies in Discord, the response is returned to the AI.
  76. ## How It Works
  77. 1. AI assistant calls the `ask_human` tool
  78. 2. MCP server creates a thread in the specified Discord channel (or uses existing thread)
  79. 3. Posts the question and mentions the specified user
  80. 4. Waits for user's reply
  81. 5. Returns the reply content to the AI assistant
  82. ## Finding Discord IDs
  83. ### Getting Channel ID
  84. 1. Enable Developer Mode in Discord (Settings → Advanced → Developer Mode)
  85. 2. Right-click on channel → "Copy ID"
  86. ### Getting User ID
  87. 1. Right-click on user → "Copy ID"
  88. ## Roadmap
  89. - **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.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.