Sponsored by Deepsite.site

MCP-Human: Human Assistance for AI Assistants

Created By
olalonde7 months ago
Human Assistance for AI Assistants
Content

MCP-Human: Human Assistance for AI Assistants

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.

we need to go deeper

Setup

Prerequisites

  • Node.js 16+
  • AWS credentials with MTurk permissions. See instructions below.
  • AWS CLI (recommended for setting aws credentials)

Configuring AWS credentials

# 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

Configuring MCP server with your MCP client

Claude code

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

Generic

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

Configuration

The server can be configured with the following environment variables:

VariableDescriptionDefault
MTURK_SANDBOXUse MTurk sandbox (true) or production (false)true
AWS_REGIONAWS region for MTurkus-east-1
AWS_PROFILEAWS profile to use for credentialsmcp-human
DEFAULT_REWARDThe reward amount in USD.0.05
FORM_URLURL where the form is hosted. Needs to be https.https://syskall.com/mcp-human/

Setting Up AWS User with Mechanical Turk Access

To create an AWS user with appropriate permissions for Mechanical Turk:

  1. Log in to the AWS Management Console:

  2. Create a new IAM User:

    • Navigate to IAM (Identity and Access Management)
    • Click "Users" > "Create user"
    • Enter a username (e.g., mturk-api-user)
    • Click "Next" to proceed to permissions
  3. Set Permissions:

    • Choose "Attach existing policies directly"
    • Search for and select AmazonMechanicalTurkFullAccess
    • If you need more granular control, you can create a custom policy with specific MTurk permissions
    • Click "Next" and then "Create user"
  4. Create Access Keys:

    • After user creation, click on the username to go to their detail page
    • Go to the "Security credentials" tab
    • In the "Access keys" section, click "Create access key"
    • Choose "Application running outside AWS" or appropriate option
    • Click through the wizard and finally "Create access key"
  5. Save Credentials:

    • Download the CSV file or copy the Access key ID and Secret access key
    • These will be used as AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables
    • Important: This is the only time you'll see the secret access key, so save it securely
  6. Configure 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.

Architecture

This system consists of two main components:

  1. MCP Server: A server implementing the Model Context Protocol that integrates with MTurk
  2. Form: A static HTML form.

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.

MCP Tools

askHuman

Allows an AI to ask a question to a human worker on Mechanical Turk.

Parameters:

  • question: The question to ask a human worker
  • reward: 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.

checkHITStatus

Check the status of a previously created HIT and retrieve any submitted assignments.

Parameters:

  • hitId: The HIT ID to check status for

Example usage:

// From the AI assistant's perspective
const status = await call("checkHITStatus", {
  hitId: "3XMVN1BINNIXMTM9TTDO1GKMW7SGGZ",
});

Resources

mturk-account

Provides access to MTurk account information.

URIs:

  • mturk-account://balance - Get account balance
  • mturk-account://hits - List HITs
  • mturk-account://config - Get configuration info

Limitations

  • Need to implement progress notifications to avoid getting timing out.
  • Currently only supports simple text-based questions and answers
  • Limited to one assignment per HIT
  • No support for custom HTML/JS in the form
  • Simple polling for results rather than a webhook approach
  • Uses MTurk's ExternalQuestion format, which requires hosting a form
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
CursorThe AI Code Editor
WindsurfThe new purpose-built IDE to harness magic
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
Serper MCP ServerA Serper MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
ChatWiseThe second fastest AI chatbot™