0.1.5 • Published 9 months ago
@mrazmat/mcp-replicate v0.1.5
MCP Replicate Server
A Model Context Protocol (MCP) server for running machine learning models on Replicate.
Setup
- Install the package:
npx -y @mrazmat/mcp-replicate- Set your Replicate API key as an environment variable:
export REPLICATE_API_KEY="your-api-key-here"- Configure Claude Desktop by adding this to your
claude_desktop_config.json:
{
"mcpServers": {
"replicate": {
"command": "npx",
"args": ["-y", "@mrazmat/mcp-replicate@0.1.5"],
"env": {
"REPLICATE_API_KEY": "your-api-key-here"
}
}
}
}Important Usage Notes
When asking Claude to generate images, use these guidelines:
Do NOT include SHA hashes/version numbers after the model name
- Correct:
"black-forest-labs/flux-schnell" - Incorrect:
"black-forest-labs/flux-schnell:462ce631b56105646c5442fb7..."
- Correct:
Format your prompts clearly. Example:
Generate an image using the Flux model on Replicate of a serene Japanese garden with cherry blossoms. Use "black-forest-labs/flux-schnell" as the model.Specify detailed parameters if needed:
Generate an image using Flux of two Asian leopard cats playing in a backyard. Use model "black-forest-labs/flux-schnell" with: - prompt: "two Asian leopard cats playing in a backyard, detailed fur, natural lighting" - negative_prompt: "deformed, unrealistic, cartoon-like" - guidance_scale: 7.5
Example Models
Some popular Replicate models you can try:
"black-forest-labs/flux-schnell"- High quality image generation"stability-ai/sdxl"- Stable Diffusion XL"meta/llama-2-70b-chat"- For text generation
Development
# Install dependencies
pnpm install
# Build the project
pnpm build
# Watch for changes
pnpm watch
# Run in development mode
pnpm devLicense
MIT