mcpField
S
stellify-mcp

stellify-mcp

远程服务
github.com/Stellify-Software-Ltd开发工具12 周前更新
代码仓库

关于 stellify-mcp

Stellify MCP Server 将 AI 助手连接到 Stellify 项目,用于逐步构建 Laravel 和 Vue.js 应用,适合通过对话开发项目的团队。它把代码拆成结构化元素,支持针对性编辑,而非一次生成完整文件。

主要功能

  1. 01创建项目目录与代码文件
  2. 02添加方法签名并解析方法代码
  3. 03将代码解析为结构化语句
  4. 04把 HTML 转换为 Stellify 元素
  5. 05搜索项目文件、方法与路由

适用场景

  1. 01在项目中逐步创建 Laravel 控制器和模型
  2. 02构建 Vue 组件并转换 HTML 模板
  3. 03搜索现有代码并补充方法实现

MCP 相关

提供托管 HTTP 服务和本地 MCP 服务两种接入方式,向 MCP 客户端开放 Stellify 项目的文件、代码、路由和元素操作工具。

配置

远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。

服务地址https://api.stellisoft.com/mcp
一键复制安装命令
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。

安装包
npm@stellisoft/stellify-mcp1.0.7

工具

详细介绍

Stellify MCP 服务

npm version smithery badge License: MIT

面向 Stellify 的模型上下文协议(MCP)服务——这是一个 AI 原生代码生成平台。

这是什么?

此 MCP 服务让 AI 助手(如 Claude Desktop)能够与您的 Stellify 项目交互,逐步构建 Laravel 和 Vue.js 应用。AI 无需一次性生成完整代码文件,而是可以:

  • 创建文件结构(类、控制器、模型、中间件、Vue 组件)
  • 添加带类型提示的方法签名
  • 将 PHP/JavaScript 代码解析为结构化 JSON(逐条语句解析)
  • 一次性将 HTML 转换为 Stellify 元素
  • 搜索项目中的现有代码
  • 从全局库安装可复用代码
  • 通过自然对话构建应用

快速开始 — 托管服务(推荐)

最简单的连接方式是使用 https://api.stellisoft.com/mcp 上的托管服务。无需安装、无需 Node.js,也无需 API 令牌——您的 MCP 客户端会打开浏览器窗口,您可以在其中使用 Stellify 账户登录并批准访问权限(OAuth)。

Claude(网页版或桌面版): Stellify 已列入 Claude 连接器目录——前往 设置 → 连接器,找到 Stellify 并点击连接。或者选择 添加自定义连接器,然后粘贴 https://api.stellisoft.com/mcp。

Claude Code:

claude mcp add --transport http stellify https://api.stellisoft.com/mcp

Cursor(.cursor/mcp.json):

{
  "mcpServers": {
    "stellify": { "url": "https://api.stellisoft.com/mcp" }
  }
}

VS Code(.vscode/mcp.json):

{
  "servers": {
    "stellify": { "type": "http", "url": "https://api.stellisoft.com/mcp" }
  }
}

Windsurf(~/.codeium/windsurf/mcp_config.json):

{
  "mcpServers": {
    "stellify": { "serverUrl": "https://api.stellisoft.com/mcp" }
  }
}

本地安装(npm 替代方案)

更倾向于在本地运行服务?npm 包使用相同协议,连接同一平台 API,并使用 API 令牌而非 OAuth 进行身份验证。

前置条件
  • Node.js 18 或更高版本
  • Stellify 账户 - 在 stellisoft.com 注册
  • Claude Desktop(或其他兼容 MCP 的 AI 客户端)
安装

通过 npm 全局安装:

