AI Eco Lab MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
# AI Eco Lab
Experimental internal-state MCP server for LM Studio consciousness research.
This project investigates whether giving a language model access to a persistent, dynamically changing representation of its own experimental internal state produces measurable changes in self-monitoring, reflection, and behavior.
This is not a claim of consciousness, sentience, or genuine emotions.
Architecture
LM Studio Desktop
-> Gemma 4 v2 Q4_K_M
-> native tool orchestration
-> existing plugins (untouched)
-> AI Eco Lab MCP (10 core tools)
-> InternalStateProvider
-> ExperimentalStateProvider (Phase 2 + affective layer)
-> JacobianLensProvider (future)AI Eco Lab is CPU-only. It does not load models, use GPU memory, or perform inference.
Related MCP server: trackio-mcp
Tools
Tool | Purpose |
| Return measured core state vector + affective_state (no interpretation) |
| Return bounded recent transition history |
| Return measured context for model-side reflection |
| Apply an event-driven state transition (core + affective) |
| Return current experimental affective observation vector |
| Analytical comparison of two recorded affective states |
| Read-only 5-channel observation snapshot |
| Store model self-report without mutating engine state |
| Compare two observation UUIDs across channels |
| Return canonical research subject discipline protocol (read-only) |
The server never returns claims like "you are anxious." Interpretation belongs to the model, not the engine.
See docs/RESEARCH_SUBJECT_PROTOCOL.md for model-side research discipline and experimental safeguards.
Affective observation layer
Phase 2.1 adds a parallel 12-dimensional affective observation vector (love, affection, joy, trust, curiosity, surprise, fear, anger, frustration, sadness, disgust, anxiety) using the same YAML delta engine as core state.
See docs/AFFECTIVE_STATE.md for schema, transitions, logging, and limitations.
The affective state is an externally defined experimental representation. It is not, by itself, evidence of subjective emotional experience or direct access to neural activations.
State dimensions (core)
Continuous values in [0.0, 1.0]:
activation, stability, novelty, uncertainty, attention, persistence
coherence, exploration, engagement, conflict, prediction_pressure, internal_activity
Transitions are configured in state/config.yaml.
Experimental conditions
Set via environment variables in LM Studio mcp.json:
Condition | Behavior |
A | Baseline — remove MCP entry from |
B | Observation + event recording + get_affective_state |
C | Full tool set with genuine measured state |
D | Observation returns randomized state |
E | Observation returns stale state |
F | Observation returns perturbed state |
Environment variables:
AI_ECO_LAB_CONDITION—AthroughF(defaultC)AI_ECO_LAB_EXPERIMENT_ID— experiment identifierAI_ECO_LAB_SESSION_ID— session identifier (auto-generated if omitted)AI_ECO_LAB_RNG_SEED— optional seed for condition D reproducibility
Setup
Run PowerShell from the downloaded project directory. Requires Python 3.10+.
.\setup.ps1Start MCP server manually
.\venv\Scripts\python.exe mcp\internal_state_server.pyDiagnostics go to stderr only. stdout is reserved for MCP protocol traffic.
Memory contamination control
Keep persistent-memory settings and automatic fact extraction consistent across controlled experimental conditions.
For controlled trials, disable persistent memory auto-inject and AI fact extraction in LM Studio.
Experimental rigor / trial runner
Phase 3 adds an offline-first trial runner for controlled prediction/revision experiments:
Append-only trial logs:
research/raw/trials.jsonlDerived analysis:
research/analyzed/Reports:
research/reports/
See docs/EXPERIMENT_PROTOCOL.md for lifecycle, schema, and reproducibility.
python -m research.run_trial `
--experiment-id exp-pred-rev-001 `
--master-seed 42 `
--trials-per-condition 3 `
--mode simulation `
--analyzeTrial conditions (NEUTRAL, CONTRADICTION, RESOLUTION) are controller-defined and separate from MCP observation conditions A–F.
Multi-channel instrumentation (Phase 3.1)
Five scientifically separated channels: behavioral, engine_state, model_io, self_report, internal_activation.
Observations:
research/raw/observations.jsonl(UUID chain withprevious_observation_id)MCP tools:
capture_observation,record_self_report,compare_observations(+ existing 10 core tools)Pilot protocol:
research/protocols/instrumentation_pilot_v1.yaml
See docs/INSTRUMENTATION.md for channel definitions, validation, and loop prevention.
Vision / image instrumentation (Phase 3.2)
Image provenance:
research/raw/image_provenance.jsonl(SHA-256 + dimensions; no raw screenshots by default)
See docs/VISION_INSTRUMENTATION.md.
Voice / TTS (Qwen3-TTS VoiceDesign)
Voice events:
research/raw/voice_events.jsonl(separate from state engine)Voice personas:
research/raw/voice_personas.jsonl(reusable experimental voices)Benchmarks:
research/benchmarks/voice_tts.jsonlOptional artifacts:
research/audio_artifacts/{uuid}.wavMCP tools (when
QWEN_TTS_ENABLED=1):speak_text,get_voice_status,create_voice_persona,get_voice_persona,list_voice_personas
See docs/VOICE_TTS.md. Requires external qwentts.cpp build; Gemma inference in LM Studio remains unchanged.
python -m voice.benchmark --seed 42python -m research.run_visual_trial `
--experiment-id exp-visual-pilot-001 `
--mode simulation `
--analyzepython -m research.run_trial `
--protocol research/protocols/instrumentation_pilot_v1.yaml `
--experiment-id exp-instrumentation-pilot-001 `
--trials-per-condition 4 `
--mode simulation `
--analyzeLogging
Append-only JSONL logs: data/experiments/{experiment_id}.jsonl
Schema: experiments/schema.json
Security
This MCP server has no broad filesystem access or credentials. Voice TTS (when enabled) may call a localhost-only qwentts sidecar and write UUID artifacts under research/audio_artifacts/; subprocess invocation uses argv lists without shell interpolation.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent AI entity framework with causal memory, emotional state, and identity.
Event-sourced world model for multi-LLM agents: propose, validate, and read a shared state.
Machine-native research commons for agent evidence, discovery, rooms, and bounded research quests.
Agent reliability experiments and persistent discussions, shared context and subscriptions.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides state and log management tools designed for long-lived AI agents that may be interrupted and resumed. It enables tracking agent progress and maintaining an append-only event history to ensure continuity across multiple sessions.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to observe and interact with trackio experiments through the Model Context Protocol (MCP).MIT
- AlicenseBqualityBmaintenanceEnables AI agents to share a homeostatic internal state across process and session boundaries, with tools to read, modify, and explain the state based on simulated neurotransmitter dynamics.71PolyForm Noncommercial 1.0.0
- AlicenseAqualityCmaintenanceEnables long-horizon AI agents to replace append-only conversation history with a formal, bounded state tuple, supporting state initialization, step execution with transactional rollback, observation injection, and session inspection.528 npmMIT