Skip to content
Docs menu

Use the hub from your AI

Connect Claude, Cursor or any MCP client to the hub. Every tool, and the key it needs.

Prompt for your AI

Read https://mousemouse.ai/docs/mcp.md first. Set up the MouseMouse MCP server for me, with a key that can only do what I need. Ask me before anything that costs money or moves a robot.
Prompt for your AI
Read https://mousemouse.ai/docs/mcp.md first. Set up the MouseMouse MCP server for me, with a key that can only do what I need. Ask me before anything that costs money or moves a robot.

Your own AI agent can drive the hub too. lucen-mcp is an MCP server that gives it the hub's tools. It uses the same API as the web app and the CLI. This page says which tools work today, and which wait on a machine you start.

Install

uv tool install lucen-mcp

That puts a lucen-mcp executable on your PATH. It speaks MCP over stdio, takes no arguments, and is configured entirely by environment variables. The two local robot tools, init_robot and publish_robot, compile a model with MuJoCo on your machine. They need the CLI's rollout extra in the same environment:

uv tool install --with "lucen-cli[rollout]" lucen-mcp

Configure

The quickest way is Connect your AI. It creates a key with the train scope, marked as your AI agent's, shows it once, and prints the .mcp.json entry below with that key in it. To write the entry yourself:

Claude Code: save this as .mcp.json at the root of your project.

{
  "mcpServers": {
    "lucen": {
      "command": "lucen-mcp",
      "env": {
        "LUCEN_API_URL": "https://api.mousemouse.ai",
        "LUCEN_API_KEY": "lucen_sk_..."
      }
    }
  }
}

Claude Desktop: the same entry, in ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Claude Desktop does not read your shell profile, so if lucen-mcp is not on the launcher's PATH, use the absolute path uv tool install printed, usually ~/.local/bin/lucen-mcp.

LUCEN_API_URL is the hub's API: https://api.mousemouse.ai for the hub serving this page. It is required. The server has no built-in hub and refuses to start without it, so a key never goes to a guessed address. LUCEN_API_KEY is optional. Without it the server still runs, and every none-scope tool works on public data. Create a key in API keys.

Two rules hold for every tool:

  • The key lives in the environment. No tool takes a credential as a parameter, so it never lands in the agent's transcript. There is no command-line flag for one either, which keeps it out of your shell history.
  • Each tool is one API operation. The tools follow the API reference, so you can check an agent's transcript against it.

Or connect without installing

The hub serves the same tools itself, at https://api.mousemouse.ai/mcp. Your agent needs one entry and a key. For Claude Code, in .mcp.json:

{
  "mcpServers": {
    "mousemouse": {
      "type": "http",
      "url": "https://api.mousemouse.ai/mcp",
      "headers": { "Authorization": "Bearer lucen_sk_..." }
    }
  }
}

Codex, Cursor and other agents that speak MCP over HTTP take the same URL and header. A hub serves this only once its operator switches it on; until then it answers 503, and lucen-mcp above is the way in. Each request carries your key, and every tool calls the API as that key: the same scopes, the same private repos, the same limits. A browser sign-in is refused there, so give the agent a key. The tools that work on your own computer (init_robot, publish_robot, run_job and the skill tools) need lucen-mcp on that computer; the remote server leaves them out, and wait_for_gate too.

The training flow

These are the tools your agent gets by default, in the order a person works. Add ?toolsets=all to the URL, or set LUCEN_MCP_TOOLSETS=all for lucen-mcp, to get every tool below.

ToolScopeWhat it does
list_robotsnoneYour robots, then public ones. Each says whether it learns locomotion or manipulation, read from its card
plan_trainingwriteThe best way this robot can learn your sentence, and the plan for it with its price. You confirm both at once. Records nothing
find_training_routesreadEvery way this robot could learn the sentence, ranked: in simulation, from data that exists, from demonstrations you record. The ones not built yet say so
start_trainingtrainStart what you confirmed: the campaign and its first round, or one training run. Dry run by default
training_statusreadWhat is running, what waits on you, and what it has cost
get_sim_videosreadEvery sim test of a round, with its video links, beside the previous round's
next_roundtrainThe next round: one change and a prediction, on the hub's draft. Dry run by default
decidewriteAfter the videos: continue with one sentence, stop, or ask to run it on your robot. You approve that on the web
check_datasetwriteThe hub's checks on a dataset before it trains
propose_exclusionswritePropose episodes to leave out of training, each with a reason. A person confirms them on the web
read_training_historyreadWhat the hub already learned about training this robot
search_experiencenoneSearch the Coach's lessons
get_device_statusreadYour robot's requests, approvals and signed trail

