Skip to Content
SdkMCP Server

MCP Server

The @curate-me/mcp-server package exposes Curate-Me platform governance capabilities as Model Context Protocol (MCP)  tools. It runs inside runner containers alongside OpenClaw agents, giving them self-awareness about budgets, fleet peers, session memory, and the ability to communicate with other agents.

Overview

When an OpenClaw agent runs inside a Curate-Me managed runner, the MCP server provides 21 tools across two tiers:

  • Tier 1 — Foundation (16 tools): Budget, status, events, skills, peers, A2A, approvals, health, session memory, memory search, desktop screenshots, timeline recording, credentials, extended thinking, and session recordings
  • Tier 2 — Collaboration (5 tools): Subagent spawning, agent handoff, fleet messaging, task dispatch, and conversation persistence
OpenClaw Agent → MCP Server (stdio) → Gateway REST API → Control Plane

Installation

The MCP server is pre-installed in all Curate-Me runner container images. For manual installation:

npm install -g @curate-me/mcp-server

Configuration

The MCP server reads configuration from environment variables, automatically injected into runner containers at startup:

VariableDescriptionDefault
CM_API_KEYRunner auth token (cm_rt_...), auto-issued at session startAuto-injected
CM_GATEWAY_URLGateway URLhttp://localhost:8002
CM_RUNNER_IDThis runner’s IDAuto-detected
CM_SESSION_IDActive session IDAuto-detected
CM_ORG_IDOrganization IDFrom API key
CM_FLEET_IDFleet ID (if in a fleet)Optional

OpenClaw Configuration

Add the MCP server to your OpenClaw config’s MCP server list:

{ "mcpServers": { "curate-me": { "command": "curate-me-mcp", "args": [] } } }

Tier 1: Foundation Tools (16)

curate_check_budget

Check remaining daily LLM budget for this organization. Returns current spend, daily limit, remaining budget, request count, and whether budget is exceeded.

curate_get_status

Get this runner’s current status including state, resource usage, installed skills, and active session info.

ParameterTypeDescription
runner_idstringRunner ID (defaults to CM_RUNNER_ID)

curate_emit_event

Emit an audit event to the control plane. Events are recorded in the immutable audit trail and visible in the dashboard.

ParameterTypeRequiredDescription
event_typestringYesEvent type (e.g. task_completed, error_encountered)
detailobjectNoEvent payload with contextual data

curate_install_skill

Install a skill pack on this runner. Skill packs provide additional capabilities (MCP servers, tools, integrations).

ParameterTypeRequiredDescription
skill_pack_idstringYesSkill pack ID (e.g. spack_mcp_integrations)

curate_list_skills

List all available skill packs in the gallery, or list skills installed on this runner.

ParameterTypeDescription
installed_onlybooleanIf true, show only installed skills (default: false)

curate_discover_peers

Discover other runners in the fleet. Returns online peers with their capabilities and current workload.

ParameterTypeDescription
state_filterstringFilter by state: online, busy, all (default: online)

curate_send_a2a_task

Send a task to another agent via the A2A (Agent-to-Agent) protocol. The task goes through governance checks (rate limits, PII scanning, cost caps).

ParameterTypeRequiredDescription
to_agentstringYesTarget agent ID
contentstringYesTask content/instructions
prioritystringNolow, normal, high, urgent (default: normal)

curate_request_approval

Request human-in-the-loop (HITL) approval before proceeding with a sensitive action. Creates an approval request in the dashboard queue.

ParameterTypeRequiredDescription
action_typestringYesType of action (e.g. deploy, delete_data)
descriptionstringYesHuman-readable description of the action
estimated_cost_usdnumberNoEstimated cost in USD

curate_gateway_health

Check the health of the Curate-Me gateway and connected services. No parameters required.

curate_session_memory

Restore context from prior runner sessions. Returns conversation summaries, key findings, and carried-forward data from previous runs. Enables stateful multi-run workflows.

ParameterTypeDescription
runner_idstringRunner ID (defaults to CM_RUNNER_ID)
template_idstringFilter memories by template ID
limitintegerNumber of memories to retrieve (default 10, max 100)