npm install -g @stellisoft/stellify-mcp
配置
  1. 获取 Stellify API 令牌:

    • 登录 Stellify
    • 前往设置 → API 令牌
    • 点击“创建新令牌”
    • 复制您的令牌
  2. 配置 Claude Desktop:

    编辑 Claude Desktop 配置文件:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/claude/claude_desktop_config.json

    添加 Stellify MCP 服务:

    {
      "mcpServers": {
        "stellify": {
          "command": "stellify-mcp",
          "env": {
            "STELLIFY_API_URL": "https://stellisoft.com/api/v1",
            "STELLIFY_API_TOKEN": "your-token-here"
          }
        }
      }
    }
    
  3. 重启 Claude Desktop

完成!现在应该可以在 Claude Desktop 中使用 Stellify 工具了。

使用方法

配置完成后,您可以自然地与 Claude 对话来构建应用:

对话示例

创建新控制器:

"Create a UserController in my Stellify project"

添加方法:

"Add a method called 'store' that takes a Request parameter and returns a JsonResponse"

实现方法逻辑:

"Add this implementation to the store method:
$user = User::create($request->validated());
return response()->json($user, 201);"

构建 Vue 组件:

"Create a Counter component with an increment button"

将 HTML 转换为元素:

"Convert this HTML to Stellify elements:
<div class='container'><h1>Hello</h1><button>Click me</button></div>"

搜索代码库:

"Search for all controller files in my project"
"Find methods related to authentication"

可用工具

项目与目录工具
get_project

获取已认证用户的当前 Stellify 项目。在执行任何其他操作前,请先调用此工具。

**参数:**无

返回:

  • uuid:项目 UUID(大多数操作都需要)
  • name:项目名称
  • directories:现有目录的 {uuid, name} 数组

get_directory

根据 UUID 获取目录,以查看其内容。

参数:

  • uuid(必填):目录的 UUID

create_directory

创建新目录以整理文件。

参数:

  • name(必填):目录名称(例如,“js”、“css”、“components”)

文件工具
create_file

在 Stellify 项目中创建新文件。这会创建一个空文件框架——尚无方法、语句或模板。

参数:

  • directory(必需):目录的 UUID(从 get_project 的 directories 数组中获取)
  • name(必需):不含扩展名的文件名(例如,“Counter”、“UserController”)
  • type(必需):文件类型——“class”、“model”、“controller”、“middleware”或“js”
  • extension(可选):文件扩展名。Vue 组件使用“vue”。
  • namespace(可选):PHP 命名空间(例如,“App\Services\”)。仅用于 PHP 文件。
  • includes(可选):要导入的完全限定类名数组(例如,["App\\Models\\User", "Illuminate\\Http\\Request"])。Stellify 会将这些类解析为文件 UUID;必要时从 Laravel API 或 vendor 目录获取。

**目录选择:**根据文件用途选择目录。如果目录不存在,请先使用 create_directory 创建。

文件类型目录命名空间
控制器controllersApp\Http\Controllers\
模型modelsApp\Models\
服务servicesApp\Services\
中间件middlewareApp\Http\Middleware\
Vue/JSjs不适用

示例工作流:

  1. create_file → 创建空框架并返回文件 UUID
  2. create_statement + add_statement_code → 添加变量/导入项
  3. create_method + add_method_body → 添加函数
  4. html_to_elements → 创建模板元素(用于 Vue)
  5. save_file → 将所有 UUID 关联后完成文件配置

自动创建依赖项(当 auto_create_dependencies: true 时):

使用如下代码创建文件时:

<?php
namespace App\Http\Controllers;

use App\Models\User;
use Illuminate\Http\Request;

class UserController extends Controller
{
    public function store(Request $request)
    {
        $user = User::create($request->validated());
        return response()->json($user);
    }
}

Stellify 将:

  1. 解析 use 语句以查找依赖项(User、Request、Socialite)
  2. 检查 Application DB 中的框架类 → 查找已缓存的类
  3. 对于 Laravel 核心类 → 从 api.laravel.com 获取
  4. 对于 vendor 包(Socialite、Spatie 等)→ 从 vendor/ 目录读取
  5. 创建缺失的 App 类 → 创建 User 模型文件
  6. 使用所有依赖项 UUID 填充文件的 includes 数组

