Serena MCP Server
Provides semantic navigation, analysis, linting, safe fixes, and scoped formatting for PHP source code through the Serena REPL and Mago LSP pipeline.
Supports semantic navigation and analysis of Symfony applications, including the Symfony Demo fixture and compiled-container/service wiring facts via Mate.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Serena MCP Serverstart a Serena REPL session and find all usages of TagsInputType"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 doctorThe 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=jsonMago 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 |
|
Original application and real MCP/LSP integration without a model |
|
Analyze a PHP service with Symfony wiring and behavior checks |
|
Generate and verify a Symfony console command |
|
Diagnose and repair a failed HTTP request |
|
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
Contributing, CI, and Sources and licenses.
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.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted Magento MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
- MaShop MCPOAuthapp.mashop
Build, deploy and manage MaShop e-commerce projects from Claude, Cursor or any MCP client.
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables 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.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides 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 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables 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.-
- FlicenseNot gradedqualityAmaintenanceEnables 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.-