Token导航 LogoToken导航TokenDH.com
3D Cartoon Generator & File System MCP Server logo
设计创作未说明官方级别未说明来源级核验

3D Cartoon Generator & File System MCP Server

MCP Server

一款结合3D卡通图像生成与安全文件系统操作的专业级服务器工具,适用于儿童内容创作和文件管理场景。

工具数

6

提示词数

0

GitHub Stars

3

资源数

0
安全JavaScriptClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

falahgs

提供方

falahgs

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

MCP组合服务器:3D卡通生成器和文件系统工具

提供两个主要功能的专业级服务器:

  1. 使用谷歌的Gemini AI生成高质量的3D风格卡通图像
  2. 用于读取、写入和管理文件的安全文件系统操作

3D Cartoon Generator Demo

🌟 特性

图像生成

  • 3D卡通一代:创建高质量的3D风格卡通图像
  • 儿童友好设计:注重丰富多彩、有趣和引人入胜的视觉效果
  • 谷歌搜索结果预览功能:在默认浏览器中自动打开生成的图像
  • 本地存储:将图像和预览保存在有组织的输出目录中

文件系统操作

  • 安全文件访问:路径验证和安全检查
  • 读/写文件:读取和写入文本文件内容
  • 目录操作:列出、创建和导航目录
  • 文件搜索:查找与图案匹配的文件

系统功能

  • 专业配置:强大的错误处理和受控日志记录
  • 与跨平台支持:适用于Windows、macOS和Linux的智能文件路径处理
  • 智能操作系统检测:自动为每个操作系统找到最佳保存位置
  • 安全控制:通过配置限制目录访问

🛠️ 技术栈

  • 核心框架:模型上下文协议(MCP)SDK
  • 人工智能集成:谷歌生成人工智能(Gemini)
  • 运行时:Node.js v14+
  • 语言:TypeScript
  • 程序包管理器:npm

📋 先决条件

  • Node.js(v14或更高版本)
  • Google Gemini API密钥
  • TypeScript

⚙️ 安装

  1. 克隆存储库:
git clone https://github.com/falahgs/mcp-3d-style-cartoon-gen-server.git
cd mcp-3d-style-cartoon-gen-server
  1. 安装依赖项:
npm install
  1. 配置环境:

创建一个 .env 根目录中的文件:

GEMINI_API_KEY=your_api_key_here
ALLOWED_DIRECTORIES=/path/to/allowed/dir1,/path/to/allowed/dir2
  1. 构建项目:
npm run build

🔧 使用MCP服务器配置Claude Desktop

要将此组合服务器与Claude Desktop集成,请执行以下操作:

  1. 找到配置文件:

- 窗户: %APPDATA%\Claude\claude_desktop_config.json - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - Linux: ~/.config/Claude/claude_desktop_config.json

  1. 添加以下配置:
{
  "mcpServers": {
    "mcp-3d-cartoon-generator": {
      "command": "node",
      "args": [
        "path/to/your/build/index.js"
      ],
      "env": {
        "GEMINI_API_KEY": "your_gemini_api_key_here",
        "IS_REMOTE": "true",
        "SAVE_TO_DESKTOP": "true",
        "DETECT_OS_PATHS": "true",
        "ALLOWED_DIRECTORIES": "C:\\Users\\YourUsername\\Desktop,C:\\Users\\YourUsername\\Documents",
        "DEBUG": "false"
      }
    }
  }
}

Windows PowerShell帮助程序脚本

对于Windows用户,您可以使用附带的 fix_claude_config.ps1 自动配置Claude Desktop的脚本:

  1. 编辑脚本以更新服务器构建的路径和Gemini API密钥
  2. 在PowerShell中运行脚本:
powershell -ExecutionPolicy Bypass -File .\fix_claude_config.ps1

这将创建或更新具有正确编码和设置的配置文件。

🚀 可用工具

1.图像生成工具

{
  "name": "generate_3d_cartoon",
  "description": "Generates a 3D style cartoon image for kids based on the given prompt",
  "inputSchema": {
    "type": "object",
    "properties": {
      "prompt": {
        "type": "string",
        "description": "The prompt describing the 3D cartoon image to generate"
      },
      "fileName": {
        "type": "string",
        "description": "The name of the output file (without extension)"
      }
    },
    "required": ["prompt", "fileName"]
  }
}