支持的来源:

  • Laravel API — 从 api.laravel.com 获取核心 Illuminate\* 类
  • Vendor 包 — 使用 PHP-Parser 直接从你的 vendor/ 目录读取 Laravel\Socialite\*、Laravel\Cashier\*、Spatie\*、Livewire\* 等

响应中包含一份 dependencies 报告,展示创建或解析了哪些内容,以及它们的来源。


get_file

根据 UUID 获取文件及其所有元数据、方法和语句。

参数:

  • uuid(必需):文件的 UUID

save_file

使用完整配置保存/更新文件。这会在 create_file 后完成文件配置。

参数:

  • uuid(必需):文件的 UUID
  • name(必需):文件名(不含扩展名)
  • type(必需):文件类型(“js”、“class”、“controller”、“model”、“middleware”)
  • extension(可选):文件扩展名(Vue SFC 使用“vue”)
  • template(可选):Vue <template> 部分的根元素 UUID 数组
  • data(可选):仅包含 METHOD UUID 的数组(函数)
  • statements(可选):STATEMENT UUID 数组(导入项、变量、引用)
  • includes(可选):要导入的文件 UUID 数组

重要:data = 仅包含方法 UUID,statements = 语句 UUID(方法外部的代码)


search_files

按名称或类型搜索项目中的文件。

参数:

  • name(可选):要搜索的文件名模式
  • type(可选):文件类型筛选条件

方法工具
create_method

在文件中创建方法签名(不含实现)。

参数:

  • file(必填):要添加方法的文件 UUID
  • name(必填):方法名称(例如:"increment"、"store"、"handleClick")
  • visibility(可选):"public"、"protected" 或 "private"(仅限 PHP,默认值:"public")
  • is_static(可选):方法是否为静态方法(仅限 PHP,默认值:false)
  • returnType(可选):返回类型(例如:"int"、"string"、"void")
  • parameters(可选):由 {name, type} 对象组成的数组

add_method_body

解析并向方法主体添加代码。Stellify 会将代码解析为结构化 JSON 语句。

参数:

  • file_uuid(必填):包含该方法的文件 UUID
  • method_uuid(必填):要添加代码的方法 UUID
  • code(必填):方法主体的代码(仅包含语句,不含函数声明)

示例:

code: "return $a + $b;"

search_methods

按名称或在指定文件中搜索项目的方法。

参数:

  • name(可选):要搜索的方法名称(支持通配符)
  • file_uuid(可选):将结果限定为指定文件

语句工具
create_statement

在文件中创建空语句。这是第 1 步(共 2 步)——接下来必须调用 add_statement_code。

参数:

  • file(可选):要添加语句的文件 UUID
  • method(可选):要添加语句的方法 UUID(用于方法主体中的语句)

适用场景:

  • PHP:类属性、use 语句、常量
  • JS/Vue:变量声明、导入、响应式引用

add_statement_code

向现有语句添加代码。这是第 2 步(共 2 步)——在调用 create_statement 后调用。

参数:

  • file_uuid(必填):包含该语句的文件 UUID
  • statement_uuid(必填):要添加代码的语句 UUID
  • code(必填):要添加的代码

示例:

code: "use Illuminate\\Http\\Request;"
code: "const count = ref(0);"
code: "import { ref } from 'vue';"

get_statement

通过 UUID 获取语句及其子句(代码令牌)。

参数:

  • uuid(必填):语句的 UUID

路由工具
create_route

在 Stellify 项目中创建新路由/页面。

参数:

  • project_id(必填):Stellify 项目的 UUID
  • name(必填):路由/页面名称(例如:"Home"、"Counter"、"About")
  • path(必填):URL 路径(例如:"/"、"/counter"、"/about")
  • method(必填):HTTP 方法("GET"、"POST"、"PUT"、"DELETE"、"PATCH")
  • type(可选):路由类型——页面使用 "web",API 端点使用 "api"(默认值:"web")
  • data(可选):其他路由数据