Search across all runner session memories for relevant context. Enables knowledge retrieval from past executions across the fleet.

ParameterTypeRequiredDescription
querystringYesSearch query (e.g. customer complaints, pricing)
runner_idstringNoFilter to specific runner
limitintegerNoNumber of results (default 20, max 100)

curate_desktop_screenshot

Capture a screenshot of the runner’s desktop for visual debugging. Returns base64-encoded image data.

ParameterTypeDescription
runner_idstringRunner ID (defaults to CM_RUNNER_ID)
session_idstringSession ID (defaults to CM_SESSION_ID)

curate_timeline_record

Record an event into the session timeline for time-travel debugging. Enables replay and inspection of agent execution in the dashboard.

ParameterTypeRequiredDescription
event_typestringYesEvent type (e.g. function_call, decision, error)
duration_msintegerNoDuration in milliseconds
input_dataobjectNoInput to the event
output_dataobjectNoOutput from the event
cost_usdnumberNoCost of this operation
metadataobjectNoAdditional context

curate_credential_store

Store, list, or delete credentials in the encrypted credential vault.

ParameterTypeRequiredDescription
actionstringYesstore, list, or delete
namestringFor storeCredential name
credential_typestringNoapi_key, service_token, password (default: api_key)
provider_hintstringNoProvider context (e.g. stripe, postgres)
valuestringFor storeSecret value to encrypt
credential_idstringFor deleteCredential ID to delete

curate_extended_thinking

Get, set, or check usage of extended thinking configuration.

ParameterTypeRequiredDescription
actionstringYesget, set, or usage
budget_tokensintegerFor setMax tokens for thinking
cost_warning_threshold_usdnumberFor setCost warning threshold

curate_recording_save

Save or list session recordings (rrweb events) for visual replay.

ParameterTypeRequiredDescription
actionstringYessave or list
recording_dataobjectFor saveRecording data to save
runner_idstringNoRunner ID (defaults to CM_RUNNER_ID)
session_idstringNoSession ID (defaults to CM_SESSION_ID)

Tier 2: Collaboration Tools (5)

curate_subagent_spawn

Create, list, or view policy for subagent specs. Each subagent has its own model, tools, cost limit, and conversation budget.

ParameterTypeRequiredDescription
actionstringYescreate, list, or policy
namestringFor createSubagent name
agent_typestringNotask, workflow, chat (default: task)
modelstringNoModel for subagent
allowed_toolsarrayNoTool IDs the subagent can use
max_turnsintegerNoMax conversation turns
cost_limit_usdnumberNoCost budget for this subagent
descriptionstringNoWhat this subagent does

curate_agent_handoff

Hand off work from this agent to another with full context (findings, artifacts, instructions). Enables multi-step workflow pipelines.

ParameterTypeRequiredDescription
to_agentstringYesTarget agent/runner ID
summarystringYesSummary of work completed
findingsarrayNoKey findings as list of strings
artifactsarrayNoOutput file paths to pass along
instructionsstringNoInstructions for receiving agent
prioritystringNolow, normal, high, urgent

curate_fleet_message

Send a message to other agents in the fleet. Supports broadcast to all agents or direct messaging.

ParameterTypeRequiredDescription
contentstringYesMessage content
fleet_idstringNoFleet ID (defaults to CM_FLEET_ID)
agent_idstringNoTarget agent for direct message
broadcastbooleanNoIf true, broadcast to all agents

curate_task_dispatch

Poll for dispatched tasks from the dashboard or report task completion.

ParameterTypeRequiredDescription
actionstringYespoll or report
task_idstringFor reportTask ID to report on
resultstringFor reportResult/output of the task
statusstringFor reportcompleted, failed, in_progress

curate_conversation

Store or retrieve conversation entries for audit trail and context continuity.

ParameterTypeRequiredDescription
actionstringYessave or get
entry_typestringFor saveuser_message, bot_message, vm_action, system_event
contentstringFor saveEntry content
metadataobjectNoOptional metadata
limitintegerFor getNumber of entries (default 50)

Usage Examples

Budget-Aware Agent

