Documentation
Importing Projects with MCP
Use AI assistants in your editor to import any project
Open your existing project in your IDE, connect the Stellify MCP server, and tell the agent to import it. The agent reads your local codebase, converts it to Laravel 13 where it isn't already, and recreates it in Stellify as structured, editable code. This works for Laravel projects, legacy PHP frameworks, and non-PHP stacks alike — anything the agent can read, it can rebuild.
Setup
You need a Stellify account, an API token from User Settings, and an MCP-compatible editor.
Install the server:
npm install -g @stellify/mcp
Then register it with your editor. For VS Code, create .vscode/mcp.json in your project root:
{
"mcpServers": {
"stellify": {
"command": "npx",
"args": ["@stellify/mcp"],
"env": {
"STELLIFY_API_URL": "https://api.stellisoft.com/api/v1",
"STELLIFY_API_TOKEN": "your-api-token-here"
}
}
}
}
Cursor and Claude Desktop take the same command, args, and environment variables in their respective MCP settings. Full connection details are on The MCP Server page.
The import lands in your active project — the one currently open in Stellify. Create or switch to the right project before you start.
Running the Import
With MCP connected, the prompt is the whole interface. Open your project in the IDE and ask:
Import this project into my Stellify project
The agent scans the structure, identifies the framework, and reports what it found — models, controllers, routes, components — before creating anything. Confirm, and it builds the corresponding files in Stellify using the same tools it uses to write new code (create_file, create_method, create_route).
Converting from another framework — name the source and target so the agent transforms rather than transcribes:
Import this CodeIgniter project and convert it to Laravel 13
Rebuild this Django application as a Laravel 13 project
Convert this Express.js API to Laravel with the same endpoints
Framework idioms are mapped, not copied: CodeIgniter Active Record becomes Eloquent, $this->input->post() becomes Request objects, custom libraries become service classes, controller patterns become route-model-bound Laravel controllers.
Importing selectively — scope the prompt:
Import just the User model and UserController
Import all controllers in app/Http/Controllers/Api
Import the routes from routes/api.php
Adding context — the more the agent knows about what matters, the better the result:
Import the authentication system. The main files are AuthController, the User model, and the auth routes
What Gets Imported
- Models — with relationships, casts, and fillables
- Controllers — all methods, including validation and responses
- Routes — web and API, with middleware
- Middleware and services
- Vue components — single-file components with script setup
Directory mapping is what you'd expect: app/Models → Models, app/Http/Controllers → Controllers, app/Services → Services, resources/js → JS, routes/web.php and routes/api.php → your Stellify routes.
Working Through a Large Import
Don't ask for a 400-file project in one prompt. Import in passes — models first, then controllers, then routes — reviewing in the Stellify editor between passes:
Import the models first
Now import the controllers that use those models
If a relationship comes through wrong, say so plainly and the agent fixes the specific models:
The Post model belongs to User and has many Comments. Update the relationships.
If imported code depends on packages or integrations, ask the agent what capabilities it needs — it will tell you what to enable and configure.
After Importing
- Review in the editor — walk the file dropdown; spot-check methods and relationships
- Enable capabilities — auth, storage, mail: whatever the imported code depends on
- Connect your database and run the migrations
- Verify — run key methods with test input, or have the agent write and run a test file
Tips
- Import from a clean commit — a stable snapshot beats a mid-refactor working tree
.gitignoreis respected — the agent won't read ignored files- Describe the architecture up front — "services hold the business logic, controllers are thin" saves a correction pass later
Troubleshooting
Connection refused / timeout — check the token and STELLIFY_API_URL, and that your network allows outbound connections.
Unauthorized — the token was revoked (generating a new MCP token revokes old ones) or mistyped. Create a fresh one in User Settings.
Files missing in Stellify — check the agent's output for parsing errors on specific files; re-run the import for just those files.
MCP server not found — verify the install with npx @stellify/mcp --version.
Next Steps
- The MCP Server - The full tool reference
- Importing WordPress - The dedicated WordPress workflow
- Code Reuse - Build the rest reuse-first
- Previous
- Code Reuse
- Next
- Importing WordPress