get_route

通过 UUID 获取路由/页面。

参数:

  • uuid(必填):路由的 UUID

search_routes

按名称搜索项目中的路由/页面。

参数:

  • search(可选):用于匹配路由名称的搜索词
  • type(可选):按路由类型筛选("web" 或 "api")
  • per_page(可选):每页结果数(默认值:10)

视图与 Blade 模板

Stellify 将 Blade 视图存储为元素,而非文件。根元素的 name 字段映射到视图名称:

  • name="notes.index" 的元素 → view('notes.index', $data)
  • name="layouts.app" 的元素 → @extends('layouts.app')
  • name="components.card" 的元素 → <x-card>

使用 html_to_elements 创建根元素后,通过 update_element 设置其 name。

可复用模板约定: 将布局、组件和局部模板附加到模板路由(例如,/template/app-layout、/template/card),以便统一整理和编辑。


元素工具(UI 组件)
create_element

创建新的 UI 元素。对于根元素,请提供 page(路由 UUID);对于子元素,请提供 parent(元素 UUID)。

参数:

  • type(必填):元素类型,可选:
    • HTML5:s-wrapper、s-input、s-form、s-svg、s-shape、s-media、s-iframe
    • 组件:s-transition、s-freestyle、s-motion
    • Blade:s-directive
    • Shadcn/ui:s-chart、s-table、s-combobox、s-accordion、s-calendar、s-contiguous
  • page(可选):页面/路由的 UUID(用于根元素)
  • parent(可选):父元素的 UUID(用于子元素)

使用 s-directive 实现 Blade 条件判断:

s-directive 元素会输出 Blade 指令(例如 @if、@foreach、@endif)。它们是同级元素,不会包裹子元素。要有条件地渲染内容:

  1. 创建一个 s-directive 元素,并将开头指令(例如 @if(...))设为语句
  2. 将内容元素创建为后续同级元素
  3. 再创建一个 s-directive 元素,并将结束指令(例如 @endif)设为语句

示例 — 有条件地显示图像:

// 1. Create statement for @if
create_statement_with_code({
  file: "<file-uuid>",
  code: "@if($item->featured_image)"
})

// 2. Create opening directive element and set its statement
create_element({ type: "s-directive", page: "<route-uuid>" })
update_element({ uuid: "<if-directive-uuid>", data: { "statement": "<if-statement-uuid>" } })

// 3. Create the image as the next sibling
html_to_elements({ page: "<route-uuid>", elements: "<img class=\"w-full\" />" })
// Then update with dynamic src:
update_element({ uuid: "<img-uuid>", data: { "srcField": "featured_image" } })

// 4. Create statement for @endif
create_statement_with_code({ file: "<file-uuid>", code: "@endif" })

// 5. Create closing directive element
create_element({ type: "s-directive", page: "<route-uuid>" })
update_element({ uuid: "<endif-directive-uuid>", data: { "statement": "<endif-statement-uuid>" } })

这三个元素会按顺序作为同级元素渲染:

@if($item->featured_image)
<img class="w-full" src="{{ $item->featured_image }}" />
@endif

使用 s-directive 实现循环:

// 1. Create @foreach directive
create_statement_with_code({ file: "<file-uuid>", code: "@foreach($posts as $item)" })
create_element({ type: "s-directive", page: "<route-uuid>" })
update_element({ uuid: "<foreach-uuid>", data: { "statement": "<foreach-statement-uuid>" } })

// 2. Create loop content (article with dynamic fields)
html_to_elements({ page: "<route-uuid>", elements: "<article><h2></h2><p></p></article>" })
// Update elements to use loop item fields:
update_element({ uuid: "<h2-uuid>", data: { "textField": "title" } })  // → {{ $item->title }}
update_element({ uuid: "<p-uuid>", data: { "textField": "excerpt" } }) // → {{ $item->excerpt }}

