Skip to main content
Glama

Symfony development with Mago, Serena, and AI Mate

A reproducible Docker environment for exploring PHP source, inspecting Symfony services, and diagnosing requests with coding agents. It includes a pinned Symfony Demo application, Mago's PHP tools, Serena's semantic Model Context Protocol (MCP) server, AI Mate inspection tools, and independent checks.

Use it for development in a disposable application or for reproducing the included coding exercises. The integration is experimental: the image includes repository patches to Mago and Serena. See capabilities for supported paths and the scope of their verification.

Get started

Install Git, a host Python 3 interpreter, uv, Node.js for fast tests, and Docker with Compose v2. Host launchers use POSIX user and group IDs; use Linux or a Linux environment such as WSL2. Hosted acceptance runs on Ubuntu. See setup requirements for platform, network, and proxy details.

git clone https://github.com/xormania/mago-serena_v2-poc.git
cd mago-serena_v2-poc
uv sync --frozen --python 3.12.12
./bin/poc fast
./bin/poc up
./bin/poc doctor

The first build compiles Rust software and downloads dependencies; allow several minutes and several GB of memory and disk. No model account or API key is needed for setup and deterministic checks. Open http://localhost:8000/en/blog/.

Edit workspaces/dev/app/, mounted at /app in the container. The checked-in app/ directory is fixture input. Every up invocation runs setup again, replacing the workspace's dev/test databases and .env.local. Save data and local settings before repeating it.

Related MCP server: lsp-mcp

Use the tools

./bin/poc mago --run dev -- analyze --reporting-format json
./bin/poc exec --run dev -- php vendor/bin/phpunit
./bin/poc mate-prepare --run dev
./bin/mate --run dev -- tools:list --format=json

Mago retains native findings and exits; the fixture has existing analysis/lint findings, so analysis can exit 1 while producing a valid report. See daily workflows for lint, fixes, scoped formatting, service-aware analysis, profiler/log inspection, and request repair.

Connect an agent using bin/serena-mcp, an absolute launcher path, and the selected run ID. Model, reasoning, and permission settings belong to your native client. The transcript verifier currently reads Codex JSONL for the rename exercise; client connection and task verification have separate support requirements.

Checks and exercises

Build the image with up before container-based checks.

Purpose

Command

Fast properties, verifier faults, and mocked provider tests

./bin/poc fast

Original application and real MCP/LSP integration without a model

./bin/poc test

Analyze a PHP service with Symfony wiring and behavior checks

./bin/poc slice1

Generate and verify a Symfony console command

./bin/poc slice2

Diagnose and repair a failed HTTP request

./bin/poc slice3

The numbered command names identify existing exercises; users can select them independently. See testing and results for the LSP extension checks, output locations, and differences between replays and agent sessions.

./bin/poc down --run dev          # Stop the service; retain files.
# After saving edits and data elsewhere:
./bin/poc down --run dev --purge  # Delete the workspace; retain artifacts/dev/.

Documentation

The default build contains a patched Mago LSP; Symfony extension contributions still require explicit workspace configuration. The extension reference describes opt-in and baseline differences. A known external-edit span defect has a reproduced failure and restart workaround. Passing its expected-failure check does not establish that the defect is fixed.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP clients to inspect and interact with VS Code virtual workspaces and live editor buffers, including reading, searching, editing, saving, and diagnostics without shell access.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides any MCP-capable coding agent with shared, warm language-server intelligence and project-local configuration, so diagnostics, definitions, references, hover, symbols, code actions, formatting, rename, and sync behave consistently across harnesses and sessions. This lets users switch agent tools without reconfiguring LSP integrations or falling back to CLI verification.
    5 npm
    MIT
  • F
    license
    Not graded
    quality
    A
    maintenance
    Enables MCP clients and AI coding agents to query a running editor instance for real-time LSP diagnostics, symbol/type information, references, file opening, and workspace-wide symbol renaming, avoiding slow tsc/eslint runs.
    -
  • F
    license
    Not graded
    quality
    A
    maintenance
    Enables MCP clients and AI coding agents to pull real-time editor intelligence from a running VSCode instance, including LSP diagnostics and hover/definition/signature info, symbol references with usage context, workspace-wide renames, and file opening across open workspaces. This replaces slow tsc/eslint/build round-trips with instant language-server results over a per-workspace socket.
    -