Skip to main content
Glama

Autonomous Lab

Website PyPI License

MCP server that turns any senior-junior workflow into an autonomous loop. AI handles the execution. You make the decisions.

Vision

The bottleneck in knowledge work has never been execution. It is judgment -- knowing which questions matter, which results are meaningful, which directions to pursue. The people best equipped to make those calls spend most of their time on tasks that don't require their specific expertise.

Autonomous Lab shifts the hierarchy up by one level. AI agents assume the working roles -- principal investigator and trainee, tech lead and developer, attending and resident -- running the full design-execute-review loop. The human moves into the editorial position: the one who curates, judges, and steers. Your taste and judgment, rather than your labor, become the primary input.

This is not a copilot. It is a reorganization of the work unit itself.

Related MCP server: Jules AI MCP Server

Why this exists

Autonomous Lab is an MCP server. It runs inside the coding agent you already pay for -- Cursor, Claude Code, Windsurf, Codex CLI, or any MCP-compatible client. That means:

  • No API key required. You don't need an OpenAI/Anthropic/Google key. The intelligence comes from whichever model your coding tool already uses.

  • No extra cost. Your existing Cursor Pro, Claude Max, Windsurf, or Codex subscription is all you need. You are reusing an investment you have already made.

  • No new app to learn. It plugs into your current workflow as a set of MCP tools.

Install

The easiest way: copy this page link into Claude Code, Cursor, or any coding agent and ask it to install Autonomous Lab for you. It will handle everything.

Or do it manually:

Add to your MCP client config (e.g. Cursor ~/.cursor/mcp.json):

{
  "mcpServers": {
    "autonomous-lab": {
      "command": "uvx",
      "args": ["autonomous-lab"],
      "timeout": 600,
      "env": {
        "MCP_WEB_PORT": "8766"
      }
    }
  }
}

Or if you installed via uv pip install:

{
  "mcpServers": {
    "autonomous-lab": {
      "command": "autonomous-lab",
      "timeout": 600,
      "env": {
        "MCP_WEB_PORT": "8766"
      }
    }
  }
}

Then tell your agent: "Initialize an autonomous lab project on [your topic]."

What it does

Two AI personas (senior + junior) iterate on your project in a loop. They design, execute, write, and revise. You sit above them as the decision maker: editor, code reviewer, creative director, or whatever the domain calls for.

The loop:

autolab_next → (AI acts as role) → autolab_record → lab_meeting → autolab_next → ...

When work is ready, you review it. Accept, request revisions, or reject. The loop continues until you're satisfied.

Key capabilities

  • Zero additional cost: runs on your existing coding agent subscription. No separate API keys, no usage-based billing, no new accounts.

  • Multi-agent orchestration: opt-in mode where each role (PI, Trainee, Reviewer) runs as a separate agent with its own context window. Uses your existing CLI subscriptions (Claude Code, Codex CLI, Cursor) -- no API keys needed. Falls back to single-agent on any failure.

  • Auto skill learning: agents acquire missing skills on the fly. When a character needs a skill it doesn't have, the engine searches a tiered cascade — character marketplace → GitHub → ToolUniverse (1000+ scientific tools) → auto-generate — and installs a SKILL.md without breaking the loop. The research never stalls because of a missing capability.

  • Skill containers: configure characters with any combination of SKILL.md files you already have. A PI with scanpy + scientific-writing + statistical-analysis skills behaves differently from a Tech Lead with react + typescript + code-review skills.

  • 24-hour sessions: the loop runs indefinitely. No timeout, no context loss. Sessions persist across disconnects with autolab_resume.

  • Fully configurable: YAML character profiles control personality, expertise, goals, and available tools. Swap them in seconds.

  • Domain-agnostic: research, software, consulting, legal, medical, creative, or anything with a senior-junior structure.

  • Expert consultation: invite domain specialists mid-session for one-off advice without breaking the loop.

  • Verified citations: built-in CrossRef integration for real, validated references (no hallucinated papers).

  • Game-style monitoring UI: browser dashboard shows live progress, iteration history, and editorial controls.