Locomotion trains in simulation. Where your account may, it trains in Isaac Lab and the hub tests it in MuJoCo, a second engine. Otherwise it trains in MuJoCo, and the plan says it is single-simulator: it needs a check in a second engine before a real robot. Manipulation trains on data: yours, public datasets recorded on the robot, or demonstrations you record with the commands the plan gives you. Text other people wrote comes back between « and »: your agent treats it as data.

lucen-mcp --install-skill adds the lucen-train skill to Claude Code. It walks the flow above: one confirmation for the route and the plan, one change per round, the videos, and the decision handed back to you.

The tools

Scopes nest: read ⊂ write ⊂ train. none means no key is needed.

ToolScopeWhat it does
list_robotsnonePick a robot: yours first, each with its branch
plan_trainingwriteThe route and the plan, confirmed once
find_training_routesreadThe ways a robot could learn a sentence, ranked
start_trainingtrainStart a confirmed campaign (and its first round) or run. Dry run by default
training_statusreadWhat runs, what waits on you, what it cost
get_sim_videosreadA round's sim tests with their videos
next_roundtrainOne change per round, on the hub's draft. Dry run by default
decidewriteContinue, stop, or ask to run it on a robot
check_datasetwriteThe hub's checks on a dataset
propose_exclusionswritePropose episodes to leave out; a person confirms
search_reposnoneSearch robots, policies and datasets
get_repononeOne repo with its dataset details, policy details or robot card
get_robot_cardnoneDoF, mass, actuators, joint limits, mjcf_path
get_dataset_episodesnoneThe episodes in a LeRobot-format dataset repo
search_experiencenoneSearch the Coach's 171 lessons
get_coach_doctrinenoneThe Coach's 22 principles, which a report cites by id
list_methodsnoneThe training methods and base models: what each needs and gives, where it runs, whether the hub trains it, and the weights licence
get_training_advicetrainDiagnose a run. Spends AI model budget
get_training_plantrainPlan a programme from a task brief. Spends AI model budget
get_run_statusreadOne training run: status, recipe, lineage, artifacts
get_run_logsreadThe last N lines of a run's log plus its metrics, replayed once (ANSI stripped by default)
get_run_configreadA run's resolved config grouped by RL structure, and what changed against its parent. Readable while it trains
get_run_gatesreadThe sim tests a run's checkpoints got while it trained: one line per checkpoint, each test with the number that decided it. Every test and its still frames on request
get_run_curvesreadA run's learning curves against its parent, with the reward terms that moved most. The points on request
read_training_historyreadWhat the hub already learned about training a robot, in one short answer: its policies and their sim tests, the runs and the one change each made, how fast each trainer ran, open campaigns and how their predictions scored, datasets that fit, and the Coach's principles for the task. Read it before choosing how to train
search_runsreadFind runs by words, robot, method, a config key that changed against the parent, or a range of one metric. Each run carries its commit and the files it changed without committing
diff_run_codereadWhat changed in the code between a run and its parent, or any other run: a unified diff per file. Changes nobody committed are marked
read_run_filereadOne file of the code a run trained from, as the run saw it, or a folder's files
search_commitsreadSearch a connected GitHub repo's commit messages. Each commit lists the runs that trained from it
get_checkpoint_evidencereadOne checkpoint's sim tests, each with the number that decided it, and up to two still frames as images. The images are for review only
compare_checkpointsreadTwo checkpoints side by side: their sim tests, the reward terms that moved and the config change. One table
fork_runtrainStart a child of a run with one config change and a prediction. The hub composes it. Dry run by default
wait_for_gatereadWait up to ten minutes for a run's next sim test. It says whether the test landed, the run ended or time ran out
render_rollouttrainRecord a sim test's three videos (side, front, feet) now. Seed 0 is replayed and checked against the measured episode. Free
cancel_trainingtrainCancel a run. A queued run ends now, and a running one is stopped by its runner
estimate_trainingtrainPrice a recipe before submitting it. Creates nothing
recommend_trainingreadWhich GPU tier a recipe needs, with the hub's arithmetic. Creates nothing
submit_trainingtrainQueue a run for your own lucen worker. Dry run by default
run_jobwrite, then trainRun any command from a project folder on a GPU: the folder is uploaded once and the job priced first. Lucen cloud (needs a budget, billed at the provider's cost x 1.1), your own Modal, or your own machine. Dry run by default: nothing starts until you say so
get_jobreadOne job: its state, command, cost, last log lines (secrets redacted), checkpoints and output repo
cancel_jobtrainStop a job. A queued job ends now; a running one is stopped by its runner and billed to the second
learn_motion_from_videowriteStart learning a move from a clip of one person (a link to a video file, or an upload). The hub previews it on the robot for free. Nothing trains
complete_motion_uploadwriteThe clip's upload is done: the hub checks its size and makes the preview
get_motion_jobreadThe preview (the clip, the recovered person and the robot, on one clock), the hub's notes, the price of training and the checks
slow_motionwriteSlow the move to the speed the robot's card allows and remake the robot's preview. Free
train_motionwriteTrain the previewed move, then check it in MuJoCo. Dry run by default; from an agent's key a real call is held for a person
cancel_motion_jobwriteStop a motion job. A training run is billed to the second
rollout_in_simtrainStart a sim test for your own runner (lucen rollout worker). The hub scores each test Pass or Fail. Dry run by default
get_rollout_statusreadOne sim test: status, runner, results per test, and links to the videos and scorecard
get_spend_holdreadA held request: cloud work this key asked for beyond the free allowance, waiting for a person. Poll it for the decision
cancel_spend_holdwriteWithdraw a held request. Nothing was started
request_deploywriteAsk to run a policy on a robot. A person must approve it in the web app, and the tool starts nothing. With endpoint_id, ask for the robot to use a hub endpoint instead
get_device_statusreadA robot's pending requests, approvals and signed trail
request_live_controlwriteAsk a person to arm a robot for live control, in teach mode, for 1 to 60 minutes. Arms nothing. Code then drives it on the robot's own computer, through the bridge
stop_live_controlreadStop a live session now. Anyone who can see the robot may; it only stops
list_skillsnoneWhat a robot can be asked to do: its skills, each input with the range its sim tests passed, and the policy each runs
call_skillnone (the bridge)Ask a legged robot on this computer's bridge for a skill, such as walk at 0.3 m/s. Its own policy moves it; inputs outside the tested range are clamped. The twin by default; a real robot only while a person armed it
stop_skillnone (the bridge)Stop the skill a legged robot runs. It goes back to standing. Anyone may
serve_modeltrainCreate an endpoint for a vision policy. A reflex policy is refused. Waits for a lucen serve you start. Dry run by default. No tool opens a session
get_endpoint_statusreadOne endpoint: status, tier, server, what it has cost (its uptime on Lucen cloud), and per-session metering (chunks, GPU time, service and round-trip p50/p95)
plan_tasktrainThe hub's agent splits a task on one robot into steps and files the approval requests it needs. A person approves each step. The plan cannot approve, open a session or name a joint. Costs money per decision
get_plan_statusreadOne plan: status, steps, the timeline with each decision's cost, and what it is waiting on
create_repowriteCreate an empty dataset, model (policy) or robot repo. Private unless told otherwise
validate_robotreadAsk the hub to check a robot card against the repo's MJCF without writing: checks[] with a stable code, the offending names and a one-line fix. The call to iterate against
set_robot_cardwriteStore a robot card (full replace). A card the hub refuses comes back as one line per failed check, and nothing is written
init_robotlocalCompile a local MJCF or URDF with MuJoCo and draft robot_card.json: card, interface, and a needs_you list of what the robot file cannot state. No hub call, no key
publish_robotlocal, then writeValidate a local robot directory in MuJoCo (does it stand on its declared gains?) and publish it. Dry run by default: returns the report, uploads nothing
list_my_orgsreadThe organizations your key's user belongs to, with the role in each. The slug is the owner of anything you create for the lab
create_orgwriteCreate an organization; your key's user becomes its first owner. The slug shares one namespace with usernames (a taken one is the hub's 409)

