letsgal-ai MCP Server

letsgal-ai MCP Server

Enables AI agents to programmatically create and manage LetsGal Studio visual novel projects via a story DSL, supporting project initialization, story compilation, dialogue/narration addition, validation, and asset registration through MCP tools.

Category
Visit Server

README

letsgal-ai — AI 辅助 LetsGal Studio 创作工具链

从零逆向 LetsGal Studio 工程格式,把它变成 AI 可以直接创作 的工具: 一行式故事 DSL → 完整可运行工程(章节/角色/场景/分支/演出),CLI 与 MCP 双通道,零依赖。

为什么

LetsGal Studio 是桌面 GUI 编辑器(无 MCP、无 CLI),但它的一切都是磁盘上的普通 JSON。 本项目把该格式完全程序化:

  • AI 生成剧本 → 一行命令编译成工程 → Studio 打开即玩(可再精修演出/素材)
  • 格式完全对齐官方(project.json / characters.json / scenes.json / chapters/*.json / assets/.manifest.json), Studio 打开零报错,自动修复合入角色表情、替换素材都自然

快速开始

# 安装(无需依赖,直接 clone 或 npm link)
npm link                    # 或 node bin/letsgal-ai.js …

# 1. 初始化工程骨架
letsgal-ai init my-game --name "时间的河流"

# 2. 写故事(见 examples/example.dsl)→ 编译
letsgal-ai build story.dsl -o my-game --name "时间的河流"

# 3. 校验
letsgal-ai validate my-game

# 4. 用 LetsGal Studio 打开 my-game → 播放

MCP(AI Agent 直接调用)

letsgal-ai mcp     # stdio JSON-RPC 2.0,零依赖实现

暴露工具:

工具 说明
letsgal_init 初始化工程骨架
letsgal_compile 故事 DSL → 完整工程(自动注册角色/场景)
letsgal_add_dialogue / letsgal_add_narration 追加对白/旁白 Block
letsgal_validate 校验结构 + 资产引用
letsgal_register_asset 登记资产到 .manifest.json
letsgal_list_chapters 章节/Fragment 统计

任何 MCP 客户端(Claude Code / DSH / 自研)配置 node bin/letsgal-ai.js mcp 即可。

CLI

letsgal-ai init <dir> [--name 标题]
letsgal-ai build <story.dsl> -o <dir> [--name 标题]
letsgal-ai validate <dir>
letsgal-ai list <dir>
letsgal-ai mcp

作为库使用

import { compileStory, initProject, validateProject, applyCharacterFlow, dialogue, narration, scene } from '@lilyco-42/letsgal-ai';

开发

npm test        # 冒烟测试:init → build → validate → MCP 握手

授权与致谢

  • 本工具 MIT;不含素材。生成的工程可直接使用 LetsGal Studio 官方模板素材(随引擎提供)
  • 逆向依据:LetsGal Studio 1.11.0(Windows)安装包 + 官方模板工程

Roadmap

  • [ ] Ren'Py 风格代码 ↔ Block 双向转换(对齐官方代码编辑器语法)
  • [ ] 无头构建(复用官方 build-worker 产出 web 版)
  • [ ] lilyco(Rust)原生组件:lilyco-letsgal(见 docs/lyco-integration.md)

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured