MCP ExplorerExplorer

Grok Mcp

@8bitsatson a year ago
5 MIT
FreeCommunity
AI Systems
A server that connects to the xAI/Grok image generation API that provides endpoints for text and image analysis using X.AI's Grok models. ## Features - Text analysis using Grok-2 - Image analysis using Grok Vision - Simple REST API interface - Built-in error handling and validation

Overview

What is Grok Mcp

Grok-MCP is a server that connects to the xAI/Grok image generation API, providing endpoints for text and image analysis using X.AI’s Grok models.

Use cases

Use cases for Grok-MCP include generating unique images for social media campaigns, creating visuals for presentations, and developing applications that require real-time image generation and analysis.

How to use

To use Grok-MCP, generate images by sending prompts to the server, such as ‘Generate an image of a cat in a space suit’. You can also run the server in Docker by building it with the provided Dockerfile and running it with your API key.

Key features

Key features of Grok-MCP include text analysis using Grok-2, image analysis using Grok Vision, a simple REST API interface, built-in error handling, validation, support for generating multiple images, and different response formats.

Where to use

Grok-MCP can be used in various fields such as creative industries for generating artwork, marketing for creating promotional images, and technology for image analysis and enhancement.

Content

Grok AI Image Generation MCP Server

AI Image Generation MCP Server

A server that connects to the xAI/Grok image generation API
Implemented proper error handling with lazy API key initialization
Added support for multiple image generation (up to 10 images)
Added support for different response formats (URL or base64 JSON)
Docker Support:

Added a Dockerfile to containerize the MCP server
Configured the Dockerfile with a dummy API key that can be overridden at runtime
Set up proper layer caching for efficient builds
MCP Tools Available:

generate_image: Generate images using the Grok-2-image model
set_api_key: Set the xAI API key at runtime if not provided via environment variable
How to Use
You can now generate images with prompts like:

“Generate an image of a cat in a space suit”
“Create a picture of a futuristic city at night”
The MCP server has been configured in your Claude desktop app, and the implementation handles API key management gracefully, allowing the server to start even without an API key initially set.

If you want to run the server in Docker, you can build and run it with:

cd /Users/8bit/Documents/Cline/MCP/ai-image-generator
docker build -t grokart .
docker run -e XAI_API_KEY=your-api-key -p 8080:8080 grokart

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers