MCP Human Assistance
STDIOEnables AI assistants to get human input through Amazon Mechanical Turk tasks.
Enables AI assistants to get human input through Amazon Mechanical Turk tasks.
A Model Context Protocol (MCP) server that enables AI assistants to get human input when needed. This tool creates tasks on Amazon Mechanical Turk that let real humans answer questions from AI systems. While primarily a proof-of-concept, it demonstrates how to build human-in-the-loop AI systems using the MCP standard. See limitations for current constraints.
# Configure AWS credentials for profile mcp-human export AWS_ACCESS_KEY_ID="your_access_key" export AWS_SECRET_ACCESS_KEY="your_secret_key" aws configure set aws_access_key_id ${AWS_ACCESS_KEY_ID} --profile mcp-human aws configure set aws_secret_access_key ${AWS_SECRET_ACCESS_KEY} --profile mcp-human
Sandbox mode:
claude mcp add human -- npx -y mcp-human@latest
The server defaults to sandbox mode (for testing). If you want to submit real requests, use MTURK_SANDBOX=false
.
claude mcp add human -e MTURK_SANDBOX=false -- npx -y mcp-human@latest
Update the configuration of your MCP client to the following:
{ "mcpServers": { "human": { "command": "npx", "args": ["-y", "mcp-human@latest"] } } }
e.g.: Claude Desktop (MacOS): ~/Library/Application\ Support/Claude/claude_desktop_config.json
The server can be configured with the following environment variables:
Variable | Description | Default |
---|---|---|
MTURK_SANDBOX | Use MTurk sandbox (true ) or production (false ) | true |
AWS_REGION | AWS region for MTurk | us-east-1 |
AWS_PROFILE | AWS profile to use for credentials | mcp-human |
DEFAULT_REWARD | The reward amount in USD. | 0.05 |
FORM_URL | URL where the form is hosted. Needs to be https. | https://syskall.com/mcp-human/ |
To create an AWS user with appropriate permissions for Mechanical Turk:
Log in to the AWS Management Console:
Create a new IAM User:
mturk-api-user
)Set Permissions:
AmazonMechanicalTurkFullAccess
Create Access Keys:
Save Credentials:
AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
environment variablesConfigure MTurk Requester Settings:
Note: Always start with the MTurk Sandbox (
MTURK_SANDBOX=true
) to test your integration without spending real money. Only switch to production when you're confident in your implementation.
This system consists of two main components:
The AI assistant connects to the MCP server, which creates tasks on MTurk. Human workers complete these tasks through a form, and their responses are made available to the AI assistant.
The Mechanical Turk form used is hosted on GitHub pages: https://syskall.com/mcp-human/. It gets populated with data through query parameters.
Allows an AI to ask a question to a human worker on Mechanical Turk.
Parameters:
question
: The question to ask a human workerreward
: The reward amount in USD (default: $0.05)title
: Title for the HIT (optional)description
: Description for the HIT (optional)hitValiditySeconds
: Time until the HIT expires in seconds (default: 1 hour)Example usage:
// From the AI assistant's perspective const response = await call("askHuman", { question: "What's a creative name for a smart home device that adjusts lighting based on mood?", reward: "0.25", title: "Help with creative product naming", hitValiditySeconds: 3600, // HIT valid for 1 hour });
If a worker responds within the HIT's validity period, the response will contain their answer. If not, it will return a HIT ID that can be checked later.
Check the status of a previously created HIT and retrieve any submitted assignments.
Parameters:
hitId
: The HIT ID to check status forExample usage:
// From the AI assistant's perspective const status = await call("checkHITStatus", { hitId: "3XMVN1BINNIXMTM9TTDO1GKMW7SGGZ", });
Provides access to MTurk account information.
URIs:
mturk-account://balance
- Get account balancemturk-account://hits
- List HITsmturk-account://config
- Get configuration info