PHPackages                             mittwald/smart-extension-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mittwald/smart-extension-builder

ActiveTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

mittwald/smart-extension-builder
================================

MCP server for TYPO3 extension development

v0.1.0(1mo ago)92↓100%[1 PRs](https://github.com/mittwald/typo3-smart-extension-builder/pulls)MITPHPPHP ^8.4CI passing

Since Jan 6Pushed 3w ago1 watchersCompare

[ Source](https://github.com/mittwald/typo3-smart-extension-builder)[ Packagist](https://packagist.org/packages/mittwald/smart-extension-builder)[ RSS](/packages/mittwald-smart-extension-builder/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (8)Versions (8)Used By (0)

Smart Extension Builder
=======================

[](#smart-extension-builder)

The Smart Extension Builder is a TYPO3 extension that accelerates TYPO3 extension development through AI-powered code generation. Its main component is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server. Built on top of the [friendsoftypo3/kickstarter](https://github.com/FriendsOfTYPO3/kickstarter) package, this MCP server exposes powerful scaffolding tools to AI assistants like Claude Code, Cursor, or OpenCode.

License
-------

[](#license)

This project is licensed under the MIT License; see the [LICENSE](LICENSE) file for details.

Quickstart
----------

[](#quickstart)

This tool is meant to be used as part of your local development environment. It requires a local TYPO3 Composer project, and an AI assistant that supports MCP.

To get started:

1. [Install the Smart Extension Builder](#installation)
2. [Configure your AI assistant](#setup-with-ai-tools)
3. [Learn about use cases](#use-cases) and [use the tools](#available-tools-reference)

Features
--------

[](#features)

This MCP server provides specialized tools for TYPO3 extension development, plus contextual resources for better code generation:

### Extension Management

[](#extension-management)

- **Extension Creation** - Scaffold new TYPO3 extensions with proper structure
- **Site Package Creation** - Generate complete site packages with templates and configuration
- **Dependency Injection** - Create and update Services.yaml configuration

### Domain Layer

[](#domain-layer)

- **Domain Models** - Generate Extbase domain models with properties and annotations
- **Repositories** - Create Extbase repository classes
- **Validators** - Build custom Extbase validators (Model and Property types)

### Controllers &amp; Actions

[](#controllers--actions)

- **Controllers** - Scaffold Extbase controllers with action methods and Fluid templates
- **Plugins** - Create frontend plugins with controller-action mappings
- **Backend Modules** - Generate backend modules with Extbase integration

### Data Persistence

[](#data-persistence)

- **Database Tables** - Define database tables with TCA configuration
- **Upgrade Wizards** - Create upgrade wizards for data migrations

### Extension Points

[](#extension-points)

- **PSR-14 Events** - Define custom PSR-14 event classes
- **Event Listeners** - Implement PSR-14 event listener classes
- **Middleware** - Create HTTP middleware for request/response processing
- **Type Converters** - Build Extbase type converters for custom data types
- **Console Commands** - Generate Symfony Console commands

### Site Configuration

[](#site-configuration)

- **Site Sets** - Create TYPO3 site set configurations
- **Site Settings** - Define site settings with categories and validation

### Localization &amp; Testing

[](#localization--testing)

- **Language Files** - Create/extend XLF translation files
- **Test Environment** - Set up PHPUnit testing infrastructure

### Contextual Resources

[](#contextual-resources)

- **TCA Reference** - Access complete Table Configuration Array for all database tables available in your TYPO3 installation
- **ViewHelper Documentation** - Reference all available Fluid ViewHelpers with documentation

Use Cases
---------

[](#use-cases)

### AI-Powered Extension Development

[](#ai-powered-extension-development)

Use AI assistants to rapidly prototype and build TYPO3 extensions:

- "Create a blog extension with Post and Comment models"
- "Add a backend module to manage blog posts"
- "Create an event for post publication with email notification listener"

### Learning TYPO3 Development

[](#learning-typo3-development)

AI assistants can explain TYPO3 concepts while generating proper code:

- "Explain Extbase repositories and create one for managing products"
- "Show me how middleware works and create one for API authentication"

### Migration &amp; Refactoring

[](#migration--refactoring)

Accelerate migration projects:

- "Create upgrade wizards to migrate from old to new data structure"
- "Generate database tables for these legacy entities"

### Rapid Prototyping

[](#rapid-prototyping)

Quickly scaffold extension components to validate ideas:

- "Create a plugin that displays recent articles"
- "Add a command to import data from CSV"

Prerequisites
-------------

[](#prerequisites)

- A local (!) TYPO3 v12 or v13 installation (in Composer mode). Using DDEV is recommended.
- An agentic coding assistant with MCP support (like Claude Code or Cursor).

Installation
------------

[](#installation)

### 1. Install via Composer

[](#1-install-via-composer)

If your TYPO3 installation uses Composer mode (recommended):

```
# Install the extension
composer require mittwald/smart-extension-builder

# Or, in DDEV:
ddev composer require mittwald/smart-extension-builder
```

### 2. Activate the Extension

[](#2-activate-the-extension)

```
# Via CLI
vendor/bin/typo3 extension:setup

# Or, in DDEV:
ddev typo3 extension:setup
```

### 3. Start the MCP Server

[](#3-start-the-mcp-server)

The extension includes an MCP server command:

```
vendor/bin/typo3 extension:dev-mcp-server

# Or, in DDEV:
ddev typo3 extension:dev-mcp-server
```

The server will start and listen for MCP client connections on stdin/stdout.

Setup with AI Tools
-------------------

[](#setup-with-ai-tools)

### Claude Code

[](#claude-code)

Claude Code has native MCP support. Add the server to your Claude Code configuration using the `claude mcp add` command (run the command from within your project directory):

```
$ claude mcp add --transport stdio typo3_ext_dev vendor/bin/typo3 extension:dev-mcp-server
```

If you're running your project in DDEV, use the following version instead:

```
$ claude mcp add --transport stdio typo3_ext_dev ddev typo3 extension:dev-mcp-server

```

After configuration:

1. Restart Claude Code
2. The TYPO3 development tools will be automatically available
3. Verify by asking: "What TYPO3 development tools do you have available?"

Read more about [adding MCP servers to Claude Code](https://code.claude.com/docs/en/mcp).

#### Claude Code / OpenCode Skills

[](#claude-code--opencode-skills)

This package includes skills that guide you through common TYPO3 development workflows. These skills are compatible with both Claude Code and OpenCode.

**Available skills:**

- `/typo3-extension` - Step-by-step guide for creating complete TYPO3 extensions with domain models, controllers, plugins, and Fluid templates
- `/typo3-sitepackage` - Workflow for kickstarting TYPO3 site packages with templates, site sets, and configuration

**Installation:**

Install the skills to your project's `.claude/skills/` directory using the CLI command:

```
vendor/bin/typo3 extension:install-skills

# Or, in DDEV:
ddev typo3 extension:install-skills
```

After installation, type the skill name (e.g., `/typo3-extension`) in Claude Code or OpenCode and follow the guided workflow.

### Cursor

[](#cursor)

Cursor supports MCP through a `mcp.json` file, either in your home directory (`~/.cursor/mcp.json`), or in your project directory (also `.cursor/mcp.json`).

Since the TYPO3 development MCP server is best configured on a per-project basis, create a `.cursor/mcp.json` file within your current project directory:

```
{
  "mcpServers": {
    "typo3-dev": {
      "command": "vendor/bin/typo3",
      "args": ["extension:dev-mcp-server"]
    }
  }
}
```

Alternatively, if you're using DDEV:

```
{
  "mcpServers": {
    "typo3-dev": {
      "command": "ddev",
      "args": ["typo3", "extension:dev-mcp-server"]
    }
  }
}
```

After configuration, Cursor should automatically detect the new configuration and suggest enabling the MCP server.

Read more about [adding MCP servers to Cursor via the configuration file](https://cursor.com/docs/context/mcp#using-mcpjson).

### OpenCode

[](#opencode)

OpenCode supports MCP servers in its [main configuration file](https://opencode.ai/docs/config/). The relevant section of an `opencode.jsonc` file might look like this:

```
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "typo3-dev": {
      "type": "local",
      "command": ["vendor/bin/typo3", "extension:dev-mcp-server"],
      "enabled": true
    }
  }
}
```

Alternatively, if you're using DDEV:

```
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "typo3-dev": {
      "type": "local",
      "command": ["ddev", "typo3", "extension:dev-mcp-server"],
      "enabled": true
    }
  }
}
```

Read more about [configuring MCP servers in OpenCode](https://opencode.ai/docs/mcp/).

Usage Examples
--------------

[](#usage-examples)

Once configured, you can use natural language with your AI assistant to scaffold TYPO3 code:

### Creating an Extension

[](#creating-an-extension)

```
Create a new TYPO3 blog extension called "my_blog"

```

### Building a Domain Model

[](#building-a-domain-model)

```
Create a Post model for my_blog extension with these properties:
- title (string, required)
- content (text)
- publishDate (DateTime)
- author (string)
- tags (ObjectStorage)

```

### Adding a Plugin

[](#adding-a-plugin)

```
Create an Extbase plugin named "BlogList" for the my_blog extension
that displays recent blog posts using the PostController's listAction

```

### Creating a Backend Module

[](#creating-a-backend-module)

```
Add a backend module to my_blog extension for managing posts.
Use the PostController with list, show, new, create, edit, and update actions.
Place it in the "web" section.

```

### Setting Up Localization

[](#setting-up-localization)

```
Create language file locallang.xlf for my_blog with these labels:
- blog.title: "Blog Posts"
- blog.readMore: "Read more"
- blog.author: "Author"

```

### Adding Middleware

[](#adding-middleware)

```
Create a frontend middleware called "BlogStatisticsMiddleware" for my_blog that tracks post views. It should run after typo3/cms-frontend/authentication.

```

### Generating Tests

[](#generating-tests)

```
Set up PHPUnit testing environment for my_blog extension

```

MCP Resources
-------------

[](#mcp-resources)

In addition to tools (which perform actions), this MCP server provides **resources** - read-only information that you can add to your AI assistant's context for better code generation.

### What are Resources?

[](#what-are-resources)

Resources provide reference information about your TYPO3 system:

- **Tools** = Actions (create, generate, scaffold)
- **Resources** = Information (read, query, reference)

You can manually add resources to your conversation context when you need the AI to understand specific aspects of your TYPO3 installation.

### Available Resources

[](#available-resources)

#### 1. TCA (Table Configuration Array)

[](#1-tca-table-configuration-array)

Provides database table structure and configuration information.

**Overview Resource:** `typo3-mcp://tca`

- Lists all available database tables
- Shows table titles and label fields
- Provides quick reference for what tables exist

**Detailed Resource:** `typo3-mcp://tca/{tableName}`

- Complete TCA configuration for a specific table
- Field definitions with types, validation, and constraints
- Relationship information (foreign keys, MM relations)
- Record types and palettes
- Enable columns (hidden, starttime, endtime, etc.)

#### 2. ViewHelper Reference

[](#2-viewhelper-reference)

Provides complete documentation of all available Fluid ViewHelpers.

**Resource:** `typo3-mcp://view-helper-reference`

- Lists all registered ViewHelpers
- Includes documentation and usage examples
- Shows XML namespaces for each ViewHelper

### How to Use Resources

[](#how-to-use-resources)

#### In Claude Code

[](#in-claude-code)

Use the "Add Context" feature to add resources:

1. Click the "+" button or use the attachment icon
2. Select "MCP Resource"
3. Choose the resource you want to add:
    - `typo3-mcp://tca` - Overview of all tables
    - `typo3-mcp://tca/pages` - TCA for pages table
    - `typo3-mcp://tca/tt_content` - TCA for content elements
    - `typo3-mcp://view-helper-reference` - ViewHelper documentation

The resource content will be added to the conversation context.

#### In Cursor

[](#in-cursor)

Resources can be referenced in your prompts by mentioning them explicitly. The exact method depends on Cursor's MCP implementation.

### Usage Examples

[](#usage-examples-1)

#### Example 1: Creating a Model from TCA

[](#example-1-creating-a-model-from-tca)

**Steps:**

1. Add resource: `typo3-mcp://tca/tx_news_domain_model_news`
2. Ask: "Create an Extbase model that matches this TCA structure"

**Result:** The AI generates a model with properties matching the actual database fields.

#### Example 2: Understanding Table Relations

[](#example-2-understanding-table-relations)

**Steps:**

1. Add resource: `typo3-mcp://tca/pages`
2. Add resource: `typo3-mcp://tca/tt_content`
3. Ask: "Explain how pages and content elements are related"

**Result:** The AI analyzes the TCA foreign keys and explains the relationship.

#### Example 3: Writing Fluid Templates

[](#example-3-writing-fluid-templates)

**Steps:**

1. Add resource: `typo3-mcp://view-helper-reference`
2. Ask: "Create a template for displaying news with images"

**Result:** The AI uses actual available ViewHelpers with correct namespaces.

#### Example 4: Repository Methods from TCA

[](#example-4-repository-methods-from-tca)

**Steps:**

1. Add resource: `typo3-mcp://tca/fe_users`
2. Ask: "Create a repository with find methods for searchable fields"

**Result:** The AI generates repository methods based on actual TCA field configuration.

### Benefits of Using Resources

[](#benefits-of-using-resources)

- **Accurate field names** - Uses actual database columns from your TCA
- **Correct data types** - Matches your existing table structure
- **Valid ViewHelpers** - Only suggests ViewHelpers that are actually available
- **Proper relationships** - Understands foreign keys and MM relations
- **Context-aware code** - Generates code that fits your specific TYPO3 setup

Available Tools Reference
-------------------------

[](#available-tools-reference)

### Extension Tools

[](#extension-tools)

- `typo3_create_extension` - Create new TYPO3 extension
- `typo3_create_sitepackage` - Create site package
- `typo3_configure_dependency_injection` - Create/update Services.yaml

### Domain Layer Tools

[](#domain-layer-tools)

- `typo3_create_model` - Create Extbase domain model
- `typo3_create_repository` - Create Extbase repository
- `typo3_create_validator` - Create Extbase validator

### Controller Tools

[](#controller-tools)

- `typo3_create_controller` - Create controller with actions
- `typo3_create_plugin` - Create frontend plugin
- `typo3_create_backend_module` - Create backend module

### Database Tools

[](#database-tools)

- `typo3_create_table` - Create database table with TCA
- `typo3_create_upgrade_wizard` - Create upgrade wizard

### Event System Tools

[](#event-system-tools)

- `typo3_create_event` - Create PSR-14 event
- `typo3_create_event_listener` - Create event listener

### Infrastructure Tools

[](#infrastructure-tools)

- `typo3_create_middleware` - Create HTTP middleware
- `typo3_create_type_converter` - Create type converter
- `typo3_create_command` - Create console command

### Site Configuration Tools

[](#site-configuration-tools)

- `typo3_create_site_set` - Create site set
- `typo3_create_site_settings_definition` - Create site settings

### Localization &amp; Testing Tools

[](#localization--testing-tools)

- `typo3_create_locallang` - Create/extend XLF files
- `typo3_setup_test_environment` - Set up testing infrastructure

### Reference Tools

[](#reference-tools)

- `typo3_list_viewhelpers` - List available Fluid ViewHelpers by tag name
- `typo3_get_viewhelper_documentation` - Get complete documentation for a specific ViewHelper

Troubleshooting
---------------

[](#troubleshooting)

### MCP Server Won't Start

[](#mcp-server-wont-start)

**Check TYPO3 installation:**

```
vendor/bin/typo3 mcp:server --help
```

**Verify extension is active:**

```
vendor/bin/typo3 extension:list
```

### Tools Not Appearing in AI Assistant

[](#tools-not-appearing-in-ai-assistant)

1. Verify MCP configuration file path is correct
2. Ensure `cwd` points to your TYPO3 installation root
3. Restart your AI assistant completely
4. Check server logs for errors

### Permission Issues

[](#permission-issues)

The MCP server runs with the same permissions as your TYPO3 installation. Ensure the web server user has write access to:

- `packages/` directory (for new extensions)
- Extension directories (for modifications)

### Debugging

[](#debugging)

Enable debug mode in TYPO3 to see detailed error messages:

```
# In your TYPO3 installation
export TYPO3_CONTEXT=Development
vendor/bin/typo3 mcp:server
```

Contributing
------------

[](#contributing)

Contributions are welcome! This project follows standard open-source contribution practices.

For detailed information about:

- Development setup
- Project architecture
- Adding new tools and resources
- Coding standards
- Testing guidelines
- Pull request process

Please see [CONTRIBUTING.md](CONTRIBUTING.md).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance95

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

32d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f0cf4eb3d44bff50a8f8dd5a05062c98edaf6d078f16cfae2f41caeb1a5e72a?d=identicon)[mittwald-typo3](/maintainers/mittwald-typo3)

---

Top Contributors

[![martin-helmich](https://avatars.githubusercontent.com/u/2538958?v=4)](https://github.com/martin-helmich "martin-helmich (46 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mittwald-smart-extension-builder/health.svg)

```
[![Health](https://phpackages.com/badges/mittwald-smart-extension-builder/health.svg)](https://phpackages.com/packages/mittwald-smart-extension-builder)
```

###  Alternatives

[symfony/mcp-bundle

Symfony integration bundle for Model Context Protocol (via official mcp/sdk)

43457.0k30](/packages/symfony-mcp-bundle)[fusio/impl

Fusio implementation

1227.4k2](/packages/fusio-impl)[symfony/ai-mate

AI development assistant MCP server for Symfony projects

22104.4k21](/packages/symfony-ai-mate)[stimmt/craft-mcp

MCP (Model Context Protocol) server for Craft CMS

251.3k](/packages/stimmt-craft-mcp)[bnomei/kirby-mcp

A CLI-first MCP server for Kirby CMS

532.8k1](/packages/bnomei-kirby-mcp)[plexi/artisan-obfuscator

Ofuscador de código PHP para projetos feitos com Laravel.

161.2k](/packages/plexi-artisan-obfuscator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
