NELC应用工厂MCP服务器
直接从Cursor IDE生成生产就绪的Cloud Run应用程序。
此MCP(模型上下文协议)服务器允许您在Cursor中使用自然语言生成完整、可部署的应用程序。
特性
- 🚀 一次指挥部署 到GCP云运行
- 🗄️ PostgreSQL数据库 (可选,自动配置)
- 📦 云存储 (可选,自动配置)
- 🔒 HTTPS与SSL (自定义域自动)
- ⚛️ 现代技术栈 (Node.js+React)
快速开始
一次性设置(自动)
运行以下单个命令:
curl -fsSL https://raw.githubusercontent.com/nelc/appfactory-v2-mcp/main/setup.sh | bash这会自动:
- ✅ 检查Node.js和GitHub CLI
- ✅ 安装MCP工具
- ✅ 配置光标
- ✅ 验证GitHub
然后重新启动Cursor。
手动安装(替代)
如果您更喜欢手动设置:
# 1. Install MCP tool
npm install -g git+https://github.com/nelc/appfactory-v2-mcp.git
# 2. Configure Cursor
# Add to ~/.config/cursor/mcp.json (Mac/Linux) or %APPDATA%\Cursor\mcp.json (Windows):
{
"mcpServers": {
"app-factory": {
"command": "app-factory-mcp"
}
}
}
# 3. Restart Cursor用法
步骤1:在游标中生成代码
开始新的聊天,然后说:
Generate my Customer Tracker app using the App Factory tool.
Features:
- Add/edit/delete customers
- Search customers by name
- Export to CSV
- Customer notes
Needs database: yes
Needs file storage: no等待所有文件生成。
步骤2:部署
在游标终端中:
cd ~/customer-tracker # or wherever code was generated
./deploy.sh就是这样! 脚本处理:
- ✅ Git初始化
- ✅ GitHub仓库创建
- ✅ 代码推送
- ✅ 部署触发器
步骤3:添加DNS
大约5分钟后,工作流输出:
📋 Add DNS: customer-tracker.futurex.sa → 34.xxx.xxx.xxx在Cloudflare中添加此A记录,然后访问: https://customer-tracker.futurex.sa
例子
简单的所有应用程序
Generate my Todo List app using App Factory tool.
Features:
- Add/delete todos
- Mark complete
- Filter by status
Needs database: yes文件上传应用程序
Generate my Document Manager app using App Factory tool.
Features:
- Upload documents
- Organize in folders
- Search files
- Download/delete
Needs database: yes
Needs file storage: yesAPI服务
Generate my Inventory API using App Factory tool.
Features:
- CRUD operations for inventory
- Stock level tracking
- Low stock alerts
- REST API endpoints
Needs database: yes部署后
工作流将输出DNS配置:
📋 DNS CONFIGURATION REQUIRED:
Type: A
Name: customer-tracker.futurex.sa
Value: 34.xxx.xxx.xxx
TTL: Auto将此记录添加到您的DNS提供商(Cloudflare)中,您的应用程序将在以下网址上线:
https://customer-tracker.futurex.sa故障排除
“MCP服务器没有响应”
- 验证安装:
which app-factory-mcp - 检查Node.js版本:
node --version(要求18+) - 重新启动游标
“生成提示失败”
- 检查互联网连接
- 验证门户是否可访问:
curl https://appfactory-v2-portal-621571041797.me-central2.run.app/api/health“部署失败”
- 检查GitHub操作日志
- 验证GitHub组织成员资格
- 联系管理员获取组织机密
技术细节
生成的技术栈
- 前端: React 18+Vite
- 后端: Node.js 20+Express
- 数据库: PostgreSQL(云SQL)
- 储存: 谷歌云存储
- 部署: 云运行(无服务器)
建筑
每个应用程序获得:
- 2云运行服务(前端+后端)
- 具有唯一静态IP的负载均衡器
- 共享云SQL实例上的数据库
- 带通配符SSL证书的HTTPS
安全与隐私
此MCP服务器的功能:
- 获取您的应用程序要求(名称、功能)
- 将它们发送到公共门户API
- 返回生成的代码生成提示
数据处理:
- ✅ 没有秘密或证书 存储或传输
- ✅ 无代码 发送到外部服务
- ✅ 无专有数据 离开你的机器
- ✅ 仅向门户发送应用程序要求(名称、功能)
- ✅ 门户是公共端点(与web表单相同)
此回购中没有什么:
- ❌ GCP证书
- ❌ 基础设施配置
- ❌ 部署秘密
- ❌ 任何敏感的组织数据
使用安全,公众安全。 ✅
存储库结构
- 此回购(公开): 面向商业用户的MCP服务器
- 基础设施回购(私有): 门户、部署脚本(仅限管理员)
支持
- 文档: 联系您的组织管理员
- 问题: https://github.com/nelc/appfactory-v2-mcp/issues
- MCP协议: https://modelcontextprotocol.io
许可证
麻省理工学院
