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.
-
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]"
-
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" ]
Paste main.py into the main.py, create and paste utils.py into the utils.py, constants.py into the constants.py file.
-
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.
Click File -> Exit and Restart Claude Desktop and enter "generate_image YOUR PROMPT":
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)