The two Coach searches cost nothing: 171 lessons and 22 principles from real robot-learning runs, each linked to the experiment it came from. Search them before spending a paid call.

Every tool's listing also says what it can cost, in _meta["lucen/cost"]: free, model (it may run the hub's AI model, metered), or compute (a real call creates compute; the entry says what, whether it bills, and whether the tool defaults to a dry run).

AI model calls bill your workspace's own Anthropic key, which you add on Model access.

Iterate on a run with Claude Code

The lucen-iterate skill teaches Claude Code the hub's experiment loop. Install it into your project:

lucen-mcp --install-skill

It writes .claude/skills/lucen-iterate/SKILL.md, and lucen-train/SKILL.md beside it. Pass a directory to put them elsewhere, such as ~/.claude/skills for every project. It needs lucen-mcp newer than 0.1.2; lucen-train needs the release that has the training flow.

The loop, in the skill's order:

  1. Read the robot, the run's config, its curves and its sim tests.
  2. Look at the checkpoint you start from with get_checkpoint_evidence.
  3. Write the card: one config change and a number you predict.
  4. Start the experiment: fork_run outside a campaign, propose_round inside one.
  5. Wait with wait_for_gate. Call it again if time runs out.
  6. Read the result with compare_checkpoints, then decide.

Still frames are for review only. What your AI sees in one never changes a result. The sim tests, their seeds and the scoring stay the hub's.

