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_backend: "vision:MyVision"
  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

Extension Point Mechanism Config Key
Vision detection Subclass VisionBackend operator.vision_backend
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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maple_mcp-0.1.1.tar.gz (113.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maple_mcp-0.1.1-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file maple_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: maple_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 113.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for maple_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b854d9d5189d4267c24286ac5cd7a30fe952c8da2109a06606427f66b52762f1
MD5 ef8148aa53ff24cb368cc4d2b7740513
BLAKE2b-256 dbdba77c33de82cf271fb1a0344097639e5a2bf27d5fa617a1fde57f3b7e41c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for maple_mcp-0.1.1.tar.gz:

Publisher: publish.yml on Goldferret/maple-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maple_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: maple_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 36.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for maple_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2573141d5de77f40e35d6f64f923790713f57a8e2d648a48a4963ad9295f118
MD5 4b82a1ed75d4435bf8aa297ae4eccf92
BLAKE2b-256 7fc33baed90fb7039f605b763d3a83852b042a779b9ec1b635a0556cae569e4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for maple_mcp-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Goldferret/maple-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page