Skip to main content

MAPLE

Model-Agnostic Platform for Laboratory Experiments

MAPLE adds LLM agent capabilities to any MADSci-powered laboratory (v0.5.x) via MCP. Two agents — an Operator for experiment execution and an Overseer for lab monitoring — connect to your lab through configurable MCP servers.

Architecture

MAPLE Architecture

Quick Start

pip install maple-mcp
cd your-experiment/
cp .env.example .env          # Configure MADSci URLs + model provider
maple serve stub              # Start demo (no LLM needed)
maple chat operator           # Open TUI — type anything
maple down                    # Stop all services

For a real LLM experiment:

maple serve operator          # Start with your configured model
maple chat operator           # Run an experiment
maple chat operator --resume  # Pick up where you left off

See examples/block_sorting/ for a complete walkthrough.

Installation

pip install maple-mcp

Requires Python 3.10+ and a running MADSci lab (v0.5.x).

CLI

maple serve {all, operator, overseer, stub, mock} [--dev]
maple chat {operator, overseer} [--resume]
maple down
maple status
maple logs

Configuration

One maple.config.yaml per experiment:

experiment:
  name: My Experiment
  objective: Sort samples by type
  constraints:
    - "Only handle one sample at a time"

operator:
  vision:
    views:
      workspace:
        backend: "vision:MyVision"
        capture:
          node: MyRobot
          action: capture_camera_image
        covers: [MyRobot]
    default_view: workspace
  custom_tools:
    - "my_tools:prepare_sample"
  post_action_hooks:
    - node: AnalysisNode
      action: verify_placement

Infrastructure goes in .env (IPs, API keys, model provider).

Extending MAPLE

Config keys below are dotted paths into maple.config.yaml — e.g. operator.vision.views is the views: key nested under operator: → vision:.

Extension Point Mechanism Config Key
Vision detection/verification Subclass VisionBackend (pure: frames in, results out) — (referenced by a view's backend)
Vision views (scenes + routing) Declare views mapping cameras/nodes to backends operator.vision.views
MCP tools @mcp.tool decorator operator.custom_tools / overseer.custom_tools
Agent hooks extra_hooks param on factory Programmatic
Post-action hooks YAML (no code) operator.post_action_hooks
System prompts Markdown file operator.prompt / overseer.prompt

Supported Models

Provider Environment Variable
OpenAI MODEL_PROVIDER=openai
Anthropic MODEL_PROVIDER=anthropic
Ollama (local, free) MODEL_PROVIDER=ollama

Multi-User

Each device auto-generates a unique identity token. Multiple users can run experiments simultaneously — sessions are isolated automatically.

Programmatic Usage

from maple.operator.agent import create_operator_agent

agent = create_operator_agent("my-session")
result = agent("Sort the colored blocks by color.")

Testing

pytest -m "not integration"                    # Unit tests (no network)
docker compose -f docker-compose.ci.yaml up -d # Start MADSci
pytest -m integration                          # Integration tests

Compatibility

  • Python 3.10+
  • MADSci >=0.5.0, <0.6.0
  • FastMCP 3.x

License

MIT

Release files for maple-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maple-mcp 0.1.2
File Size Uploaded
maple_mcp-0.1.2.tar.gz 121.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for maple-mcp 0.1.2
File Interpreter ABI Platform
maple_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 161.2 kB

Release files / maple_mcp-0.1.2.tar.gz

Download URL maple_mcp-0.1.2.tar.gz
Size 121.4 kB
Tags Source
SHA-256 checksum
How to use checksums
68d6eadae23a17739257811d679be44df4a5b53467910915e64d2ebd1ed4eca4
BLAKE2b-256 checksum
How to use checksums
d53e694df59bf84ccf46344686185443238764320bff20ca2388994dbd4b8b6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / maple_mcp-0.1.2-py3-none-any.whl

Download URL maple_mcp-0.1.2-py3-none-any.whl
Size 39.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
954420d2984a1d0c946e016696d1da15a9c5a842cd40ca3aac8cd1e4de046ef8
BLAKE2b-256 checksum
How to use checksums
039e096d389aa3517b4348f81ae0cf43272e2cb4e361fccc72897ba0f38c6479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page