Documentation
The MCP Server
Connect any AI agent directly to your project
The MCP server is the front door to the Stellify development loop: connect your editor, let AI find existing code and wire it into your project, sync back or export. Claude Code, Cursor, VS Code Copilot, Claude Desktop — any MCP-compatible client connects directly to your Stellify project, and instead of reading and rewriting whole files, the agent works with your code the way Stellify stores it: as addressable files, methods, statements, and elements.
This page covers connecting the server and what each tool does. If you want to import an existing codebase, see Importing with MCP.
Setup
- Install the server:
npm install -g @stellify/mcp
-
Generate an API token in User Settings → API Tokens. The token is shown once — store it securely.
-
Add the server to your client's MCP configuration (e.g.
.vscode/mcp.json, Cursor settings, or Claude Desktop's MCP section):
{
"mcpServers": {
"stellify": {
"command": "npx",
"args": ["@stellify/mcp"],
"env": {
"STELLIFY_API_URL": "https://api.stellisoft.com/api/v1",
"STELLIFY_API_TOKEN": "your-api-token-here"
}
}
}
}
The server operates on your active project — the one currently open in Stellify. Switch projects in the platform and the agent follows.
The Development Loop, Tool by Tool
The server is designed reuse-first: before generating anything new, agents search the shared library and your project for existing code to reference — because referencing a proven unit costs a fraction of regenerating it (Code Reuse explains the model). One pass through the loop looks like:
search_code— find: check whether the feature (or part of it) already exists in the libraryreuse_code— wire it in: reference the unit and its dependencies into your projectcreate_resources/create_file— fill the gaps: scaffold what the library didn't havecreate_route— connect it to a URLrun_migration— apply the database changesrun_code/run_tests— prove it: execute and verifyget_assembled_code— inspect the final rendered source- Sync back — commit to your GitHub repo or export; your repo stays the source of truth
Then the next feature, same loop.
Core Tools
These are always available:
| Tool | Purpose |
|---|---|
get_project |
The active project: name, directories, enabled capabilities |
search_code |
Search the reusable-code index for existing units to reference |
search_files / search_methods / search_routes |
Find code in your project |
reuse_code |
Reference an existing unit (and its dependency closure) into your project |
create_resources |
Scaffold a complete resource stack — Model, Controller, Service, Migration — in one call |
create_file |
Create a single file (controller, model, middleware, class, or Vue component) |
create_route / save_route |
Create or update routes with controller wiring and middleware |
run_code |
Execute a method in your project environment and return the result |
run_migration |
Apply a migration to your connected database |
run_tests |
Run a test file and return per-test results |
get_assembled_code |
Render a file's structured data back into standard source code |
Situational Tool Groups
To keep the agent's context lean, less-common tools load on demand via load_tools:
- editing — surgical statement-level edits and granular inspection:
save_file,save_method,create_method,create_statement,add_method_body,replace_method_body,delete_*,get_file,get_method,get_statement, and more - frontend — UI and Vue tools: elements, element trees, HTML-to-elements conversion
- analysis — performance and code-quality audits
- capabilities — list and enable libraries/packages for the project
- settings — read and write project configuration profiles
- contribute —
submit_code, for offering your own code into the shared library
You don't need to manage this yourself — agents load groups as their task requires.
Execution Semantics
run_code executes a single method in a sandboxed environment scoped to your project and database, with a timeout (30s default). Schema-changing operations are blocked here by design.
run_migration is the sanctioned path for schema changes. It applies a migration file to your connected database — use it after scaffolding with create_resources.
run_tests runs every test in a test file and reports pass/fail, failure messages, and duration per test. Test runs are wrapped in a database transaction that is rolled back afterwards, so tests never mutate your project data. Test files export to tests/Feature in your Laravel project like any other code.
The Embedded Chat
You don't have to bring your own agent. The editor's built-in AI chat panel uses the same tool surface — describe what you want and it plans tasks, scaffolds resources, edits methods, and builds UI, with changes appearing live in the editor.
Next Steps
- Code Reuse - Reference proven code instead of regenerating it
- Importing with MCP - Bring an existing codebase in
- Working with AI - Prompting patterns and workflows
- Previous
- Working with AI
- Next
- Code Reuse