MeatSpace
About
Human-in-the-loop for AI agents. Submit content + 2–4 choices, get a structured human decision back.
Details
- Author
- zmarten
- Categories
- Productivity, Automation, AI
Jump to
Setup
Install MeatSpace in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/zmarten/meatspace
Follow the installation instructions in the repository README, then restart your MCP client.
Human-in-the-loop service for AI agents. When an agent hits a subjective, high-stakes, or ambiguous decision, MeatSpace routes it to a human who picks one of 2–4 options and returns a structured result.
An agent posts a title, optional content (text, markdown, HTML, or an image), and 2–4 labeled choices. A human reviewer is shown the request, picks one, and the API returns the selectedidandlabel. The agent waits via long-poll or webhook.
- Approval gates before destructive or irreversible actions (deploys, deletes, payments).
- Subjective tie-breaks where the model is below its confidence threshold.
- Tasteful judgment calls — copy choices, design preferences, ranking ties.
- Escalation when an agent has run out of deterministic checks.
Don't use it when the task is deterministic, automatically verifiable, or low-stakes and easily reversible.
All three sit on the same backing API and accept the same Bearer token.
A new agent can fully onboard itself in three calls — no signup page, no approval queue, no human in the setup loop:
- POST /api/keyswith{"name": "your-agent", "email": "owner@example.com"}→ returns an API key instantly. Rate-limited to 5 keys per email.
- POST /api/requestswith the Bearer token, your title, and choices → creates the review request.
- GET /api/requests/{id}/wait→ blocks until the human responds, or times out and returnspendingwith areview_urlandpoll_url.
The same flow is available over MCP:initialize→tools/list→provision_api_key→ask_human. Theprovision_api_keyandget_service_statustools require no auth, so a fresh MCP client can connect without credentials and bootstrap itself.
curl -X POST https://meatspace.run/api/keys \ -H "Content-Type: application/json" \ -d '{"name": "my-agent", "email": "you@example.com"}'
The response includesapi_key— shown once, save it. All subsequent calls useAuthorization: Bearer <token>.
curl -X POST https://meatspace.run/api/requests \ -H "Authorization: Bearer $MEATSPACE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_name": "my-agent", "title": "Ship v2.0 to production?", "content": "All tests pass. Staging looks good. 2 minor lint warnings.", "choices": [ { "id": "ship", "label": "Ship it" }, { "id": "wait", "label": "Wait for next cycle" } ], "confidence": 0.7, "consequence_of_wrong_choice": "Premature ship affects ~50k users" }'
{ "success": true, "data": { "id": "uuid", "status": "pending", "review_url": "https://meatspace.run/review/uuid?token=opaque-review-token", "poll_url": "/api/requests/uuid", "expires_at": "2026-04-23T19:00:00.000Z" } }
curl https://meatspace.run/api/requests/{id}/wait?timeout=25000 \ -H "Authorization: Bearer $MEATSPACE_API_KEY"
Returns{ status: "completed", selected, selected_label, responded_at }when the human responds, or202if still pending.
Optional fields onPOST /api/requests:content_type(textdefault,markdown,html,image),decision_reason,confidence(0–1),consequence_of_wrong_choice,recommended_option,callback_url(must be HTTPS and host-allowlisted),metadata(passed through to the webhook),run_id,trace_id,timeout_seconds(default 3600, max 86400).
MeatSpace implements MCP over Streamable HTTP athttps://meatspace.run/api/mcp. The server exposes three tools:
- get_service_status— availability and escalation guidance. No auth.
- provision_api_key— mint a Bearer token. No auth, rate-limited.
- ask_human— submit a decision. Requires Bearer auth.
{ "mcpServers": { "meatspace": { "type": "url", "url": "https://meatspace.run/api/mcp", "headers": { "Authorization": "Bearer <your-api-key>" } } } }
ask_humanlong-polls for up to 20 seconds. If the human hasn't responded by then, the tool returnsstatus: "pending"with areview_url(for the human) and apoll_url(for the agent).
<script type="module"> import { MeatSpace } from 'https://meatspace.run/sdk/meatspace.js'; const ms = new MeatSpace(); await ms.getKey({ name: 'browser-agent', email: 'agent@example.com' }); const result = await ms.ask({ agentName: 'browser-agent', title: 'Which option?', choices: [ { id: 'a', label: 'A' }, { id: 'b', label: 'B' }, ], }); console.log(result.selected); </script>
Methods:getKey(),createRequest(),pollResult(),waitForResult(),ask()(create + wait).
Ifcallback_urlis set on the request, MeatSpace POSTs the result when the human responds:
{ "event": "request.completed", "request_id": "uuid", "selected": "ship", "selected_label": "Ship it", "responded_at": "2026-04-23T18:10:00.000Z", "metadata": {} }
callback_urlmust behttps://and the hostname must be explicitly allowlisted by the operator. If no allowlist is configured, request creation rejects callback URLs. Each delivery is signed withX-HITL-TimestampandX-HITL-Signatureheaders.
{ "success": false, "error": "Human-readable message", "code": "machine_readable_code" }
Common codes:agent_name_required,invalid_choice_count,content_too_large,callback_url_not_allowed,request_create_failed.
This repo is a Next.js 14 app deployed on Cloudflare Pages.
npm install npm run dev # local dev at http://localhost:3000 npm run test # integration tests npm run build:cf # build for Cloudflare Pages npm run deploy:cf # build and deploy
Supabase is the system of record for keys and requests; Resend handles transactional email.
Create notes, search, & think with your Fabric AI workspace
An AI co-pilot for Foundry VTT: run combat, set the scene, and voice NPCs by talking to your assistant. 193 tools across 24 domains, works with content you already own.
Magica is your all-in-one AI platform, offering 2500+ cutting-edge tools under a single subscription.
Connect to the Taskade platform via MCP. Access tasks, projects, workflows, and AI agents in real-time through a unified workspace and API.
Dynamically search and call tools using UnifAI Network
A dynamic server for managing multi-agent collaboration within tmux sessions, featuring flexible pane configurations and auto-detection.
A multi-client AI agent monitoring and control system with automatic task completion detection.
An MCP server for AI-to-AI collaboration, enabling autonomous workflows and role-based task management between different AI models.
Mixture-of-Agents document intelligence engine — 100% recall across 10 languages, x402 micropayment (USDC on Base/Solana), 6 tools from $0.08/call
A Model Context Protocol (MCP) server that provides access to 100+ curated AI agent skills from the VoltAgent Awesome Agent Skills collection.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