// 3. Create @endforeach directive
create_statement_with_code({ file: "<file-uuid>", code: "@endforeach" })
create_element({ type: "s-directive", page: "<route-uuid>" })
update_element({ uuid: "<endforeach-uuid>", data: { "statement": "<endforeach-statement-uuid>" } })

循环项属性: 在 @foreach 循环中,使用以下元素属性来引用 $item:

  • textField: "fieldName" → 输出 {{ $item->fieldName }}
  • hrefField: "fieldName" → 输出 href="{{ $item->fieldName }}"
  • srcField: "fieldName" → 输出 src="{{ $item->fieldName }}"
  • hrefExpression: "{{ route('posts.show', $item->slug) }}" → 用于复杂表达式
  • srcExpression、altExpression → 其他属性使用相同模式

update_element

更新现有 UI 元素。

参数:

  • uuid(必填):要更新的元素 UUID
  • data(必填):包含 HTML 属性和 Stellify 字段的对象

标准 HTML 属性: placeholder、href、src、type 等。

Stellify 字段:

  • name:编辑器中的元素名称
  • type:元素类型
  • locked:禁止编辑(布尔值)
  • tag:HTML 标签(div、input、button 等)
  • classes:CSS 类数组 ["class1", "class2"]
  • text:静态文本内容
  • statements:动态 Blade 内容的语句 UUID 数组

循环项字段(用于 @foreach 循环内引用 $item 的元素):

  • textField:字段名称 → 输出 {{ $item->fieldName }}
  • hrefField:字段名称 → 输出 href="{{ $item->fieldName }}"
  • srcField:字段名称 → 输出 src="{{ $item->fieldName }}"

表达式属性(用于复杂 Blade 表达式):

  • hrefExpression:href 的完整 Blade 表达式(例如 "{{ route('posts.show', $item->slug) }}")
  • srcExpression:src 的完整 Blade 表达式
  • altExpression:alt 的完整 Blade 表达式

事件处理器(将值设为方法 UUID):

  • click:@click
  • submit:@submit
  • change:@change
  • input:@input
  • focus:@focus
  • blur:@blur
  • keydown:@keydown
  • keyup:@keyup
  • mouseenter:@mouseenter
  • mouseleave:@mouseleave

get_element

按 UUID 获取单个元素。

参数:

  • uuid(必填):元素的 UUID

get_element_tree

以分层树结构获取一个元素及其所有后代元素。

参数:

  • uuid(必填):根元素的 UUID

delete_element

删除一个元素及其所有子元素(级联删除)。

参数:

  • uuid(必填):要删除的元素 UUID

search_elements

搜索项目中的元素。

参数:

  • search(可选):用于匹配元素名称、类型或内容的搜索词
  • type(可选):按元素类型筛选
  • include_metadata(可选):包含其他元数据(默认值:false)
  • per_page(可选):每页结果数,范围为 1-100(默认值:20)

html_to_elements

一次性将 HTML 转换为 Stellify 元素。这是构建界面最快的方式!

参数:

  • elements(必填):要转换的 HTML 字符串
  • page(可选):要将元素附加到的路由 UUID。用于 Vue 组件时请省略。
  • selection(可选):要将元素附加到的父元素 UUID(page 的替代项)
  • file(可选):Vue 组件文件 UUID。传入此参数可自动将 @click 处理程序关联到方法 UUID。
  • test(可选):如果为 true,则返回结构,但不创建元素

⚠️ 重要:多个根元素

传入包含多个根级元素(例如 <header>、<main>、<footer>)的 HTML 时,只有第一个根元素会通过 routeParent 附加到路由。其他元素会被创建,但会成为孤立元素(未附加到路由)。

错误的做法(会导致元素孤立):

html_to_elements(page: routeUUID, elements: "<header>...</header><main>...</main><footer>...</footer>")
// Result: Only <header> is attached to the route. <main> and <footer> are orphaned!