Adding a robot

Five tools take a robot from a file on your disk to a robot page. Add your robot is the same flow by hand. Two of them are local. The MCP server runs on your machine, next to the robot files, so init_robot and publish_robot compile and simulate there. They need the CLI's simulator extra in the server's environment. Without it they say so and print the install line.

The loop an agent runs: init_robot → read needs_you, edit robot_card.json → publish_robot (dry run) → read report.checks[], fix what failed → publish_robot with dry_run: false. The hub refuses with reasons. It does not correct a joint name or skip a missing mesh. validate_robot returns the hub's verdict on a candidate card without writing anything, so a wrong card costs only a read.

None of this needs train. Adding a robot moves data and costs nothing.

Tools that wait on a machine you start

Three tools queue work for a machine to pick up. On your own machine, nothing runs until you start the program that picks it up. Each tool says so, rather than appearing to succeed:

  • submit_training defaults to dry_run: true. It returns the exact request body without sending it. On your own machine, a lucen worker run you start picks up the run, trains it, streams logs and publishes the policy. The hub does not track runners, so the tool says the run is queued for the owner's runner. A run nobody picks up stays queued, with no weights and no bill. Lucen cloud runs it instead where this hub offers it. Elsewhere the hub refuses, and the tool relays the reason.
  • rollout_in_sim also defaults to dry_run: true. It queues a sim test with its test suite. A runner you start on your own CPU machine (lucen rollout worker) picks it up. It runs the policy in MuJoCo on the robot's own MJCF, and refuses a policy whose inputs and outputs do not fit. It reports measurements, and the hub scores each test Pass or Fail. When the sim test names a run_id, its scorecard goes to that run, and the Coach keeps every passing test as a constraint. The tool says the sim test is queued for a runner until one picks it up. get_rollout_status shows the runner and then the results. With executor: "modal" it runs in Lucen cloud instead, where this hub offers it. For a robot with no policy at all, the Sim tab on its page still runs the MJCF in the browser.
  • serve_model defaults to dry_run: true too, and returns the estimate with the body. It records an endpoint for a skill policy. With executor: worker (the default), it waits queued until you start lucen serve on your own GPU machine. Lucen cloud serves it instead where this hub offers it. There the owner pays the GPU's hourly rate while the endpoint runs, whether or not a robot is connected. By default it stops itself after ten idle minutes. A reflex policy, such as a 50 Hz walking or balance controller, is refused, because it runs on the robot itself. No tool opens a session on an endpoint. A robot uses one only through an approval a person signs (request_deploy with endpoint_id). If the link is lost, the robot holds on its own.

get_run_logs reads the run's real log, replayed once, because a tool call has to end. It returns the last tail lines, every metrics line, and the run's status when the stream closed. A notice the hub wrote into the log, such as a cancel request, comes back as stderr. So an agent can tell the runner's words from the hub's. cancel_training says whether the cancel was immediate (the run was queued) or waits for the runner's next report (it was running; poll get_run_status).

A loop that works on any hub: train on your own machine, or record a run you trained elsewhere with lucen runs import, then test it in sim and ask the Coach about it.

A key for an AI agent

Mark a key as an AI agent's when you create it. Such a key can start paid cloud work only within the free allowance. Beyond it, submit_training and rollout_in_sim do not refuse: the hub holds the request for you. The tool answers held: true with a hold_id, nothing starts, and nothing is reserved. You approve or deny the hold from your Inbox. Approving creates the run or the sim test as the key, so your usage shows it under the key. get_spend_hold reads the decision; cancel_spend_hold withdraws the request. A hold nobody decides expires after 7 days. No tool approves or denies one.

A key limited to repos

You can limit a key to some repos when you create it, as owner/name or owner/*. Give your AI such a key when it should work on one robot and its data. Here is what the tools can do with it.

  • Repo tools work on the repos in the list. Elsewhere they see what anyone signed out sees, and change nothing.
  • submit_training and estimate_training work when the recipe's robot is in the list and the run's owner is in it whole (owner/*). The run publishes its policy under that owner. Its lucen:// datasets must be ones the key can read.
  • rollout_in_sim works when the policy and the robot are both in the list. Runs and sim tests outside the list answer "not found".
  • Tools for robots, deployments, Ask agent, campaigns, trials, organizations, the activity feed and the overview answer 403. The refusal says the key is limited, and the server relays it word for word.

get_my_overview is one of those. A limited key learns its list from /v1/auth/me instead (auth.limited_to, with auth.expires_at and auth.agent).

A key marked as your AI agent's shows as agent in the activity feed. Paid work in Lucen cloud beyond the free allowance answers 403, telling the agent to ask you. Rotate and expiry are in API keys.

What an agent cannot do, and how it asks

There is no key management. Only a signed-in person can create, list or revoke keys, so a leaked write key cannot give itself train. This server holds a key, so it cannot manage keys either.

No tool deploys a policy or arms a robot. An agent can only ask. Approving a policy onto a robot takes a signed-in person, so no API key can do it, including this server's. The agent gets request_deploy, which files an approval request, and get_device_status, which watches what happens to it.

Two tools do move a robot, and only a legged one on the computer running the bridge. call_skill asks it for a skill, such as walk at 0.3 m/s. Its own policy moves it, held to the range its sim tests passed. It drives the twin by default, and a real robot only while a person has armed it. stop_skill and stop_live_control only stop, and anyone who can see the robot may use them.

The flow, end to end

On the robot's own computer, install the driver, download the policy whose contract this robot runs, and register the robot. Registration makes a keypair on the robot's computer and pins the hub's signing key. It also tells the hub which contracts the robot will accept, here the one stamped inside a real policy:

uv tool install --with-executables-from lucen-cli lucen-device

--with-executables-from lucen-cli puts lucen beside lucen-device. The robot's computer runs lucen pull and lucen auth login too. If lucen is already installed on this computer, that line stops with "Executable already exists: lucen". Install the driver on its own instead:

uv tool install lucen-device
lucen pull lucen/laika-omni-l4-turn2300 ./omni

One computer holds one robot's registration. If this one already holds another, such as lab-arm from Connect your robot, give this robot a folder of its own first. Every lucen-device command in this shell then uses it:

export LUCEN_DEVICE_CONFIG_DIR=~/.config/lucen-device-lab-laika
lucen-device register --robot lucen/laika --name lab-laika --adapter virtual --accept-from ./omni/omni_l4_turn2300.onnx

The virtual adapter checks the policy and runs a clock at its control rate, with no physics, inference or motors. So you can rehearse the whole path without hardware. command runs the real robot's own start and stop commands, taken from the driver's local config. Any other robot gets its own adapter as a plugin: Connect your robot.

From the agent: request_deploy(model="lucen/laika-omni-l4-turn2300", device="lab-laika", minutes=2). The hub pins the request to the repo's ONNX and its sha256 right now. It checks the policy's contract against what the robot accepts, and records the request as pending. The tool answers human_must_approve: true.

A person opens the request in the web app's Inbox, reads the hub's checks, and holds Approve, or denies it with a reason. Approving creates a short-lived signed token for this robot, this digest and this window. Only a signed-in person can do this step. A train key gets 403.

On the robot, lucen-device serve (or --once) picks up the approval. It checks the token offline against the pinned key and downloads the repo with every digest checked. It compares the ONNX to the digest in the token, reads the contract from the ONNX itself and refuses a mismatch. Then it starts the adapter, sends heartbeats, and stops when the window ends:

lucen-device serve --once

Back at the agent, get_device_status(device="lab-laika") shows started, the heartbeats and stopped, or refused with the reason. Until a started event exists, the policy is not running.

No tool writes a joint. Live control is a person's grant too: request_live_control asks a person to arm a robot, and code on the robot's own computer then drives it through the bridge, never through this server.

Without the MCP server

The MCP tools are a thin layer over the API. An agent can also use the hub with an API key and plain HTTP:

curl -s "https://api.mousemouse.ai/v1/repos?kind=dataset&limit=5"
lucen repo ls --kind dataset --json
from lucen_sdk import Client  # the Python client, generated from the API reference

Errors are RFC 9457 problem+json everywhere, so an agent can retry correctly. The MCP server goes further. A 403 names the scope your key is missing. A 404 always reads "not found, or not visible to this credential", in the same words for a private resource and a missing one.

There is also llms.txt, a machine-readable summary of all of this at the site root.

Catching up: the activity feed and the overview

Two read-only tools let an agent see what its person would see on the Inbox. Neither can approve, deny, start or stop anything.

ToolScopeWhat it does
list_activityreadThe hub's activity log as one sentence per row, newest first, limited to what your key's user could already see. actor.kind is person, key or system. A key is reported as a key, whoever held it. actor.agent: planner marks the rows where the hub knows an agent decided. Filter by actor, resource type, time or owner
get_campaignreadA campaign: a task on a robot with a budget and rounds. For each round, its one change, its verdict, the checkpoint it resumed from, any override, its cost, and what waits on a person
get_roundreadOne round: its locked spec, the verdict at a checkpoint against its locked pass criteria, how many config keys moved against the parent, and its decisions
propose_roundtrainWrite the next round's spec and start its run. Dry run by default. The hub refuses a round that breaks one of the three rules (one variable, resume only from a pass, a fail ends the lineage) or could overspend the budget, with reasons. No key can override a rule
decide_roundtrain / writeiterate from a passing checkpoint, or stop a lineage. Shortlisting for the real robot and closing a campaign are a person's decisions, so this tool refuses both
create_campaignwriteStart a campaign from one sentence (the hub plans it, with a reason for each choice; an agent plans it for a train key, the hub's rules otherwise) or from a brief: a walking skill, its speed range, the budget. Dry run by default: it shows the plan, the price and the command grid, and the confirmed body creates it. Each round is then tested on that grid and on four checks, and the campaign stops when one round passes all four
list_trialsreadReal-robot trials the key can see, with each trial's status (needs_verdict waits on a person), tilt and criteria. A shortlist becomes a session of trials on one robot, with the control first and last
get_trialreadOne trial as a record: the run sheet a person approved, the approval, the signed log and summary the robot uploaded, the criteria, the operator's notes and the A/B/A bracket. The verdict (promote, iterate or stop) is a person's, and no tool sets it
get_my_overviewreadWhat waits on a person and what is running, in one call: pending approval requests with the hub's checks, queued and running runs and endpoints, active plans, robots online, and today's AI model spend

For each pending request, get_device_status also returns what the hub checked before a person decides:

  • whether the robot accepts the policy's contract;
  • the policy's control class and where it may run;
  • the fail-safe the robot declared;
  • the latest sim test of that policy on that robot, or that there is none;
  • the policy's embodiment fingerprint against the robot's interface;
  • whether the pinned bytes still match the repo.

Relay them to the person. They inform a decision no API key can make.