next2d-development-mcp
v1.7.5MCP server for Next2D application development assistance
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_view
Create a new View and ViewModel pair following MVVM pattern. Generates {Name}View.ts and {Name}ViewModel.ts in src/view/{name}/. View extends the framework View<ViewModel> generic class (display only, delegates to a Page component). ViewModel holds UseCases and fetches data in initialize(). Note: create the Page component first — the generated View imports it.
| Parameter | Type | Description |
|---|---|---|
name * | string | View name (e.g. 'home', 'quest/list'). Slash-separated names create nested paths and PascalCase class names. |
create_usecase
Create a new UseCase class in the Application layer. Each UseCase represents a single user action with an execute() method. Located in src/model/application/{screen}/usecase/.
| Parameter | Type | Description |
|---|---|---|
name * | string | UseCase name (e.g. 'StartDrag', 'NavigateToView', 'FetchUserData') |
screen * | string | Screen/view name this UseCase belongs to (e.g. 'home', 'top') |
create_repository
Create a new Repository class in the Infrastructure layer. Repositories abstract data source access (API, DB). Located in src/model/infrastructure/repository/. Must include try-catch and use config for endpoints.
| Parameter | Type | Description |
|---|---|---|
name * | string | Repository name (e.g. 'HomeText', 'UserData', 'QuestList') |
method | string | Method name for the repository (default: 'get') |
create_ui_component
Create a new UI component following Atomic Design pattern. Levels: atom (smallest), molecule (composite), organism (complex), page (full screen). Located in src/ui/component/{level}/. Also supports creating Animation Tool content wrappers in src/ui/content/.
| Parameter | Type | Description |
|---|---|---|
level * | string | Atomic Design level: atom, molecule, organism, page, or 'content' for Animation Tool wrapper |
name * | string | Component name (e.g. 'Button', 'HomeBtn', 'QuestCard') |
parentClass | string | Parent DisplayObject class (default: 'Sprite'). Options: Sprite, MovieClip, Shape, TextField |
screen | string | Screen name for page-level components (e.g. 'top', 'home', 'quest'). Determines the subdirectory under page/ and the View import path. Defaults to the first segment of name. |
add_route
Generate a route entry for routing.json. Supports request types: json, content, custom, cluster. The route key becomes the URL path and determines the View class name (CamelCase).
| Parameter | Type | Description |
|---|---|---|
path * | string | Route path (e.g. 'home', 'quest/list'). Becomes URL path and View class name in CamelCase. |
isPrivate | boolean | If true, direct URL access redirects to TopView |
requests | array | Array of request configurations |
create_interface
Create a TypeScript interface file with I prefix convention. Interfaces go in src/interface/ and define contracts between layers. Used for dependency inversion (View depends on interface, not concrete class).
| Parameter | Type | Description |
|---|---|---|
name * | string | Interface name (e.g. 'Draggable', 'HomeTextResponse'). Will be prefixed with 'I' automatically if not already. |
properties | array | Interface properties |
validate_architecture
Validate that a Next2D project follows the expected architecture. Checks directory structure, config files, and naming conventions. Reports missing directories, files, and architecture violations.
| Parameter | Type | Description |
|---|---|---|
projectPath | string | Path to the project root directory (default: current directory) |
create_animation
Create a new Animation class for UI transitions. Uses Tween/Easing/Job from @next2d/ui. Naming: {Component}{Action}Animation.ts in src/ui/animation/{screen}/. Separates animation logic from components for reusability.
| Parameter | Type | Description |
|---|---|---|
action * | string | Animation action (e.g. 'Show', 'Exit', 'Hover') |
component * | string | Component name (e.g. 'TopBtn', 'HomeCard') |
screen * | string | Screen this animation belongs to (e.g. 'top', 'home') |
create_domain_service
Create a Domain layer class (service or callback). Services implement core business rules with no external dependencies. Callbacks are executed after gotoView completes (configured in config.json gotoView.callback). Located in src/model/domain/.
| Parameter | Type | Description |
|---|---|---|
name * | string | Feature name (e.g. 'Background', 'Score', 'Timer') |
type * | string | Domain type: 'service' for business logic, 'callback' for gotoView.callback handler |
action | string | Action name for service type (e.g. 'Draw', 'ChangeScale'). Not needed for callback. |
create_loading
Create a Loading screen class for screen transition loading indicator. The class has start() and end() methods called by the framework during gotoView transitions. Configured in config.json loading.callback. Located in src/model/domain/callback/.
| Parameter | Type | Description |
|---|---|---|
name | string | Loading class name (default: 'Loading') |
analyze_project
Analyze the current Next2D project state. Reads routing.json, scans View/ViewModel/UseCase/Repository files, and reports what is implemented vs. missing. Use this before planning new features to understand the current state.
| Parameter | Type | Description |
|---|---|---|
projectPath | string | Path to the project root directory (default: current directory) |
plan_feature
Generate a systematic, ordered implementation plan for a new Next2D screen or feature. Checks what already exists in the project and produces step-by-step instructions with specific MCP tool calls to execute. Run analyze_project first to understand current state.
| Parameter | Type | Description |
|---|---|---|
screenPath * | string | Screen path matching routing.json key (e.g. 'quest/list', 'home', 'settings') |
hasApi | boolean | Does this screen fetch data from an external API? |
hasContent | boolean | Does this screen use Animation Tool (.n2d) content? |
projectPath | string | Path to project root directory (default: current directory) |
inspect_screen
Inspect all implementation files for a specific Next2D screen. Lists View, ViewModel, Page, UseCases, Repositories, Animations, and Content related to the given screen path. Shows file existence, line counts, and routing.json configuration. Use this before modifying an existing screen to understand what is already implemented.
| Parameter | Type | Description |
|---|---|---|
screenPath * | string | Screen path matching routing.json key (e.g. 'quest/list', 'home', 'settings') |
projectPath | string | Path to the project root directory (default: current directory) |
validate_game_integration
Validate Next2D game integration: game board fits within stage dimensions and global stage ENTER_FRAME lifecycle.
| Parameter | Type | Description |
|---|---|---|
projectPath | string |