Spaces:
Running on Zero
A newer version of the Gradio SDK is available: 6.22.0
MCP (Model Context Protocol) Integration
This Space is accessible via the Model Context Protocol, allowing integration with MCP clients like Cursor, Claude Desktop, and other compatible tools.
Configuration
For Claude Desktop
Add the following to your Claude Desktop MCP configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"flux-texture-lora": {
"url": "https://huggingface.co/spaces/gokaygokay/Flux-Seamless-Texture-LoRA/gradio_api/mcp/",
"type": "http"
}
}
}
For Cursor
Add to your Cursor MCP configuration:
{
"mcpServers": {
"flux-texture-lora": {
"url": "https://huggingface.co/spaces/gokaygokay/Flux-Seamless-Texture-LoRA/gradio_api/mcp/",
"type": "http"
}
}
}
Available Tools
generate_texture
Generate a texture image with specified parameters.
Parameters:
prompt(str): Text prompt for generationnegative_prompt(str, optional): Negative promptguidance_scale(float, optional): Guidance scale (default: 7.5)num_inference_steps(int, optional): Number of steps (default: 50)seed(int, optional): Random seedwidth(int, optional): Image width (default: 1024)height(int, optional): Image height (default: 1024)
Returns:
dict: Containssuccess,image_path,seed, andmessage
generate_batch_textures
Generate multiple textures in batch.
Parameters:
prompts(List[str]): List of promptsguidance_scale(float, optional): Guidance scalenum_inference_steps(int, optional): Number of steps
Returns:
dict: Containssuccess,total, andresultslist
get_presets
Get list of available presets.
Returns:
dict: Containspresetslist anddetailsdictionary
get_history
Get generation history.
Parameters:
limit(int, optional): Maximum entries to return (default: 10)
Returns:
dict: Containstotalandentrieslist
download_image
Get information about an image for download.
Parameters:
image_path(str): Path to the image
Returns:
dict: Containssuccess,image_path, andmetadata
Available Resources
presets://
Access preset definitions as JSON.
Example:
presets://wood-texture
history://
Access generation history as JSON.
Example:
history://recent
examples://
Access example images information.
Example:
examples://list
Usage Examples
Using with Claude Desktop
- Configure MCP in Claude Desktop settings
- Restart Claude Desktop
- Ask Claude to generate a texture:
Generate a wood texture using the flux-texture-lora tool
Using with Cursor
- Configure MCP in Cursor settings
- Use the MCP tools in your code:
# Cursor can now access the MCP tools # to generate textures programmatically
Troubleshooting
Connection Issues
- Verify the Space URL is correct
- Check that the Space is running
- Ensure MCP is enabled in the Space configuration
Tool Errors
- Check parameter types and ranges
- Verify prompts are not empty
- Ensure image dimensions are multiples of 8
API Endpoint
The MCP endpoint is available at:
/gradio_api/mcp/
Full URL:
https://huggingface.co/spaces/gokaygokay/Flux-Seamless-Texture-LoRA/gradio_api/mcp/