UNPKG

@kinetixarts/craft-it-mcp-server

Version:

Craft IT - Model Context Protocol (MCP) compliant Server for AI-Powered Asset Generation using Gemini

98 lines (70 loc) 1.91 kB
# Craft-IT MCP Asset Generator ![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg) ![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-3178C6) ![Google Gemini](https://img.shields.io/badge/Gemini-2.0-blue) An MCP (Model Context Protocol) server for generating beautiful images and icons using Google Gemini AI. ## 🚀 Quick Start ```bash # Run with npx (no installation needed) npx @modelcontextprotocol/server-craft-it # Or install globally npm install -g @modelcontextprotocol/server-craft-it server-craft-it ``` ### Required Environment Variables Create a `.env` file in your current directory: ``` GEMINI_API_KEY=your_gemini_api_key_here ``` ## 🌟 Features - Generate high-quality images and icons with Gemini AI - Simple text-to-image generation with customizable parameters - MCP-compatible for AI assistant integration - Control style, color, size, and format ## 💻 Usage Options ### HTTP/SSE Mode (Default) ```bash npx @modelcontextprotocol/server-craft-it ``` This starts the server with an SSE endpoint at `http://localhost:3001/sse`. ### STDIO Mode (for direct integration) ```bash npx @modelcontextprotocol/server-craft-it --stdio ``` This mode is ideal for direct integration with AI assistants. ### Custom Port ```bash PORT=8080 npx @modelcontextprotocol/server-craft-it ``` ## 🔌 Client Integration Connect any MCP-compatible client using the SSE URL: ```json { "mcpServers": { "craft-it": { "url": "http://localhost:3001/sse" } } } ``` ## 🛠️ API Interface Use the `generate` tool to create images: ```json { "name": "generate", "arguments": { "prompt": "A minimalist icon of a rocket ship", "parameters": { "primary_color": "#3498db", "style_descriptor": "flat" }, "output_config": { "format": "png", "width": 256, "height": 256 } } } ``` ## 📄 License MIT