MCP tools

Tool

What it does

autolab_init

Initialize a new project

autolab_resume

Resume an interrupted session

autolab_next

Get the next role prompt (PI or Trainee)

autolab_record

Record a completed turn

autolab_status

Check project state

autolab_cite

Search, validate, and format citations

autolab_consult

Invite a domain expert

autolab_editorial

Wait for editor decision

autolab_editor_act

Execute editorial decision (AI fallback)

autolab_acquire_skill

Search marketplace/ToolUniverse for a skill and install it

autolab_create_character

Build a character profile

lab_meeting

Pause for user feedback between turns

Character example

name: Dr. Maria Chen
role: pi
title: Computational Biology PI
expertise: single-cell genomics, machine learning
goal: discover cell-type-specific regulatory programs
skills:
  - scanpy
  - scvi-tools
  - scientific-writing
  - statistical-analysis
personality:
  - "Visionary: spots novel research directions"
  - "Rigorous: demands statistical reproducibility"

Multi-agent mode

By default, a single AI agent plays all roles in sequence. Multi-agent mode spawns a dedicated agent for each role, giving each a fresh context window. Enable it in .autolab/config.yaml:

orchestration: multi

agents:
  pi:
    provider: claude-cli   # Uses your Claude Code subscription
    model: opus
  trainee:
    provider: claude-cli
    model: sonnet

Multiple trainees

A PI can have multiple trainees working on different tasks in parallel. Each trainee gets its own context window and focus area:

orchestration: multi

agents:
  pi:
    provider: claude-cli
    model: opus
  trainees:                              # plural key
    - name: "Data Analyst"
      provider: claude-cli
      model: sonnet
      focus: "data analysis, statistics, figure generation"
    - name: "Writer"
      provider: codex-cli
      model: o3
      focus: "paper writing, LaTeX, literature review"
    - name: "Code Developer"
      provider: cursor-cli
      model: sonnet-4
      focus: "script development, testing, reproducibility"

All trainees run in parallel via asyncio.gather. Each sees a scoped prompt with their focus area and coordination notes about what the other trainees are handling. If one fails, the others continue.

Agent teams (Claude Code)

When running inside Claude Code with agent teams enabled (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1), multi-agent mode automatically upgrades to native agent teams. The PI becomes the team lead in delegate mode, trainees become teammates with their own context windows, and they coordinate via shared task lists and direct messaging. No extra config needed -- the same orchestration: multi config works for both modes.

Optional team-specific settings:

team:
  delegate_mode: true          # PI only coordinates, doesn't implement
  require_plan_approval: false  # Require PI approval before trainees act

Supported providers

Provider

Cost

Requires

claude-cli

Free (Pro/Max sub)

Claude Code CLI installed

codex-cli

Free (Plus/Pro sub)

Codex CLI installed

cursor-cli

Free (Pro/Biz sub)

Cursor Agent CLI installed

anthropic

Pay-per-token

ANTHROPIC_API_KEY env var

openai

Pay-per-token

OPENAI_API_KEY env var

CLI providers are the primary path -- they need zero API key configuration. If the CLI binary is not found or multi-agent fails for any reason, it falls back to single-agent mode automatically.

For API providers, install the optional dependencies:

pip install 'autonomous-lab[multi-agent]'

Remote / SSH environments

The monitoring web UI binds to 127.0.0.1 by default (local only). On a remote server, SSH session, or container, the UI will attempt to auto-detect and bind to 0.0.0.0 instead. If auto-detection doesn't match your setup, use one of the methods below.

Method 1: Environment variable (recommended)

Set MCP_WEB_HOST to 0.0.0.0 in your MCP config:

