Documentation
Importing Projects with MCP
Use AI assistants in your editor to import any project
Load your project in Cursor or VS Code, connect our MCP server, and let AI rebuild it as a modern Laravel application.
You can import any project into Stellify directly from your code editor using MCP (Model Context Protocol). This lets AI assistants like Claude read your local codebase, transform the code to Laravel 13, and create the corresponding files in Stellify.
Prerequisites
Before you begin, you'll need:
- A Stellify account with an active project
- An API token from your User Settings
- An MCP-compatible editor (VS Code, Cursor, or similar)
- The Stellify MCP server installed
Installing the MCP Server
Install the Stellify MCP server globally:
npm install -g @stellify/mcp
Configuring Your Editor
VS Code
- Open your project in VS Code
- Create or edit
.vscode/mcp.jsonin 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"
}
}
}
}
- Replace
your-api-token-herewith your actual API token from User Settings
Cursor
- Open Cursor Settings (Cmd/Ctrl + ,)
- Search for "MCP" or navigate to the MCP configuration
- Add the Stellify server with the same configuration as above
Claude Desktop
If you're using Claude Desktop directly:
- Open Claude Desktop settings
- Navigate to the MCP servers section
- Add a new server with:
- Command:
npx - Arguments:
@stellify/mcp - Environment Variables:
STELLIFY_API_URL:https://api.stellisoft.com/api/v1STELLIFY_API_TOKEN: Your API token
- Command:
Getting Your API Token
- Log in to Stellify
- Click your profile icon in the top navigation
- Go to User Settings
- Navigate to the API Tokens section
- Click Create New Token
- Copy the token immediately (it's only shown once)
Store your token securely. If you lose it, you'll need to create a new one.
Importing Your Project
Once MCP is configured, you can ask the AI to import your project:
Basic Import
Open your PHP project in the editor and ask:
Import this project into my Stellify project
For legacy PHP frameworks, be specific:
Import this CodeIgniter project and convert it to Laravel 13
Migrate this Kohana application to Stellify
For non-PHP frameworks, the AI can analyze your application logic and rebuild it in Laravel:
Rebuild this Django application as a Laravel 13 project
Convert this Express.js API to Laravel with the same endpoints
Migrate this Rails app to Laravel, preserving the models and controllers
The AI will:
- Read your project structure and identify the framework
- Analyze controllers, models, views, and routing patterns
- Transform the code to Laravel 13 conventions
- Create corresponding files in Stellify
- Set up Eloquent relationships and modern patterns
Selective Import
Import specific parts of your project:
Import just the User model and UserController
Import all controllers in the app/Http/Controllers/Api directory
Import the routes from routes/api.php
Import with Context
Provide context for better results:
Import the authentication system. The main files are AuthController, User model, and the auth routes
What Gets Imported
The MCP import process handles:
- Models - Eloquent models with relationships, casts, and fillables
- Controllers - All methods including validation and responses
- Routes - Web and API routes with middleware
- Middleware - Custom middleware classes
- Services - Service classes and business logic
- Vue Components - Single-file components with script setup
File Structure Mapping
app/Models/→ Models directoryapp/Http/Controllers/→ Controllers directoryapp/Http/Middleware/→ Middleware directoryapp/Services/→ Services directoryresources/js/→ JS directoryroutes/web.php→ Web routesroutes/api.php→ API routes
Example Session
Here's a typical import workflow:
Importing a Laravel Project
You: Import this project into Stellify
AI: I'll scan your project structure and import the files. Let me start by reading your project.
AI reads composer.json, identifies Laravel version and dependencies
AI: I found a Laravel 11 project with the following structure:
- 5 Models (User, Post, Comment, Tag, Category)
- 8 Controllers
- 12 API routes
- 3 Vue components
Should I import everything, or would you like to select specific files?
You: Import everything
AI: Starting import...
AI creates files using MCP tools: create_file, create_method, save_file
AI: Import complete. I've created:
- 5 models with relationships
- 8 controllers with all methods
- Routes configured for API endpoints
- 3 Vue components
You can view your project at [project link].
Importing a Legacy Framework
You: Import this CodeIgniter 3 project and convert it to Laravel 13
AI: I'll analyze your CodeIgniter project and transform it to Laravel 13. Let me scan the structure.
AI reads application/config, application/controllers, application/models
AI: I found a CodeIgniter 3 project with:
- 12 Controllers in application/controllers/
- 8 Models using CI's Active Record
- Custom libraries in application/libraries/
- Views using CI's template parser
I'll convert these to:
- Laravel 13 controllers with dependency injection
- Eloquent models with relationships
- Service classes for your libraries
- Blade templates (or Vue components if you prefer)
Should I proceed with the full conversion?
You: Yes, convert everything
AI: Converting...
AI transforms CI patterns to Laravel 13, creates Eloquent models, converts Active Record to Eloquent query builder
AI: Conversion complete. Here's what changed:
CI_Controllerclasses → Laravel controllers with route model bindingCI_Modelwith Active Record → Eloquent models with relationships$this->load->view()→ Blade templates$this->input->post()→ Laravel Request objects- Custom libraries → Service classes with dependency injection
All files are now Laravel 13 compatible in your Stellify project.
Handling Import Issues
Large Projects
For projects with many files, import in batches:
Import the models first
Then:
Now import the controllers
Complex Relationships
If relationships aren't detected correctly:
The Post model belongs to User and has many Comments. Update the relationships.
Missing Dependencies
If the AI reports missing capabilities:
What capabilities are needed to run this code?
The AI will identify what needs to be configured in Project Settings.
After Importing
Once your project is in Stellify:
- Review the code - Check that methods and relationships imported correctly
- Configure capabilities - Enable features like authentication or file storage in Project Settings
- Connect your database - Set up your database connection if using external data
- Test with AI - Ask the AI to help fix any issues or add missing functionality
Tips
- Start with a clean commit - Import from a stable state of your codebase
- Check .gitignore - The AI respects .gitignore and won't read ignored files
- Use descriptive prompts - Tell the AI about your project structure for better results
- Import iteratively - For large projects, import module by module
Troubleshooting
"Connection refused" or timeout errors
- Verify your API token is correct
- Check that the STELLIFY_API_URL is correct
- Ensure your network allows outbound connections
"Unauthorized" errors
- Your API token may have expired - create a new one
- Check that the token has the correct permissions
Files not appearing in Stellify
- The AI may have encountered parsing errors - check the response for details
- Some file types aren't supported - see the supported file list above
MCP server not found
- Ensure
@stellify/mcpis installed:npm install -g @stellify/mcp - Try running
npx @stellify/mcp --versionto verify installation
- Previous
- Working with AI
- Next
- Exporting Code