MC

MCP Server for Human Use: Instant Feedback

Get instant human feedback with an MCP server—connect your AI to real users worldwide, powered by Rapidata.

Overview

This MCP (Model Context Protocol) server provides a lightweight bridge between an AI system and human reviewers so your model can request and receive instant human feedback. The server implements the MCP pattern for session management, routing, and response collection, letting AI systems open short-lived tasks for real people worldwide and receive structured answers or ratings in real time.

Designed for developers, the server is intended to be dropped into a model inference loop or orchestration pipeline. Use it to surface ambiguous model outputs, collect quality labels, or let humans pick the best answer from a set of candidate generations. The project integrates with Rapidata to route tasks to human participants and expose the responses back to your application via webhooks and API responses.

Features

  • Lightweight MCP server that manages human review sessions and responses
  • Real-time routing to human reviewers powered by Rapidata
  • Session lifecycle management: create, monitor, close
  • Webhook support for asynchronous response delivery
  • Configurable routing, timeouts, and response schemas
  • Sample client and server code for quick integration
  • Docker and local development support

Installation / Configuration

Clone the repository and run locally or with Docker. Example commands:

# clone
git clone https://github.com/RapidataAI/human-use.git
cd human-use

# install dependencies (Node.js example)
npm install

# run locally
npm run start

Docker:

# build and run
docker build -t human-use-mcp .
docker run -e RAPIDATA_API_KEY=your_key -p 8080:8080 human-use-mcp

Environment variables (summary):

VariableDescriptionExample
RAPIDATA_API_KEYAPI key for Rapidata routing and billingsk_live_xxx
PORTLocal HTTP port8080
MCP_BASE_URLPublic base URL for MCP endpoints (used in session callbacks)https://example.com
RESPONSE_WEBHOOKYour app webhook to receive human responseshttps://api.myapp.com/mcp/webhook
SESSION_TIMEOUTSession TTL in seconds300

Example .env:

RAPIDATA_API_KEY=sk_live_xxx
PORT=8080
MCP_BASE_URL=https://mcp.example.com
RESPONSE_WEBHOOK=https://api.myapp.com/mcp/webhook
SESSION_TIMEOUT=300

Starter commands for local development:

# with environment file
npm run start -- --env .env

# or using Docker Compose
docker-compose up

Available Resources

  • GitHub repository: https://github.com/RapidataAI/human-use — source, examples, and issue tracker
  • API endpoints (typical):
    • POST /v1/mcp/sessions — create a new human review session
    • GET /v1/mcp/sessions/{id} — fetch session status
    • POST /v1/mcp/sessions/{id}/close — close a session
    • POST /webhook/responses — endpoint for receiving human responses (configurable)
  • Example SDK snippets (Node + Python) are included in the repo to illustrate session creation and webhook handling
  • Open data schema examples and JSON templates for response validation

Quick example: Create a session (curl)

This example shows creating an MCP session to ask a human to select the best answer among candidates.

curl -X POST https://localhost:8080/v1/mcp/sessions \
  -H "Authorization: Bearer $RAPIDATA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "task": "choose_best",
    "context": {
      "prompt": "Answer the user query and provide explanation",
      "query": "How does photosynthesis work?",
      "candidates": [
        {"id": "a1", "text": "Photosynthesis converts light energy..."},
        {"id": "a2", "text": "Plants use sunlight to make glucose..."}
      ]
    },
    "response_schema": {
      "type": "object",
      "properties": {
        "choice": {"type": "string"},
        "reason": {"type": "string"}
      },
      "required": ["choice"]
    },
    "callback_url": "https://api.myapp.com/mcp/webhook"
  }'

Response (shortened):

{
  "session_id": "sess_123",
  "status": "open",
  "expires_at": "2026-04-09T12:34:56Z",
  "review_url": "https://rapidata.app/r/sess_123"
}

Webhook handling (Express.js example)

Handle incoming human responses with a simple webhook:

const express = require('express');
const app = express();
app.use(express.json());

app.post('/mcp/webhook', (req, res) => {
  const payload = req.body; // { session_id, response }
  // Validate and persist the response, then notify model pipeline
  console.log('Human response for', payload.session_id, payload.response);
  res.status(200).send({ received: true });
});

app.listen(8080);

Use Cases

  • Human-in-the-loop content moderation: flag uncertain model outputs and get a quick human judgment before publishing.
  • Answer validation for question-answering systems: show top N model candidates to a human to select the best one and provide reasoning.
  • Training data collection: gather labeled examples, corrections, or ratings to improve model performance in active learning loops.
  • UX testing and A/B feedback: route alternative UI copy or model responses to real users and record preference data.
  • Error recovery: when confidence is low, route the request to a human worker to provide a fallback or correction.

Notes for Developers

  • Treat the MCP server as part of your model orchestration pipeline. Ensure webhook endpoints are authenticated and idempotent.
  • Configure sensible timeouts and retries — human feedback can be fast but is not instantaneous.
  • Use the response_schema to validate incoming responses and prevent malformed data from entering your training or production systems.

For full implementation details, examples, and contribution guidelines, see the repository on GitHub: https://github.com/RapidataAI/human-use.