{
  "mcpServers": {
    "autonomous-lab": {
      "command": "uvx",
      "args": ["autonomous-lab"],
      "timeout": 600,
      "env": {
        "MCP_WEB_HOST": "0.0.0.0",
        "MCP_WEB_PORT": "8766"
      }
    }
  }
}

Then open http://<remote-host-ip>:8766/lab in your local browser.

Method 2: SSH port forwarding

Keep the default config (127.0.0.1) and forward the port:

ssh -L 8766:localhost:8766 user@remote-host

Then open http://localhost:8766/lab locally.

Variable

Purpose

Default

MCP_WEB_HOST

Bind address

auto-detected (0.0.0.0 if SSH/container, else 127.0.0.1)

MCP_WEB_PORT

Web UI port

8765

Requirements

  • Python >= 3.11

  • An MCP-compatible client (Cursor, Claude Code, Codex CLI, Windsurf, etc.)

Acknowledgments

Autonomous Lab builds on these open-source projects:

License

Apache 2.0. See LICENSE and NOTICE.

Available Tools

19 tools
autolab_acquire_skillAutolab Acquire SkillA

Search the character marketplace for a skill and acquire it.

When the PI or Trainee encounters a skill gap during the loop, call this tool BEFORE attempting to build it from scratch. It checks the published character registry for any character that already has the needed skill.

Inputs: skill_name, project_directory. Returns: result

autolab_citeAutolab CiteA

Look up, search, and validate citations using CrossRef API.

This tool ensures that ALL citations in the paper are real, verified papers with correct metadata. Use it for:

  1. search: Find real papers on a topic → returns verified BibTeX entries ready to paste into references.bib.

  2. doi: Convert a known DOI to a properly formatted BibTeX entry.

  3. validate: Check an existing .bib file — verify DOIs resolve, find entries missing DOIs, and suggest corrections.

CRITICAL RULE FOR CITATIONS:

  • NEVER invent or fabricate citation entries. ALWAYS use this tool to get verified BibTeX from CrossRef.

  • EVERY \cite{key} in the paper MUST have a corresponding entry in references.bib that was retrieved via this tool.

  • When writing a paper section, first search for relevant papers, add their BibTeX to references.bib, THEN cite them in the text.

Inputs: count, query, action, from_year, +1 more. Returns: result

autolab_consultAutolab ConsultA

Invite a domain expert for a one-time consultation during a PI turn.

The PI can call this to get advice from a specialist on a specific topic. The AI should then role-play as that expert and provide their insight, then continue the PI turn normally.

This does NOT interrupt the loop — it's a synchronous consultation within the current PI turn. The expert appears in the monitoring UI sidebar.

Inputs: question, expert_name, expert_role, expert_avatar, +2 more. Returns: result

autolab_create_characterAutolab Create CharacterA

Create a character profile for the Autonomous Lab research team.

A character is a YAML persona backed by Cursor agent skills that controls how the AI behaves during research sessions. Characters can be:

  • Deployed locally as a PI or Trainee profile

  • Published to GitHub for the marketplace

  • Used as consultants or reviewers during editorial review

Each character is a self-contained folder with this structure:

autolab-char-<name>/
├── character.yaml          # Profile (name, role, skills, personality)
├── README.md               # Description for marketplace
└── skills/                 # Skill definitions (SKILL.md files)
    ├── <skill-name>/
    │   └── SKILL.md        # Detailed instructions for this skill
    └── ...

Use list_skills=True or list_avatars=True to discover options first.

Workflow:

  1. Call with list_skills=True to see available skills by domain.

  2. Call with all fields filled to generate the character folder.

  3. Optionally set github_repo to initialize a GitHub repo and push.

Inputs: goal, name, role, title, +9 more. Returns: result

autolab_editor_actAutolab Editor ActA

Execute an editorial decision made by the AI editor (after timeout).

Called by the AI after autolab_editorial returns an AI-editor prompt due to the human editor not responding within the configured timeout.

Actions:

  • desk_reject: reject without review, feedback required

  • invite_reviewers: send to peer review, reviewers JSON required

  • accept / minor_revision / major_revision / reject: final decision after reviews

