mcp-server-replicate


Namemcp-server-replicate JSON
Version 0.1.9 PyPI version JSON
download
home_pageNone
SummaryFastMCP server implementation for the Replicate API, providing resource-based access to AI model inference
upload_time2025-01-06 23:10:23
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords ai image-generation inference mcp replicate stable-diffusion
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MCP Server Replicate

[![Python Version](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Type Checker](https://img.shields.io/badge/type%20checker-mypy-blue.svg)](https://github.com/python/mypy)
[![Ruff](https://img.shields.io/badge/linter-ruff-red.svg)](https://github.com/astral-sh/ruff)
[![PyPI version](https://badge.fury.io/py/mcp-server-replicate.svg)](https://pypi.org/project/mcp-server-replicate/)

A FastMCP server implementation for the Replicate API, providing resource-based access to AI model inference with a focus on image generation.

## Features

- 🖼️ Resource-based image generation and management
- 🔄 Real-time updates through subscriptions
- 📝 Template-driven parameter configuration
- 🔍 Comprehensive model discovery and selection
- 🪝 Webhook integration for external notifications
- 🎨 Quality and style presets for optimal results
- 📊 Progress tracking and status monitoring
- 🔒 Secure API key management

## Available Prompts

The server provides several specialized prompts for different tasks:

### Text to Image (Primary)

Our most thoroughly tested and robust prompt. Optimized for generating high-quality images from text descriptions with:

- Detailed style control
- Quality presets (draft, balanced, quality, extreme)
- Size and aspect ratio customization
- Progress tracking and real-time updates

Example:

```
Create a photorealistic mountain landscape at sunset with snow-capped peaks, quality level: quality, style: photorealistic
```

### Other Prompts

- **Image to Image**: Transform existing images (coming soon)
- **Model Selection**: Get help choosing the right model for your task
- **Parameter Help**: Understand and configure model parameters

## Prerequisites

- Python 3.11 or higher
- A Replicate API key (get one at https://replicate.com/account)
- [UV](https://github.com/astral-sh/uv) for dependency management

## Installation

You can install the package directly from PyPI:

```bash
# Using UV (recommended)
uv pip install mcp-server-replicate

# Using UVX for isolated environments
uvx install mcp-server-replicate

# Using pip
pip install mcp-server-replicate
```

## Claude Desktop Integration

1. Make sure you have the latest version of Claude Desktop installed
2. Open your Claude Desktop configuration:

```bash
# macOS
code ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Windows
code %APPDATA%\Claude\claude_desktop_config.json
```

3. Add the server configuration using one of these options:

```json
{
  "globalShortcut": "Shift+Alt+A",
  "mcpServers": {
    "replicate": {
      "command": "uv",
      "args": ["tool", "run", "mcp-server-replicate"],
      "env": {
        "REPLICATE_API_TOKEN": "APITOKEN"
      },
      "cwd": "$PATH_TO_REPO"
    }
  }
}
```

4. Set your Replicate API key:

```bash
# Option 1: Set in your environment
export REPLICATE_API_TOKEN=your_api_key_here

# Option 2: Create a .env file in your home directory
echo "REPLICATE_API_TOKEN=your_api_key_here" > ~/.env
```

5. Restart Claude Desktop completely

You should now see the 🔨 icon in Claude Desktop, indicating that the MCP server is available.

## Usage

Once connected to Claude Desktop, you can:

1. Generate images with natural language:

   ```
   Create a photorealistic mountain landscape at sunset with snow-capped peaks
   ```

2. Browse your generations:

   ```
   Show me my recent image generations
   ```

3. Search through generations:

   ```
   Find my landscape generations
   ```

4. Check generation status:
   ```
   What's the status of my last generation?
   ```

## Troubleshooting

### Server not showing up in Claude Desktop

1. Check the Claude Desktop logs:

```bash
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
```

2. Verify your configuration:

- Make sure the path in `claude_desktop_config.json` is absolute
- Ensure UV is installed and in your PATH
- Check that your Replicate API key is set

3. Try restarting Claude Desktop

For more detailed troubleshooting, see our [Debugging Guide](docs/debugging.md).

## Documentation

- [Implementation Plan](PLAN.md)
- [Contributing Guide](CONTRIBUTING.md)
- [API Reference](docs/api.md)
- [Resource System](docs/resources.md)
- [Template System](docs/templates.md)

## Development

1. Clone the repository:

```bash
git clone https://github.com/gerred/mcp-server-replicate.git
cd mcp-server-replicate
```

2. Install development dependencies:

```bash
uv pip install --system ".[dev]"
```

3. Install pre-commit hooks:

```bash
pre-commit install
```

4. Run tests:

```bash
pytest
```

## Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mcp-server-replicate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "ai, image-generation, inference, mcp, replicate, stable-diffusion",
    "author": null,
    "author_email": "Gerred Dillon <hello@gerred.org>",
    "download_url": "https://files.pythonhosted.org/packages/da/8d/bc6e6c3130e2fe2ad17ee5d6cf7555bfc887e840cdd85bf99d9cfbdee567/mcp_server_replicate-0.1.9.tar.gz",
    "platform": null,
    "description": "# MCP Server Replicate\n\n[![Python Version](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Type Checker](https://img.shields.io/badge/type%20checker-mypy-blue.svg)](https://github.com/python/mypy)\n[![Ruff](https://img.shields.io/badge/linter-ruff-red.svg)](https://github.com/astral-sh/ruff)\n[![PyPI version](https://badge.fury.io/py/mcp-server-replicate.svg)](https://pypi.org/project/mcp-server-replicate/)\n\nA FastMCP server implementation for the Replicate API, providing resource-based access to AI model inference with a focus on image generation.\n\n## Features\n\n- \ud83d\uddbc\ufe0f Resource-based image generation and management\n- \ud83d\udd04 Real-time updates through subscriptions\n- \ud83d\udcdd Template-driven parameter configuration\n- \ud83d\udd0d Comprehensive model discovery and selection\n- \ud83e\ude9d Webhook integration for external notifications\n- \ud83c\udfa8 Quality and style presets for optimal results\n- \ud83d\udcca Progress tracking and status monitoring\n- \ud83d\udd12 Secure API key management\n\n## Available Prompts\n\nThe server provides several specialized prompts for different tasks:\n\n### Text to Image (Primary)\n\nOur most thoroughly tested and robust prompt. Optimized for generating high-quality images from text descriptions with:\n\n- Detailed style control\n- Quality presets (draft, balanced, quality, extreme)\n- Size and aspect ratio customization\n- Progress tracking and real-time updates\n\nExample:\n\n```\nCreate a photorealistic mountain landscape at sunset with snow-capped peaks, quality level: quality, style: photorealistic\n```\n\n### Other Prompts\n\n- **Image to Image**: Transform existing images (coming soon)\n- **Model Selection**: Get help choosing the right model for your task\n- **Parameter Help**: Understand and configure model parameters\n\n## Prerequisites\n\n- Python 3.11 or higher\n- A Replicate API key (get one at https://replicate.com/account)\n- [UV](https://github.com/astral-sh/uv) for dependency management\n\n## Installation\n\nYou can install the package directly from PyPI:\n\n```bash\n# Using UV (recommended)\nuv pip install mcp-server-replicate\n\n# Using UVX for isolated environments\nuvx install mcp-server-replicate\n\n# Using pip\npip install mcp-server-replicate\n```\n\n## Claude Desktop Integration\n\n1. Make sure you have the latest version of Claude Desktop installed\n2. Open your Claude Desktop configuration:\n\n```bash\n# macOS\ncode ~/Library/Application\\ Support/Claude/claude_desktop_config.json\n\n# Windows\ncode %APPDATA%\\Claude\\claude_desktop_config.json\n```\n\n3. Add the server configuration using one of these options:\n\n```json\n{\n  \"globalShortcut\": \"Shift+Alt+A\",\n  \"mcpServers\": {\n    \"replicate\": {\n      \"command\": \"uv\",\n      \"args\": [\"tool\", \"run\", \"mcp-server-replicate\"],\n      \"env\": {\n        \"REPLICATE_API_TOKEN\": \"APITOKEN\"\n      },\n      \"cwd\": \"$PATH_TO_REPO\"\n    }\n  }\n}\n```\n\n4. Set your Replicate API key:\n\n```bash\n# Option 1: Set in your environment\nexport REPLICATE_API_TOKEN=your_api_key_here\n\n# Option 2: Create a .env file in your home directory\necho \"REPLICATE_API_TOKEN=your_api_key_here\" > ~/.env\n```\n\n5. Restart Claude Desktop completely\n\nYou should now see the \ud83d\udd28 icon in Claude Desktop, indicating that the MCP server is available.\n\n## Usage\n\nOnce connected to Claude Desktop, you can:\n\n1. Generate images with natural language:\n\n   ```\n   Create a photorealistic mountain landscape at sunset with snow-capped peaks\n   ```\n\n2. Browse your generations:\n\n   ```\n   Show me my recent image generations\n   ```\n\n3. Search through generations:\n\n   ```\n   Find my landscape generations\n   ```\n\n4. Check generation status:\n   ```\n   What's the status of my last generation?\n   ```\n\n## Troubleshooting\n\n### Server not showing up in Claude Desktop\n\n1. Check the Claude Desktop logs:\n\n```bash\ntail -n 20 -f ~/Library/Logs/Claude/mcp*.log\n```\n\n2. Verify your configuration:\n\n- Make sure the path in `claude_desktop_config.json` is absolute\n- Ensure UV is installed and in your PATH\n- Check that your Replicate API key is set\n\n3. Try restarting Claude Desktop\n\nFor more detailed troubleshooting, see our [Debugging Guide](docs/debugging.md).\n\n## Documentation\n\n- [Implementation Plan](PLAN.md)\n- [Contributing Guide](CONTRIBUTING.md)\n- [API Reference](docs/api.md)\n- [Resource System](docs/resources.md)\n- [Template System](docs/templates.md)\n\n## Development\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/gerred/mcp-server-replicate.git\ncd mcp-server-replicate\n```\n\n2. Install development dependencies:\n\n```bash\nuv pip install --system \".[dev]\"\n```\n\n3. Install pre-commit hooks:\n\n```bash\npre-commit install\n```\n\n4. Run tests:\n\n```bash\npytest\n```\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "FastMCP server implementation for the Replicate API, providing resource-based access to AI model inference",
    "version": "0.1.9",
    "project_urls": {
        "Documentation": "https://github.com/gerred/mcp-server-replicate#readme",
        "Homepage": "https://github.com/gerred/mcp-server-replicate",
        "Issues": "https://github.com/gerred/mcp-server-replicate/issues"
    },
    "split_keywords": [
        "ai",
        " image-generation",
        " inference",
        " mcp",
        " replicate",
        " stable-diffusion"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5153a1214e35e065cc9f9d7c7390cc48fe8ef031a7cc72eddc64a4a3a5121041",
                "md5": "d9528da429249653dce96ed6cde7f3b6",
                "sha256": "46ccace97d1c5336074cfc2e69584aa8508686435f7c2a38ef99c4a005cbe13d"
            },
            "downloads": -1,
            "filename": "mcp_server_replicate-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d9528da429249653dce96ed6cde7f3b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 3770,
            "upload_time": "2025-01-06T23:10:21",
            "upload_time_iso_8601": "2025-01-06T23:10:21.008408Z",
            "url": "https://files.pythonhosted.org/packages/51/53/a1214e35e065cc9f9d7c7390cc48fe8ef031a7cc72eddc64a4a3a5121041/mcp_server_replicate-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da8dbc6e6c3130e2fe2ad17ee5d6cf7555bfc887e840cdd85bf99d9cfbdee567",
                "md5": "084f6f395d48f7f4561c682f4e53fe72",
                "sha256": "e89858a7b39e3ec542502cffda84d1aa4c5f638902353f927c5b0575ed65ac1d"
            },
            "downloads": -1,
            "filename": "mcp_server_replicate-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "084f6f395d48f7f4561c682f4e53fe72",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 30187,
            "upload_time": "2025-01-06T23:10:23",
            "upload_time_iso_8601": "2025-01-06T23:10:23.098499Z",
            "url": "https://files.pythonhosted.org/packages/da/8d/bc6e6c3130e2fe2ad17ee5d6cf7555bfc887e840cdd85bf99d9cfbdee567/mcp_server_replicate-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-06 23:10:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gerred",
    "github_project": "mcp-server-replicate#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mcp-server-replicate"
}
        
Elapsed time: 0.60073s