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. - Node.js 16+ - AWS credentials with MT
Add this skill
npx mdskills install olalonde/mcp-humanWell-documented MCP server enabling human-in-the-loop AI via MTurk with clear setup and examples
1# MCP-Human: Human Assistance for AI Assistants23A 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](#limitations) for current constraints.4567## Setup89### Prerequisites1011- Node.js 16+12- AWS credentials with MTurk permissions. See [instructions below](#setting-up-aws-user-with-mechanical-turk-access).13- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) (recommended for setting aws credentials)1415### Configuring AWS credentials1617```sh18# Configure AWS credentials for profile mcp-human19export AWS_ACCESS_KEY_ID="your_access_key"20export AWS_SECRET_ACCESS_KEY="your_secret_key"21aws configure set aws_access_key_id ${AWS_ACCESS_KEY_ID} --profile mcp-human22aws configure set aws_secret_access_key ${AWS_SECRET_ACCESS_KEY} --profile mcp-human23```2425### Configuring MCP server with your MCP client2627### Claude code2829Sandbox mode:3031```sh32claude mcp add human -- npx -y mcp-human@latest33```3435The server defaults to [sandbox mode](https://workersandbox.mturk.com/) (for testing). If you want to submit real requests, use `MTURK_SANDBOX=false`.3637```sh38claude mcp add human -e MTURK_SANDBOX=false -- npx -y mcp-human@latest39```4041### Generic4243Update the configuration of your MCP client to the following:4445```json46{47 "mcpServers": {48 "human": {49 "command": "npx",50 "args": ["-y", "mcp-human@latest"]51 }52 }53}54```5556e.g.: Claude Desktop (MacOS): `~/Library/Application\ Support/Claude/claude_desktop_config.json`5758## Configuration5960The server can be configured with the following environment variables:6162| Variable | Description | Default |63| ---------------- | -------------------------------------------------- | -------------------------------- |64| `MTURK_SANDBOX` | Use MTurk sandbox (`true`) or production (`false`) | `true` |65| `AWS_REGION` | AWS region for MTurk | `us-east-1` |66| `AWS_PROFILE` | AWS profile to use for credentials | `mcp-human` |67| `DEFAULT_REWARD` | The reward amount in USD. | `0.05` |68| `FORM_URL` | URL where the form is hosted. Needs to be https. | `https://syskall.com/mcp-human/` |6970## Setting Up AWS User with Mechanical Turk Access7172To create an AWS user with appropriate permissions for Mechanical Turk:73741. **Log in to the AWS Management Console**:7576 - Go to https://aws.amazon.com/console/77 - Sign in as a root user or an administrator78792. **Create a new IAM User**:8081 - Navigate to IAM (Identity and Access Management)82 - Click "Users" > "Create user"83 - Enter a username (e.g., `mturk-api-user`)84 - Click "Next" to proceed to permissions85863. **Set Permissions**:8788 - Choose "Attach existing policies directly"89 - Search for and select `AmazonMechanicalTurkFullAccess`90 - If you need more granular control, you can create a custom policy with specific MTurk permissions91 - Click "Next" and then "Create user"92934. **Create Access Keys**:9495 - After user creation, click on the username to go to their detail page96 - Go to the "Security credentials" tab97 - In the "Access keys" section, click "Create access key"98 - Choose "Application running outside AWS" or appropriate option99 - Click through the wizard and finally "Create access key"1001015. **Save Credentials**:102103 - Download the CSV file or copy the Access key ID and Secret access key104 - These will be used as `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables105 - **Important**: This is the only time you'll see the secret access key, so save it securely1061076. **Configure MTurk Requester Settings**:108 - Visit the MTurk Requester website: https://requester.mturk.com/109 - Set up payment method and other account details110 - For testing, use the MTurk Sandbox: https://requestersandbox.mturk.com/111112> **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.113114## Architecture115116This system consists of two main components:1171181. **MCP Server**: A server implementing the Model Context Protocol that integrates with MTurk1192. **Form**: A static HTML form.120121The 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.122123The Mechanical Turk form used is hosted on GitHub pages: [https://syskall.com/mcp-human/](https://syskall.com/mcp-human/). It gets populated with data through query parameters.124125## MCP Tools126127### askHuman128129Allows an AI to ask a question to a human worker on Mechanical Turk.130131Parameters:132133- `question`: The question to ask a human worker134- `reward`: The reward amount in USD (default: $0.05)135- `title`: Title for the HIT (optional)136- `description`: Description for the HIT (optional)137- `hitValiditySeconds`: Time until the HIT expires in seconds (default: 1 hour)138139Example usage:140141```javascript142// From the AI assistant's perspective143const response = await call("askHuman", {144 question:145 "What's a creative name for a smart home device that adjusts lighting based on mood?",146 reward: "0.25",147 title: "Help with creative product naming",148 hitValiditySeconds: 3600, // HIT valid for 1 hour149});150```151152If 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.153154### checkHITStatus155156Check the status of a previously created HIT and retrieve any submitted assignments.157158Parameters:159160- `hitId`: The HIT ID to check status for161162Example usage:163164```javascript165// From the AI assistant's perspective166const status = await call("checkHITStatus", {167 hitId: "3XMVN1BINNIXMTM9TTDO1GKMW7SGGZ",168});169```170171## Resources172173### mturk-account174175Provides access to MTurk account information.176177URIs:178179- `mturk-account://balance` - Get account balance180- `mturk-account://hits` - List HITs181- `mturk-account://config` - Get configuration info182183## Limitations184185- Need to implement [progress notifications](https://github.com/modelcontextprotocol/typescript-sdk/issues/461) to avoid getting timing out.186- Currently only supports simple text-based questions and answers187- Limited to one assignment per HIT188- No support for custom HTML/JS in the form189- Simple polling for results rather than a webhook approach190- Uses MTurk's ExternalQuestion format, which requires hosting a form191
Full transparency — inspect the skill content before installing.