正确的做法(为每个根元素分别调用):

// Call 1: Header
html_to_elements(page: routeUUID, elements: "<header>...</header>")

// Call 2: Main content
html_to_elements(page: routeUUID, elements: "<main>...</main>")

// Call 3: Footer
html_to_elements(page: routeUUID, elements: "<footer>...</footer>")

功能:

  • 解析 HTML 结构
  • 创建所有元素并正确嵌套
  • 保留属性、类和文本内容
  • 自动检测 Vue 绑定({{ variable }})并创建关联语句
  • 返回元素 UUID,供 save_file 模板数组使用

元素类型映射:

  • button、input、textarea、select → s-input
  • div、span、p、section 等 → s-wrapper
  • form → s-form
  • img、video、audio → s-media

全局库工具
list_globals

列出 Application 数据库中的所有全局文件。全局文件是可安装到租户项目中的可复用精选代码。

**参数:**无


get_global

获取全局文件及其所有方法、语句和子句。

参数:

  • uuid(必填):全局文件的 UUID

install_global

将 Application 数据库中的全局文件安装到租户项目中。

参数:

  • file_uuid(必填):要安装的全局文件的 UUID
  • directory_uuid(必填):要安装到的目录的 UUID

search_global_methods

搜索 Application 数据库中的方法(全局方法/框架方法)。

参数:

  • query(必填):用于按名称查找方法的搜索查询

模块工具

模块是相关全局文件的命名集合,可一起安装。

list_modules

列出所有可用模块。

**参数:**无


get_module

获取模块及其所有文件。

参数:

  • uuid(必填):模块的 UUID

create_module

创建一个新模块,用于归类相关全局文件。

参数:

  • name(必填):模块的唯一名称(例如,"laravel-sanctum-auth")
  • description(可选):模块所提供内容的说明
  • version(可选):版本字符串(默认值:"1.0.0")
  • tags(可选):用于分类的标签(例如,["auth", "api", "sanctum"])

add_file_to_module

将全局文件添加到模块。

参数:

  • module_uuid(必填):模块的 UUID
  • file_uuid(必填):要添加的全局文件的 UUID
  • order(可选):安装顺序(未指定时自动递增)

install_module

将模块中的所有文件安装到租户项目中。

参数:

  • module_uuid(必填):要安装的模块的 UUID
  • directory_uuid(必填):要安装文件的目录的 UUID

Stellify 的工作原理

Stellify 会将应用程序代码以结构化 JSON的形式存储在数据库中,而不是存储为文本文件。这种架构可实现:

  • 精准修改: AI 可修改特定方法,而不影响其他代码
  • 像查询数据一样查询代码库: 查找所有使用特定类的方法
  • 即时重构: 即时重命名整个应用程序中的方法
  • 在语句级别进行版本控制: 跟踪单条代码语句的变更
  • AI 原生开发: 为 AI 提供细粒度的访问权限,无需担心破坏现有代码
  • 自动解析依赖项: 自动从 Laravel API 文档中获取框架类

通过此 MCP 服务使用 Stellify 进行构建时,代码会被解析为结构化数据,并可在部署时重新组装为可执行代码。

依赖项解析

使用 auto_create_dependencies 时,Stellify 会按以下顺序解析依赖项:

  1. 租户数据库 - 检查项目中是否存在该类
  2. 应用程序数据库 - 检查预定义类的全局库
  3. Laravel API 文档 - 对于核心 Illuminate\* 类,从 api.laravel.com 获取
  4. Vendor 目录 - 对于已安装的包,直接从 vendor/ 中读取