Returns instructions to continue the loop.

Inputs: action, feedback, reviewers, project_directory. Returns: result

autolab_editorialAutolab EditorialA

Wait for the Editor (user) to act on the submitted manuscript.

Call this in two scenarios:

  1. After PI submits a manuscript (autolab_record with status='ready_for_review'). Waits for the editor to either Desk Reject or Invite Reviewers.

  2. After all reviewer reports are complete. Waits for the editor to make a final decision (Accept/Minor/Major/Reject).

This tool BLOCKS until the editor acts OR the configured timeout expires (default 30 min, configurable via editor_timeout_minutes in config.yaml, set to 0 to wait forever). When timeout expires, returns an AI Editor prompt — you must then act as editor and call autolab_editor_act.

Inputs: project_directory. Returns: result

autolab_initAutolab InitA

Initialize an Autonomous Lab project.

Creates .autolab/ directory with state, profiles, and meeting log. Creates paper/ directory with LaTeX template. Creates working directories: data/, scripts/, figures/, results/. Opens the game-style monitoring UI in the browser.

If an existing project is found, returns a warning and suggests calling autolab_resume instead. Set force_new=True to overwrite.

Inputs: idea, title, domain, force_new, +1 more. Returns: result

autolab_nextAutolab NextB

Get the next role prompt for the Autonomous Lab session.

Reads the current state to determine whose turn it is (PI or Trainee), assembles context (idea, profiles, meeting history, file listings), and returns a detailed role prompt.

The AI should then follow the returned prompt exactly, acting as the specified role (PI or Trainee).

MANDATORY LOOP PROTOCOL — the lab NEVER stops:

Inputs: project_directory. Returns: result

autolab_recordAutolab RecordA

Record a completed turn. Non-blocking — updates state and returns immediately.

The monitoring UI (opened by autolab_init) auto-refreshes to show progress. User feedback is optional and picked up in the next autolab_next call.

This tool:

  1. Saves the turn to meeting_log.md

  2. Updates state.json (advance iteration, flip role, store status)

  3. Compresses old meetings every 6 turns

Call this AFTER completing your role actions (as PI or Trainee).

CRITICAL LOOP PROTOCOL — you MUST follow the MANDATORY NEXT STEPS in the return message:

  • Normal turns: call lab_meeting, then autolab_next.

  • Submission/editorial: call autolab_editorial (blocks until editor acts).

  • NEVER stop. NEVER end your turn. The loop runs indefinitely.

Inputs: role, status, content, summary, +2 more. Returns: result

autolab_recruitAutolab RecruitA

Recruit characters for the project team.

Called by PI during the recruiting phase (iteration 0). Searches marketplace for matching characters, clones them, and initiates skill learning for missing skills.

Inputs: characters, project_directory. Returns: result

autolab_resumeAutolab ResumeA

Resume an interrupted Autonomous Lab session.

Call this when the AI agent was disconnected, the process crashed, or a new conversation is started for an existing project.

This tool:

  1. Loads the full saved state (iteration, role, status, progress, editorial)

  2. Reads the last several meeting log entries to reconstruct context

  3. Lists all existing files (scripts, figures, paper sections)

  4. Opens the monitoring UI

  5. Returns a comprehensive briefing so the AI can continue seamlessly

After this returns, follow the MANDATORY NEXT STEPS to re-enter the loop.

Inputs: project_directory. Returns: result

autolab_skill_statusAutolab Skill StatusB

Return current skill certification status for all characters.

Inputs: project_directory. Returns: result

autolab_statusAutolab StatusB

Get the current status of an Autonomous Lab project.

Returns the current state, file listings, paper progress, and a summary of recent meetings.

Inputs: project_directory. Returns: result

autolab_tools_configureAutolab Tools ConfigureB

Configure ToolUniverse for this project.

Saves settings to .autolab/tools_config.json.

