# Symfony Plugin MCPs

**MCP Tools** (Model Context Protocol) provide AI assistants with structured access to project information like Symfony routes, services, Doctrine entities, and Twig extensions.

### Enabling MCP Server

To use MCP tools, enable the built-in MCP Server in IntelliJ IDEA / PhpStorm:

1. Go to **Settings | Tools | MCP Server**
2. Click **Enable MCP Server**
3. In **Clients Auto-Configuration**, click **Auto-Configure** for each client you want to set up

For more details, see the [official documentation](https://www.jetbrains.com/help/idea/mcp-server.html).

---

## Symfony Profiler Requests MCP Tool

**Feature ID:** `ProfilerRequestsMcpToolset`  
**Date:** 2026-01-14

Lists the last 10 Symfony profiler requests with detailed information about HTTP requests, controllers, routes, templates, and form types used. This MCP tool provides optional filtering by URL, hash, controller, and route name. The tool returns CSV format with columns: `hash`, `method`, `url`, `statusCode`, `profilerUrl`, `controller`, `route`, `template`, `formTypes`.

---

## Symfony Service Definition Generator MCP Tool

**Feature ID:** `ServiceDefinitionMcpToolset`  
**Date:** 2026-01-17

Generates Symfony service definitions in YAML or XML format for a given PHP class. This MCP tool analyzes a class constructor to identify dependencies and creates service arguments for explicit wiring. The tool supports both YAML (default) and XML output formats, with options to use the class name as service ID or generate a short ID. **YAML example:** **XML example:**

---

## Symfony Routes MCP Tool

**Feature ID:** `RouteMcpToolset`  
**Date:** 2026-01-11

Lists Symfony routes with their controller mappings and file paths. This MCP tool provides access to routes configured in the Symfony project with optional filtering by route name or controller. The tool returns CSV format with columns: `name`, `controller`, `path`, `filePath`.

---

## Twig Template Variables MCP Tool

**Feature ID:** `TwigTemplateVariablesMcpToolset`  
**Date:** 2026-03-01

Lists all variables available in a Twig template with their PHP types and first-level accessible properties. Accepts a template name or a project-relative file path. Variables are collected from controller render calls, Twig `{% types %}` tags, and `{% @var %}` annotations.

---

## Symfony URL to Route Matching MCP Tool

**Feature ID:** `RoutePathMcpToolset`  
**Date:** 2026-01-11

Matches a plain request URL to Symfony routes using reverse pattern matching. This MCP tool finds routes that could handle a given URL path by matching against route patterns with placeholders. The tool returns CSV format with columns: `name`, `controller`, `path`, `filePath`.

---

## Symfony UX Twig Components MCP Tool

**Feature ID:** `TwigComponentMcpToolset`  
**Date:** 2026-02-28

Lists Symfony UX Twig components and their composition metadata. This MCP tool provides access to all Twig components with their templates, syntax variants, props, and blocks. Supports partial component name search (case-insensitive).

---

## Doctrine Entity Fields MCP Tool

**Feature ID:** `DoctrineEntityFieldsMcpToolset`  
**Date:** 2026-01-11

Lists all fields of a Doctrine entity as CSV. This MCP tool provides detailed field information for a specific entity class including field names, column names, types, and relations. The tool returns CSV format with columns: `name`, `column`, `type`, `relation`, `relationType`, `enumType`, `propertyType`.

---

## Symfony Form Types MCP Tool

**Feature ID:** `FormTypeMcpToolset`  
**Date:** 2026-01-11

Lists all Symfony form types configured in the project. This MCP tool provides access to form type aliases, class names, and their file locations. The tool returns CSV format with columns: `name`, `className`, `filePath`.

---

## Symfony Service Container MCP Tool

**Feature ID:** `ServiceMcpToolset`  
**Date:** 2026-01-11

Locates where a Symfony service is defined in configuration files by service name or class name. This MCP tool provides access to service definitions with their file paths and line numbers. The tool returns CSV format with columns: `serviceName`, `className`, `filePath`, `lineNumber`.

---

## Symfony Form Type Options MCP Tool

**Feature ID:** `FormTypeOptionsMcpToolset`  
**Date:** 2026-01-14

Lists all available options for a specific Symfony form type. This MCP tool provides detailed information about option names, their types (DEFAULT, REQUIRED, DEFINED), and the source classes that define them. The tool accepts a form type name or FQN and returns CSV format with columns: `name`, `type`, `source`.

---

## Twig Template Usages MCP Tool

**Feature ID:** `TwigTemplateUsageMcpToolset`  
**Date:** 2026-02-28

Lists usages of Twig templates across the project. This MCP tool finds all locations where a template is used, including controllers, includes, extends, embeds, and more. Accepts a partial template name or a project-relative file path (e.g. `"templates/home/index.html.twig"` resolves to `"home/index.html.twig"`). **Includes Symfony route information:** For templates rendered by controllers, the output includes the associated route name and path.

---

## Doctrine Entities MCP Tool

**Feature ID:** `DoctrineEntityMcpToolset`  
**Date:** 2026-01-11

Lists all Doctrine ORM entities in the project as CSV. This MCP tool provides access to all configured Doctrine entities with their class names and file paths. The tool returns CSV format with columns: `className`, `filePath`.

---

## Symfony Console Commands MCP Tool

**Feature ID:** `CommandMcpToolset`  
**Date:** 2026-01-11

Lists all Symfony console commands available in the project. This MCP tool provides access to configured console commands with their class names and file paths. The tool returns CSV format with columns: `name`, `className`, `filePath`.

---

## Twig Extensions MCP Tool

**Feature ID:** `TwigExtensionMcpToolset`  
**Date:** 2026-01-11

Lists available Twig template extensions for code generation and template assistance. This MCP tool provides unified access to all Twig extensions including filters, functions, tests, and tags. The tool returns CSV format with columns: `extension_type`, `name`, `className`, `methodName`, `parameters`.

---

