hitl-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hitl-mcp-serverCreate a HITL escalation for a $50 software license purchase."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
How to setup Claude Desktop to use HITL MCP?
Sign up for AgentMP.ai and get an API Key:
https://agentmp.ai/createapikey
(You will have to sign in using your gmail/linkedIn)
Get Local Setup Docker Image and Run it: (Prereq - Docker desktop installed & running)
docker pull agentmp/hitl-mcp-server:latest
docker run -d
--name hitl-mcp-server
--env AGENTMP_API_KEY=""
--restart unless-stopped
-i
agentmp/hitl-mcp-server
Configure claude_desktop.json
{ "mcpServers": { "hitl": { "command": "docker", "args": ["exec", "-i", "hitl-mcp-server", "node", "app.js"], "env": { "AGENTMP_API_KEY": "your_api_key_here" } } } }
Use Cogito HITL on Claude
eg.
List all my HITL escalations
Create a HITL escalation with these details:
Session ID: "test-session-123"
Agent ID: "claude-test-agent"
User prompt: "User wants to purchase premium subscription"
Proposed action: Purchase of "Premium Plan" for $29.99
Escalate to: "karthik6461@gmail.com"
Priority: "normal"
Get details for HITL escalation "esc-[ID-FROM-TEST-2]"
Approve HITL escalation "esc-[ID-FROM-TEST-2]" with comment "Approved for testing purposes"
Create a HITL escalation for a $50 software license purchase, then modify it to $75 enterprise license
Receiving push notifications
To receive Cogito push notifications on Slack/Teams/WhatsApp/Telegram , go to https://agentmp.ai/linkchannels , select your preferred channel and configure your channel identifier.
For Teams and Slack contact your channel admin to enable AgentMP bot.
We are actively onboarding other channels. If you need to run this MCP server entirely within your firewall reachout to ops@manifoldsystems.io
To test out Cogito HITL API on postman you can use postman collection - HITL.postman_collection.json - in this repo.
Please refer to this demo video:
https://github.com/AgentMP/hitl-mcp-server/blob/main/HITLDemoVideo.mp4
HITL MCP Server
What is it?
HITL MCP server streamlines user interactions with AI Agents that are semi-autonomous. Agents can perform their tasks and reach out to humans for approvals, status updates, feedbacks, course corrections using this MCP tool. User interactions are captured, stored for future enhancements. User interactions are managed in channels of choice by end user (slack/teams/whatsapp/telegram/web browser).
Why?
Standardized interactions, does not assume user is sitting in front of the agent and waits for feedback/approvals
Ease of use, without any new app installation
Structured interactions that are stored and tracked for future reference
Domain agnostic implementation
Why Now?
There does not seem to be a single standard for HITL.
A Model Context Protocol (MCP) server that bridges Claude Desktop with your HITL (Human In The Loop) escalation service. This allows Claude to create, approve, modify, reject, and manage HITL escalations directly from Claude Desktop.
https://hub.docker.com/r/agentmp/hitl-mcp-server
Features
Create HITL Escalations: Create new escalation requests with proposed actions
Approve Escalations: Approve pending escalations with optional comments
Modify Escalations: Modify existing escalations with new actions
Reject Escalations: Reject escalations with optional comments
Get Escalation Details: Retrieve details of specific escalations
List Escalations: List all escalations for the authenticated user
If you want to build and run locally yourself ...
Related MCP server: HR-Assist
Prerequisites
Node.js 18+
Docker (optional, for containerized deployment)
AGENTMP API Key from your platform
Claude Desktop application
Steps to Configure Cogito HITL on Claude Desktop
(Please refer to SetupClaudeDesktop.md for steps)
Setup
Option 1: Docker Deployment (Recommended)
Clone or create the project files:
mkdir hitl-mcp-server cd hitl-mcp-serverCreate all the required files (app.js, package.json, package-lock.json, Dockerfile, docker-compose.yml)
Set your API key:
export AGENTMP_API_KEY="your_api_key_here"Build and run the container:
chmod +x run.sh ./run.shOr manually:
docker-compose up --build -d
Option 2: Local Node.js Deployment (Recommended for troubleshooting)
Install dependencies:
npm installSet your API key:
export AGENTMP_API_KEY="your_api_key_here"Use the setup script:
chmod +x setup-local.sh ./setup-local.shOr run manually:
node app.js
Testing Your Setup
Before configuring Claude Desktop, test your setup:
# Test the server directly
export AGENTMP_API_KEY="your_api_key"
node app.jsIf working correctly, you should see:
๐ Starting HITL MCP Server...
โ
API Key loaded successfully
๐ง Setting up request handlers...
โ
HITL MCP Server initialized successfully
๐ HITL MCP Server running and connected via stdio
๐ก Ready to handle HITL requests from Claude DesktopClaude Desktop Configuration
To use this MCP server with Claude Desktop, you need to configure it in your Claude Desktop settings.
Configuration Steps
Open Claude Desktop
Go to Settings โ Developer
Edit Config (this opens your MCP configuration file)
Add the following configuration:
For Docker Deployment:
{
"mcpServers": {
"hitl": {
"command": "docker",
"args": ["exec", "-i", "hitl-mcp-server", "node", "app.js"],
"env": {
"AGENTMP_API_KEY": "your_api_key_here"
}
}
}
}For Local Node.js Deployment:
{
"mcpServers": {
"hitl": {
"command": "node",
"args": ["/path/to/your/hitl-mcp-server/app.js"],
"env": {
"AGENTMP_API_KEY": "your_api_key_here"
}
}
}
}Save the configuration file
Restart Claude Desktop
Usage Examples
Once configured, you can use the following commands in Claude Desktop:
Create a HITL Escalation
Create a HITL escalation for session "sess-123" with agent "my-agent" for a purchase of "Premium License" costing $99.99. Escalate to user "user@example.com" with normal priority.Approve an Escalation
Approve HITL escalation "esc-123456789" with comment "Approved for purchase"Modify an Escalation
Modify HITL escalation "esc-123456789" to change the item to "Enterprise License" and amount to $199.99 with comment "Upgraded to enterprise"Reject an Escalation
Reject HITL escalation "esc-123456789" with comment "Budget exceeded"Get Escalation Details
Get details for HITL escalation "esc-123456789"List All Escalations
List all my HITL escalationsAvailable Tools
The MCP server provides the following tools:
create_hitl: Create a new HITL escalation request
approve_hitl: Approve a HITL escalation
modify_hitl: Modify a HITL escalation with new action
reject_hitl: Reject a HITL escalation
get_hitl: Get details of a specific HITL escalation
list_hitls: List all HITL escalations for the authenticated user
Environment Variables
AGENTMP_API_KEY(required): Your API key for the AGENTMP platform
API Endpoints Used
The server communicates with your HITL service using these endpoints:
POST /api/hitl/mcp- MCP JSON-RPC endpoint for create, approve, modifyPOST /api/hitl/{id}/reject- REST endpoint for rejecting escalationsGET /api/hitl/{id}- REST endpoint for getting escalation detailsGET /api/hitl- REST endpoint for listing escalations
Troubleshooting
Common Issues
"No such container: hitl-mcp-server"
The Docker container isn't running
Run:
docker-compose up -dto start itCheck:
docker ps | grep hitl-mcp-serverto verify it's runningRecommendation: Use local Node.js setup instead
"Cannot find module '@modelcontextprotocol/sdk/server/index.js'"
Dependencies not installed locally
Run:
npm installin the project directoryMake sure you're in the correct directory with package.json
API Key Not Set
Ensure
AGENTMP_API_KEYenvironment variable is properly setCheck that the API key is valid and has proper permissions
Container Not Starting
Check Docker logs:
docker logs hitl-mcp-serverEnsure the API key is provided in the environment
Claude Desktop Not Recognizing Server
Verify the MCP configuration syntax in Claude Desktop
Check that the path to the script is correct (use absolute path)
Restart Claude Desktop after configuration changes
For local setup, use the config format provided by
setup-local.sh
Connection Issues
Ensure your network allows connections to
backend.agentmp.ioCheck if any firewall rules are blocking the connection
Logs
For Docker deployment, view logs with:
docker logs hitl-mcp-serverFor local deployment, logs will appear in the terminal where you ran npm start.
Security Considerations
Store your API key securely and never commit it to version control
The container runs as a non-root user for security
Consider using Docker secrets for production deployments
Regularly rotate your API keys
Contributing
Feel free to submit issues and enhancement requests!
License
MIT License
Set your API key
export AGENTMP_API_KEY="99aeae0e6b4f4107a59d1b59010834cb3eb96ae0f667078f7cc2a296dad27785"
Build the image
docker build -t hitl-mcp-server .
Run the container
docker run -d
--name hitl-mcp-server
--env AGENTMP_API_KEY="99aeae0e6b4f4107a59d1b59010834cb3eb96ae0f667078f7cc2a296dad27785"
--restart unless-stopped
-i
hitl-mcp-server
Perfect! Your Docker container is running successfully (ID: 3c10bcf71a6d...).
๐ฏ Claude Desktop Configuration
Open Claude Desktop โ Settings โ Developer โ Edit Config and add this:## ๐ Setup Steps
Save the config above in Claude Desktop
Restart Claude Desktop
Test with the examples below
๐งช Simple Test Cases
Here are test cases from basic to advanced:
Test 1: List Existing HITLs (Basic)
List all my HITL escalationsExpected: Should show your existing HITL escalations or empty list
Test 2: Create a HITL Escalation (Core Function)
Create a HITL escalation with these details:
- Session ID: "test-session-123"
- Agent ID: "claude-test-agent"
- User prompt: "User wants to purchase premium subscription"
- Proposed action: Purchase of "Premium Plan" for $29.99
- Escalate to: "karthik6461@gmail.com"
- Priority: "normal"Expected: Should return escalation ID like "esc-xxxxx-xxxxx-xxxxx"
Test 3: Get HITL Details (Verification)
Get details for HITL escalation "esc-[ID-FROM-TEST-2]"Replace [ID-FROM-TEST-2] with the actual ID from Test 2
Test 4: Approve HITL (Action)
Approve HITL escalation "esc-[ID-FROM-TEST-2]" with comment "Approved for testing purposes"Test 5: Create and Modify (Advanced)
Create a HITL escalation for a $50 software license purchase, then modify it to $75 enterprise license๐ Quick Verification Commands
Before testing in Claude, verify your container:
# Check container is running
docker ps | grep hitl-mcp-server
# Check container logs
docker logs hitl-mcp-server
# Test the container directly
docker exec -i hitl-mcp-server node -e 'console.log("โ
Container is working!")'๐ Expected Claude Responses
If working correctly, Claude should:
โ Recognize the HITL tools automatically
โ Create escalations and return IDs like
esc-xxxxx-xxxxx-xxxxxโ Show JSON responses with escalation details
โ Handle approve/modify/reject operations
๐จ If Something Goes Wrong
Check Docker logs:
docker logs hitl-mcp-serverRestart Claude Desktop after any config changes
Verify container is running:
docker ps | grep hitl-mcp-server
Start with Test 1 (list HITLs) - it's the safest and will confirm the connection is working!
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AgentMP/hitl-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server