@fui-org/fui-mcp
v1.1.3
Published
MCP server for FUI low-code system - manage projects and modules via AI
Downloads
703
Readme
FUI MCP Server
MCP server for FUI low-code system — manage projects, modules, components, and database via AI.
Quick Start
No installation required:
npx @fui-org/fui-mcpConfiguration
Required Environment Variables
| Variable | Description |
|---|---|
| FUI_API_TOKEN | Bearer token from your FUI account |
| FUI_API_BASE | FUI API base URL, e.g. https://api.fui.vn |
| FUI_MCP_WORKDIR | Local workspace root (default: ~/.fui-mcp/workspaces) |
1. Claude Code (CLI) — Recommended
claude mcp add fui-local -s user \
-e "FUI_API_TOKEN=your_token" \
-e "FUI_API_BASE=https://api.fui.vn" \
-e "FUI_MCP_WORKDIR=/your/workspace/path" \
-- npx -y @fui-org/fui-mcp2. Claude Desktop
Add to %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"fui-local": {
"command": "npx",
"args": ["-y", "@fui-org/fui-mcp"],
"env": {
"FUI_API_TOKEN": "your_token",
"FUI_API_BASE": "https://api.fui.vn",
"FUI_MCP_WORKDIR": "/your/workspace/path"
}
}
}
}3. SSE Mode (HTTP server)
Run as an HTTP/SSE server to connect from web clients or remote tools:
npx @fui-org/fui-mcp --sse
# Listening on http://localhost:3001
# Custom port:
npx @fui-org/fui-mcp --sse --port 8080Local Workspace Layout
On first use, the server creates the following structure under FUI_MCP_WORKDIR:
{FUI_MCP_WORKDIR}/
├── _skills/
│ └── fui-skill/ ← Shared skill files (auto-synced on server start)
│ ├── SKILL.md
│ └── references/
└── {projectId}/
├── _projectInfo.json
├── project.json
├── imports/
│ └── _imports.json
├── components/
│ ├── _components.json
│ └── uc-*.vue
├── modules/
│ └── {moduleId}/
│ ├── _moduleInfo.json
│ ├── module.json
│ ├── script.js
│ └── components/
│ ├── _components.json
│ └── uc-*.vue
└── _db/
├── config.json
├── schema.json
└── sp/
└── {name}.sqlSession files are stored separately in ~/.fui-mcp/session/ as session-{pid}.json per stdio process, enabling multiple Claude Code windows to work independently.
Recommended Workflow
- Call
session_resolvewith/projectId/moduleIdto verify the target - Call
module_checkoutto fetch the module into local workspace — also sets the active session target - Read
lowcode://skill/fuior callskill_getfor FUI coding guidelines - Edit local files in
{workspaceRoot}/{projectId}/modules/{moduleId}/ - Call
module_previewto review staged changes before publishing - Call
module_publishto push changes back to FUI
Tools
Session
| Tool | Description |
|---|---|
| session_set | Set the active module target for this session |
| session_get | Get the current active module target |
| session_clear | Clear the active module target |
| session_resolve | Resolve a /projectId/moduleId string into concrete IDs |
Project
| Tool | Description |
|---|---|
| project_list | List available FUI projects |
| project_get_data | Get full project data (modules, components, imports) |
| project_sync | Sync project data from server to local workspace |
| project_save | Save project-level changes |
| project_update_data | Update project data on server |
Module
| Tool | Description |
|---|---|
| module_list | List modules in a project |
| module_new | Create a new module (HTML page) |
| module_get | Get raw module content from server |
| module_get_ui | Get module UI definition (JSON) |
| module_get_html | Get module rendered HTML |
| module_checkout | Checkout a module into local workspace |
| module_sync | Refresh a checked-out module from server |
| module_sync_list | List all locally checked-out modules |
| module_preview | Preview staged local changes |
| module_publish | Publish staged local module back to FUI (requires approval token from preview) |
| module_update_ui | Update module UI definition |
| module_update_import | Update module import references |
Component
| Tool | Description |
|---|---|
| component_get | Get a component definition |
| component_publish | Publish component changes |
| component_sync | Sync component from server |
Script & Import Files
| Tool | Description |
|---|---|
| script_publish | Publish module script |
| file_import_list | List import files for a project |
| file_import_get | Get a specific import file |
| file_import_new | Create a new import file |
| file_import_update | Update an import file |
| file_import_delete | Delete an import file |
| file_import_sync | Sync import files from server |
| file_import_upload | Upload a binary import file |
Skill & Design
| Tool | Description |
|---|---|
| skill_get | Get FUI skill content |
| skill_sync | Re-sync skill files to workspace |
| design_list | List available design references |
| design_get | Get a specific design reference |
Database (tAPI)
| Tool | Description |
|---|---|
| db_connect | Connect to a database and fetch schema |
| db_config_get | Get current DB config (token values hidden) |
| db_token_rebuild | Rebuild dbToken from updated UID/password |
| db_user_token_set | Set user token for tAPI testing |
| db_schema_fetch | Refresh schema from live DB |
| db_schema_get | Read local schema cache |
| db_sql_execute | Run a SELECT query |
| db_sql_execute_nonquery | Run DDL/DML (CREATE, INSERT, …) |
| db_sp_get | Fetch stored procedure definition from DB |
| db_sp_save | Save SP SQL to local file (no deploy) |
| db_sp_deploy | Deploy local SP file to DB |
| db_sp_list | List DB objects from local schema |
| db_sp_delete | Drop a stored procedure or function |
| db_sp_rename | Rename a DB object via sp_rename |
Resources
| URI | Description |
|---|---|
| lowcode://modules/{projectId}/{moduleId} | Module content |
| lowcode://components/{projectId}/{moduleId} | Module components |
| lowcode://script/{projectId}/{moduleId} | Module script |
| lowcode://dependencies/{projectId}/{moduleId} | Module dependencies |
| lowcode://library/v2 | Full FUI V2 library |
| lowcode://library/v2/component | Component definitions |
| lowcode://library/v2/componentTable | Component table layout |
| lowcode://library/v2/defaultfunction | Default function library |
| lowcode://library/v2/fastproject | Fast project templates |
| lowcode://library/v2/defaultstyle | Default CSS styles |
| lowcode://skill/fui | FUI skill summary (concise) |
| lowcode://skill/fui/raw | Full bundled SKILL.md |
Prompts
| Prompt | Description |
|---|---|
| generate-vue-component | Generate a Vue 2 component for FUI |
DB Safety Guards
Enforced at code level — cannot be bypassed via prompts:
| Operation | Behavior |
|---|---|
| DROP TABLE / ALTER TABLE | Blocked, returns error |
| DELETE / UPDATE without WHERE | Blocked, returns display-only SQL for manual review |
| db_sp_deploy | Auto-saves current SP to _db/sp-history/{name}_{timestamp}.sql before deploying |
Development
# Install dependencies
npm install
# Build
npm run build
# Run in SSE mode
npm startRequires Node.js >= 18.
