DEV Community

Creating an Amazon Bedrock Nova Canvas MCP Server and Claude Desktop Integration

let's create an MCP Server using AWS Resources. This example shows how to call the Amazon Nova Canvas model in natural language through Claude Desktop to generate images.

  1. First, set up a Python project locally by running the following commands:

    uv init mcp-nova-canvas
    cd mcp-nova-canvas
    
    uv venv
    source .venv/bin/activate
    
    uv add "mcp[cli]"
    
  2. Set up the necessary dependencies in pyproject.toml:

    [project]
    name = "mcp-nova-canvas"
    version = "0.1.0"
    description = "Add your description here"
    readme = "README.md"
    requires-python = ">=3.11"
    dependencies = [
        "boto3>=1.37.24",
        "httpx>=0.28.1",
        "mcp[cli]>=1.8.0",
        "pillow>=11.1.0",
        "uuid>=1.30",
        "loguru"
    ]
    
  3. Paste main.py into the main.py, create and paste utils.py into the utils.py, constants.py into the constants.py file.

  4. Add the following content to the claude_desktop_config.json file to check in Claude Desktop:

    {
        "mcpServers": {
            "canvas": {
                "command": "uv",
                "args": [
                    "--directory",
                    "/ABSOLUTE/ATH/TO/PARENT/FOLDER/mcp-nova-canvas",
                    "run",
                    "main.py"
                ]
            }
        }
    }
    

    ๐Ÿ’ก Tip: If you have trouble finding the file, run Claude Desktop and look in Settings -> Developer -> Edit Config.
    finding claude_desktop_config.json file

  5. Click File -> Exit and Restart Claude Desktop and enter "generate_image YOUR PROMPT":
    asking for permission
    image successfully generated

  6. Check the image in the output folder in the main directory.
    classic italian restaurant

Summary
In this module, you learned how to build an MCP server in a local environment and integrate it with Claude Desktop.

๐Ÿ‘จโ€๐Ÿ’ป Connect with me:
๐Ÿ“Œ LinkedIn
๐Ÿ“‚ GitHub
๐Ÿ–ฅ๏ธ Website

Top comments (0)