Inputs: api_key, api_url, enabled, prefer_local, +1 more. Returns: result

autolab_tools_installAutolab Tools InstallA

Install the ToolUniverse SDK (one-time setup).

Installs the tooluniverse Python package for local tool execution. Without it, tools still work via the HTTP API at aiscientist.tools.

Inputs: from_source. Returns: result

autolab_tools_statusAutolab Tools StatusA

Check whether the ToolUniverse SDK is installed and available.

ToolUniverse provides 1000+ scientific tools (ML models, datasets, APIs, analysis packages) from https://aiscientist.tools.

Returns JSON with: installed (bool), version, enabled, api_url.

Inputs: project_directory. Returns: result

get_system_infoGet System InfoC

獲取系統環境資訊

Inputs: no named parameters. Returns: result

lab_meetingLab MeetingA

Pause briefly between lab turns to show the monitoring UI and collect optional feedback.

This opens/refreshes the game-style lab monitoring UI in the browser. It pauses for a short period (default 15s) during which the user can optionally type feedback through the lab UI's feedback panel.

Call this after EVERY autolab_record call during normal lab turns.

LOOP PROTOCOL (normal turns): autolab_next -> (act as role) -> autolab_record -> lab_meeting -> autolab_next -> ...

DO NOT use this for editorial submission waits. Use autolab_editorial instead.

After this tool returns, ALWAYS call autolab_next to continue. NEVER stop the loop.

Inputs: summary, timeout, project_directory. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 19 tools

    Disambiguation4/5

    Most tools map to distinct lifecycle stages (init, resume, next, record, editorial, editor_act) and their descriptions explicitly disambiguate near-neighbors like lab_meeting vs autolab_editorial. Some residual overlap exists: autolab_record vs lab_meeting both fire every turn, and the character/skill cluster (recruit, create_character, acquire_skill, skill_status) plus three separate 'status' tools require careful reading to choose correctly.

    Naming Consistency4/5

    The dominant pattern is a clean autolab_ verb_noun snake_case convention, applied consistently across the loop, editorial, tools, and character groups. Two outliers break it: get_system_info (no prefix) and lab_meeting (different prefix), though both remain readable and unambiguous.

    Tool Count4/5

    19 tools sit at the upper end but are justified by covering five genuinely distinct sub-domains (loop control, editorial workflow, ToolUniverse integration, citation management, character/skill management). A few could arguably be consolidated — the four autolab_tools_* calls and the three status calls could collapse — but nothing is clearly redundant.

    Completeness4/5

    The core research loop is fully covered end-to-end (init, resume, next, record, meeting, consult, recruit, cite, editorial, editor_act), with no dead ends in the main workflow. Minor gaps remain: no project cleanup/delete or reset beyond force_new, no character listing/publishing tool despite create_character advertising GitHub publication, and no explicit ToolUniverse tool-execution call.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables multi-agent AI collaboration by connecting Claude Code, OpenAI Codex, and Google Antigravity, providing cross-model code reviews, independent second opinions, and autonomous validation through MCP tools.
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables developers to delegate asynchronous coding tasks to a cloud-based autonomous agent, creating tasks, reviewing and approving execution plans, sending feedback, monitoring sessions, and retrieving diffs and Pull Requests directly from an MCP-compatible IDE. It also supports configurable mock mode for local testing without consuming API credits.
      7
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to perform software development tasks such as codebase analysis, research, planning, requirements and user-story generation, task management, project scaffolding, and multi-step workflow execution. It integrates with MCP-compatible clients like Claude Desktop, Cursor, and Cline AI.
      30 npm
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables a lead AI agent to spawn and coordinate manager agents, which can in turn run child agents across Codex/ChatGPT, Google Antigravity, Claude Code, and local OpenAI-compatible models. Provides messaging, waiting, transcripts, file exchange, and saved-conversation adoption so multi-agent workflows can be orchestrated from MCP hosts.
      14
      MIT