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.0.tar.gz (113.5 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.0-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maple_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 113.5 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.0.tar.gz
Algorithm Hash digest
SHA256 1827a9b6e6eb7b284a2d1ca9d602f58116f62d12d0bed9e10787863a5e9cf074
MD5 897aaf66d42bf336aa884530f848efea
BLAKE2b-256 a037d6f8ab7a5f36d0659bd5f2705fd6ccc959c0d269a61a0c73e4e1a70bcf69

See more details on using hashes here.

Provenance

The following attestation bundles were made for maple_mcp-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: maple_mcp-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8532076d2a7369efd58d70bd01eae72edb6234b4cfd6dcab6dac221222c2dde
MD5 81128b8767911d8a8fa4bcbab48a3b35
BLAKE2b-256 693e85b6ad55739ce0d47abddc1890aca406abfae304cbe29f2b11f2ffc62bcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for maple_mcp-0.1.0-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