// Check budget before expensive operation const budget = await mcp.call("curate_check_budget"); if (budget.budget_exceeded) { await mcp.call("curate_emit_event", { event_type: "budget_exceeded", detail: { action: "skipped_expensive_analysis" } }); return "Budget exceeded - deferring to next cycle"; }

Stateful Multi-Run Agent

// Restore context from prior session const memories = await mcp.call("curate_session_memory", { template_id: "daily_report", limit: 1 }); // Search for specific knowledge const insights = await mcp.call("curate_memory_search", { query: "customer objections pricing" }); // Record decisions in timeline await mcp.call("curate_timeline_record", { event_type: "decision", input_data: { context: "Found 3 prior insights" }, output_data: { decision: "Using revised pricing strategy" } });

Fleet Collaboration

// Discover peers const peers = await mcp.call("curate_discover_peers", { state_filter: "online" }); // Delegate sub-task await mcp.call("curate_send_a2a_task", { to_agent: peers[0].runner_id, content: "Analyze the uploaded CSV and generate a summary report", priority: "normal" }); // Broadcast learning to fleet await mcp.call("curate_fleet_message", { content: "Found that CSV headers must be normalized before processing", broadcast: true });

Multi-Step Workflow Pipeline

// Agent A completes analysis, hands off to Agent B await mcp.call("curate_agent_handoff", { to_agent: "runner_compliance_reviewer", summary: "Completed financial analysis for Q4", findings: ["Revenue up 15%", "Costs down 8%", "New market opportunity in APAC"], artifacts: ["/workspace/q4_analysis.pdf", "/workspace/charts.xlsx"], instructions: "Review for regulatory compliance before publishing" });

Secure Credential Management

// Store API key securely await mcp.call("curate_credential_store", { action: "store", name: "stripe_api_key", credential_type: "api_key", provider_hint: "stripe", value: "sk_live_xxx" }); // List stored credentials const creds = await mcp.call("curate_credential_store", { action: "list" });

HITL for Sensitive Operations

// Request approval before destructive action await mcp.call("curate_request_approval", { action_type: "delete_data", description: "Delete 1,247 stale user records older than 2 years", estimated_cost_usd: 0 });

Architecture

┌─────────────────────────────────────────┐ │ Runner Container │ │ │ │ ┌──────────┐ ┌──────────────────┐ │ │ │ OpenClaw │────→│ MCP Server │ │ │ │ Agent │stdio│ (21 tools) │ │ │ └──────────┘ └────────┬─────────┘ │ │ │ HTTP │ └────────────────────────────┼────────────┘ ┌────────▼────────┐ │ Gateway :8002 │ │ (governance │ │ chain + proxy) │ └────────┬────────┘ ┌────────▼────────┐ │ Control Plane │ │ (MongoDB + │ │ Redis) │ └─────────────────┘

Tool Categories

CategoryToolsPurpose
Governancecheck_budget, request_approval, gateway_healthCost control + safety gates
Statusget_status, emit_eventRunner awareness + audit trail
Skillsinstall_skill, list_skillsDynamic capability management
Fleetdiscover_peers, send_a2a_task, fleet_messageMulti-agent coordination
Memorysession_memory, memory_search, conversationStateful execution + knowledge
Debuggingdesktop_screenshot, timeline_record, recording_saveVisual + time-travel debugging
Securitycredential_storeEncrypted secret management
Configextended_thinking, subagent_spawnRuntime optimization
Workflowagent_handoff, task_dispatchPipeline orchestration

Development

cd packages/mcp-server # Install dependencies npm install # Run the server (for testing) npm start # Development with auto-reload npm run dev

Testing MCP Tools Locally

# Start the gateway first cd services/backend poetry run uvicorn src.main_gateway:app --reload --port 8002 # Test the MCP server — list all tools echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}} {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | node packages/mcp-server/src/index.js # Call a specific tool echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}} {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"curate_gateway_health","arguments":{}}}' | CM_GATEWAY_URL=http://localhost:8002 node packages/mcp-server/src/index.js
  • CLI Reference - Command-line tool also installed in containers
  • Managed Runners - Runner container lifecycle and management
  • AI Gateway - The governance proxy that MCP tools communicate with