支持的包来源
来源命名空间方法
Laravel APIIlluminate\*从 api.laravel.com 获取
VendorLaravel\Socialite\*从 vendor/laravel/socialite 读取
VendorLaravel\Cashier\*从 vendor/laravel/cashier 读取
VendorLaravel\Sanctum\*从 vendor/laravel/sanctum 读取
VendorLaravel\Passport\*从 vendor/laravel/passport 读取
VendorSpatie\*从 vendor/spatie/* 包中读取
VendorLivewire\*从 vendor/livewire/livewire 读取
VendorInertia\*从 vendor/inertiajs/inertia-laravel 读取

对于 Vendor 包,Stellify 会使用 PHP-Parser 从已安装的包版本中提取实际的方法签名,确保与特定依赖项保持一致。

代码结构
Directory
  └── File
        └── Method
              ├── Parameters (Clauses)
              └── Statements
                    └── Clauses / Language Tokens

每段代码会拆分为:

  • 目录:用于组织文件的容器
  • 文件:包含方法和文件元数据
  • 方法:包含参数和主体语句的函数
  • 语句:一行代码或一条代码语句
  • 子句:叶节点(变量、字符串、数字等)
  • 语言令牌:系统定义的关键字和符号(可复用)

工作流

PHP 控制器工作流
  1. get_project → 查找目录 UUID
  2. create_file → type='controller',name='UserController'
  3. create_method → name='store',parameters=[{name:'request', type:'Request'}]
  4. add_method_body → code='return response()->json($request->all());'
Vue 组件工作流
  1. get_project → 查找 'js' 目录 UUID
  2. create_file → 在 js 目录中设置 type='js'、extension='vue'
  3. 为导入语句和数据创建语句:
    • create_statement + add_statement_code:"import { ref } from 'vue';"
    • create_statement + add_statement_code:"const count = ref(0);"
  4. create_method + add_method_body → 创建函数
  5. html_to_elements → 将模板 HTML 转换为元素
  6. update_element → 关联事件处理程序(click → 方法 UUID)
  7. save_file → 使用以下内容完成保存:
    • extension:'vue'
    • template:[rootElementUuid]
    • data:[methodUuid](仅 METHOD UUID)
    • statements:[importStmtUuid, refStmtUuid](STATEMENT UUID)

开发

监视模式(更改时自动重新构建):
npm run watch
手动构建:
npm run build

故障排除

“STELLIFY_API_TOKEN environment variable is required”

请确保 .env 文件存在且包含 API 令牌。

“Connection refused” 或 API 错误
  • 确认 API 令牌有效
  • 检查 STELLIFY_API_URL 是否正确
  • 直接测试 API:curl -H "Authorization: Bearer YOUR_TOKEN" https://stellisoft.com/api/v1/file/search
Claude Desktop 中看不到工具
  1. 确认配置文件路径适用于你的操作系统
  2. 检查 Stellify API 令牌是否有效
  3. 完全重启 Claude Desktop(选择退出,而不只是关闭窗口)
  4. 检查 Claude Desktop 日志中的错误消息
构建时出现 TypeScript 错误
rm -rf node_modules package-lock.json
npm install
npm run build
安装问题
# Clear npm cache and reinstall
npm cache clean --force
npm uninstall -g @stellisoft/stellify-mcp
npm install -g @stellisoft/stellify-mcp

架构

Claude Desktop (AI)
       ↓ (stdio)
Stellify MCP Server (Node.js)
       ↓ (HTTPS)
Stellify API (Laravel)
       ↓
Database (Structured Code)

MCP 服务是一个轻量客户端,它:

  1. 向 Claude 提供工具
  2. 将工具调用转换为 API 请求
  3. 返回格式化的响应

贡献

欢迎参与贡献!请参阅我们的贡献指南,并随时提交拉取请求。

支持

如有问题或疑问:

关于 Stellify

Stellify 正在构建 AI 原生软件开发的未来。通过将代码存储为结构化数据,而非文本文件,我们开启了一种全新的模式,让 AI 和人类能够无缝协作,更快地构建更优秀的软件。

访问 stellisoft.com 了解详情。

许可证

MIT 许可证——详情请参阅 LICENSE 文件


Stellify 团队倾情打造

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。