2.文件系统工具

读取文件

{
  "name": "read_file",
  "description": "Read the contents of a file",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "Path to the file to read"
      }
    },
    "required": ["path"]
  }
}

写入文件

{
  "name": "write_file",
  "description": "Write content to a file",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "Path to the file to write"
      },
      "content": {
        "type": "string",
        "description": "Content to write to the file"
      }
    },
    "required": ["path", "content"]
  }
}

列表目录

{
  "name": "list_directory",
  "description": "List the contents of a directory",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "Path to the directory to list"
      }
    },
    "required": ["path"]
  }
}

创建目录

{
  "name": "create_directory",
  "description": "Create a new directory",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "Path to the directory to create"
      }
    },
    "required": ["path"]
  }
}

搜索文件

{
  "name": "search_files",
  "description": "Search for files matching a pattern",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "Base directory to search from"
      },
      "pattern": {
        "type": "string",
        "description": "Search pattern (glob format)"
      },
      "excludePatterns": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Patterns to exclude from search (glob format)"
      }
    },
    "required": ["path", "pattern"]
  }
}

📄 示例用法

图像生成示例

// Generate a 3D cartoon
{
  "name": "generate_3d_cartoon",
  "arguments": {
    "prompt": "A friendly robot playing with a cat",
    "fileName": "robot_cat_play"
  }
}

文件系统示例

// Read a file
{
  "name": "read_file",
  "arguments": {
    "path": "C:/Users/YourUsername/Documents/example.txt"
  }
}

// Write a file
{
  "name": "write_file",
  "arguments": {
    "path": "C:/Users/YourUsername/Documents/new-file.txt",
    "content": "This is the content of the file."
  }
}

// List directory contents
{
  "name": "list_directory",
  "arguments": {
    "path": "C:/Users/YourUsername/Documents"
  }
}

// Create a directory
{
  "name": "create_directory",
  "arguments": {
    "path": "C:/Users/YourUsername/Documents/new-folder"
  }
}

// Search for files
{
  "name": "search_files",
  "arguments": {
    "path": "C:/Users/YourUsername/Documents",
    "pattern": "*.txt",
    "excludePatterns": ["temp*", "*.tmp"]
  }
}

🔒 安全功能

服务器实施了多种安全措施:

  1. 路径验证:所有文件路径都经过验证,以确保它们在允许的目录内。
  2. 允许的目录:仅在 ALLOWED_DIRECTORIES 可以访问环境变量。
  3. Symlink保护:防止通过符号链接访问允许范围之外的目录。
  4. 受控测井:默认情况下禁用调试日志以防止信息泄漏。

⚙️ 配置选项

环境变量

变量描述默认值
GEMINI_API_KEY用于图像生成的Google Gemini API密钥(必需)
ALLOWED_DIRECTORIES逗号分隔的允许文件系统路径列表用户的主目录、当前目录
IS_REMOTE在不打开浏览器的情况下以远程模式运行false
SAVE_TO_DESKTOP强制保存到桌面目录false
DETECT_OS_PATHS启用特定于操作系统的路径检测true
DEBUG启用详细调试日志记录false

🛠️ 故障排除

常见问题:

  1. Claude中的JSON解析错误:

- 确保 DEBUG 设置为“false”以防止日志干扰JSON通信 - 检查Claude配置中的JSON格式是否正确

  1. 文件访问被拒绝:

- 验证您尝试访问的路径是否包含在 ALLOWED_DIRECTORIES - 检查目标文件/目录的文件权限

  1. 图像未保存:

- 集 SAVE_TO_DESKTOP 设置为“true”以确保图像保存到桌面 - 检查服务器日志中的桌面路径检测(暂时启用DEBUG)

📄 许可证

MIT许可证

🤝 贡献

欢迎投稿!请随时提交拉取请求。

目录标签

目录标签

安全JavaScriptClaude3D卡通生成本地部署文件管理AI图像生成跨平台工具安全文件操作

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

6

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP