renpy_mcp_server

renpy_mcp_server

Enables AI assistants to create complete Ren'Py visual novel games with AI-generated images, dialogue, branching stories, and web deployment.

Category
访问服务器

README

🎮 Ren'Py MCP Server

Build visual novels with AI! An Model Context Protocol server that lets AI assistants create complete Ren'Py visual novel games with images, dialogue, branching stories, and web deployment.

Version Python MCP

<p align="center"> <img src="media/images/workflow_diagram.png" width="90%" alt="From AI-generated assets to playable game" /> </p>

🎬 See It In Action

🎥 Demo Video

<p align="center"> <img src="media/videos/claude_renpy_mcp.gif" width="80%" alt="Claude creating a visual novel in real-time" /> </p> <p align="center"><em>Watch Claude create a complete visual novel in minutes!</em></p>

📸 Example Outputs

Generated Backgrounds (16:9)

<p align="center"> <img src="media/images/example_background_cafe.png" width="45%" alt="Cozy Cafe Interior" /> <img src="media/images/example_background_tennis.png" width="45%" alt="Tennis Court Scene" /> </p>

Character Sprites with Multiple Emotions (2:3)

<p align="center"> <img src="media/images/example_character_emotions.png" width="80%" alt="Character showing 5 emotions: neutral, happy, sad, surprised, angry" /> </p> <p align="center"><em>One character with 5 emotions (neutral, happy, sad, surprised, angry) - all generated in a single API call!</em></p>

Final Playable Games

<p align="center"> <img src="media/images/game_screenshot_3_dialogue.png" width="45%" alt="Game dialogue scene" /> <img src="media/images/game_screenshot_5_choice_menu.png" width="45%" alt="Interactive choice menu" /> </p> <p align="center"><em>Fully playable web games with branching dialogue and player choices</em></p>

✨ Features

  • 🎨 AI Image Generation - Backgrounds (16:9) and characters (2:3) using Gemini 2.5 Flash Image
  • 🎭 Emotion System - Generate 5 emotions per character in one API call (neutral, happy, sad, surprised, angry)
  • 📝 Script Generation - AI writes complete Ren'Py scripts with dialogue, choices, and branching paths
  • 🌐 Web Builds - Automatically compile to playable web games
  • 🎬 Live Preview - Local HTTP server to test games instantly
  • 🪄 Transparent Sprites - Automatic background removal for character sprites

🚀 Quick Start

Automated Setup

# Clone and setup everything automatically
git clone https://github.com/banjtheman/renpy_mcp_server.git
cd renpy_mcp_server
./setup.sh

# Test your installation
./test_setup.sh

# (Optional) Test image generation directly
uv run python test_nano_banana.py

The setup.sh script will:

  • ✅ Install Python dependencies
  • ✅ Download and setup Ren'Py SDK (OS-specific)
  • ✅ Automatically install web support module
  • ✅ Help configure Gemini API key
  • ✅ Create MCP configuration files
  • ✅ Test everything works

MCP Client Configuration

Add the server to your MCP client configuration (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "renpy_mcp_server": {
      "command": "uv",
      "args": [
        "--directory",
        "/FULL_PATH_TO_RENPY_MCP_SERVER",
        "run",
        "renpy-mcp-server"
      ],
      "env": {
        "GEMINI_API_KEY": "${GEMINI_API_KEY}",
        "RENPY_SDK_PATH": "${RENPY_SDK_PATH}"
      }
    }
  }
}

Replace:

  • /FULL_PATH_TO_RENPY_MCP_SERVER - Full path to this repository
  • ${GEMINI_API_KEY} - Your Gemini API key
  • ${RENPY_SDK_PATH} - Path to Ren'Py SDK (e.g., /path/to/renpy-8.4.1-sdk)

Or use environment variables:

export GEMINI_API_KEY="your-api-key"
export RENPY_SDK_PATH="/path/to/renpy-8.4.1-sdk"

Manual Setup

  1. Install Dependencies

    uv sync
    
  2. Setup Ren'Py SDK

    • SDK and web module are automatically downloaded during setup
    • No manual launcher interaction needed
  3. Get Gemini API Key

  4. Configure Environment

    export RENPY_SDK_PATH="/path/to/renpy-sdk"
    export GEMINI_API_KEY="your-api-key"
    
  5. Add to MCP Client

    • See "MCP Client Configuration" section above
    • The server will start automatically when your MCP client connects

🎮 Usage

Basic Workflow

  1. Create a project

    create_project(name="my_vn")
    
  2. Generate assets

    generate_background(project_name="my_vn", description="Cozy café interior, evening time...")
    generate_character(project_name="my_vn", character_name="alice", description="Friendly barista...", generate_emotions=True)
    
  3. Write the story

    generate_script(project_name="my_vn", script_name="intro", script_content="label intro:\n    scene bg cafe\n    show alice happy\n    Alice \"Welcome!\"\n    return")
    
  4. Inspect and edit (optional)

    list_project_files(project_name="my_vn")  # See all files
    read_project_file(project_name="my_vn", file_path="intro.rpy")  # Read a script
    edit_project_file(project_name="my_vn", file_path="intro.rpy", content="...")  # Update it
    
  5. Build and preview

    build_project(project_name="my_vn")
    start_web_preview(project_name="my_vn")
    

📚 Documentation

  • Examples - Claude Agent SDK and Strands integration examples

🤝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

📄 License

MIT License - see LICENSE for details.


Happy visual novel creating! 🎮✨

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选