awslabs.nova-canvas-mcp-server 0.2.7__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/CHANGELOG.md +6 -5
- awslabs_nova_canvas_mcp_server-1.0.0/Dockerfile +75 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/PKG-INFO +37 -1
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/README.md +36 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/awslabs/nova_canvas_mcp_server/server.py +1 -19
- awslabs_nova_canvas_mcp_server-1.0.0/docker-healthcheck.sh +12 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/pyproject.toml +1 -1
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/uv.lock +466 -466
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/.gitignore +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/.pre-commit-config.yaml +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/.python-version +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/LICENSE +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/NOTICE +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/awslabs/__init__.py +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/awslabs/nova_canvas_mcp_server/__init__.py +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/awslabs/nova_canvas_mcp_server/consts.py +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/awslabs/nova_canvas_mcp_server/models.py +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/awslabs/nova_canvas_mcp_server/novacanvas.py +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/run_tests.sh +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/tests/.gitignore +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/tests/README.md +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/tests/__init__.py +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/tests/conftest.py +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/tests/test_models.py +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/tests/test_novacanvas.py +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.7 → awslabs_nova_canvas_mcp_server-1.0.0}/tests/test_server.py +0 -0
|
@@ -5,23 +5,24 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## [1.0.0] - 2025-05-26
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### Removed
|
|
11
11
|
|
|
12
|
-
-
|
|
12
|
+
- **BREAKING CHANGE:** Server Sent Events (SSE) support has been removed in accordance with the Model Context Protocol specification's [backwards compatibility guidelines](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#backwards-compatibility)
|
|
13
|
+
- This change prepares for future support of [Streamable HTTP](https://modelcontextprotocol.io/specification/draft/basic/transports#streamable-http) transport
|
|
13
14
|
|
|
14
15
|
## v0.1.5 (2025-03-30)
|
|
15
16
|
|
|
16
17
|
### Fix
|
|
17
18
|
|
|
18
|
-
-
|
|
19
|
+
- **version**
|
|
19
20
|
|
|
20
21
|
## v0.1.4 (2025-03-30)
|
|
21
22
|
|
|
22
23
|
### Fix
|
|
23
24
|
|
|
24
|
-
-
|
|
25
|
+
- **version**
|
|
25
26
|
|
|
26
27
|
## v0.1.3 (2025-03-30)
|
|
27
28
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
+
# with the License. A copy of the License is located at
|
|
5
|
+
#
|
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
#
|
|
8
|
+
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
+
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
+
# and limitations under the License.
|
|
11
|
+
|
|
12
|
+
#FROM public.ecr.aws/sam/build-python3.10:1.137.1-20250411084548
|
|
13
|
+
FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1 AS uv
|
|
14
|
+
|
|
15
|
+
# Install the project into `/app`
|
|
16
|
+
WORKDIR /app
|
|
17
|
+
|
|
18
|
+
# Enable bytecode compilation
|
|
19
|
+
ENV UV_COMPILE_BYTECODE=1
|
|
20
|
+
|
|
21
|
+
# Copy from the cache instead of linking since it's a mounted volume
|
|
22
|
+
ENV UV_LINK_MODE=copy
|
|
23
|
+
|
|
24
|
+
# Prefer the system python
|
|
25
|
+
ENV UV_PYTHON_PREFERENCE=only-system
|
|
26
|
+
|
|
27
|
+
# Run without updating the uv.lock file like running with `--frozen`
|
|
28
|
+
ENV UV_FROZEN=true
|
|
29
|
+
|
|
30
|
+
# Copy the required files first
|
|
31
|
+
COPY pyproject.toml uv.lock ./
|
|
32
|
+
|
|
33
|
+
# Install the project's dependencies using the lockfile and settings
|
|
34
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
35
|
+
pip install uv && \
|
|
36
|
+
uv sync --frozen --no-install-project --no-dev --no-editable
|
|
37
|
+
|
|
38
|
+
# Then, add the rest of the project source code and install it
|
|
39
|
+
# Installing separately from its dependencies allows optimal layer caching
|
|
40
|
+
COPY . /app
|
|
41
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
42
|
+
uv sync --frozen --no-dev --no-editable
|
|
43
|
+
|
|
44
|
+
# Make the directory just in case it doesn't exist
|
|
45
|
+
RUN mkdir -p /root/.local
|
|
46
|
+
|
|
47
|
+
FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1
|
|
48
|
+
|
|
49
|
+
# Place executables in the environment at the front of the path and include other binaries
|
|
50
|
+
ENV PATH="/app/.venv/bin:$PATH:/usr/sbin"
|
|
51
|
+
|
|
52
|
+
# Install lsof for the healthcheck
|
|
53
|
+
# Install other tools as needed for the MCP server
|
|
54
|
+
# Add non-root user and ability to change directory into /root
|
|
55
|
+
RUN yum update -y && \
|
|
56
|
+
yum install -y lsof && \
|
|
57
|
+
yum clean all -y && \
|
|
58
|
+
rm -rf /var/cache/yum && \
|
|
59
|
+
groupadd --force --system app && \
|
|
60
|
+
useradd app -g app -d /app && \
|
|
61
|
+
chmod o+x /root
|
|
62
|
+
|
|
63
|
+
# Get the project from the uv layer
|
|
64
|
+
COPY --from=uv --chown=app:app /root/.local /root/.local
|
|
65
|
+
COPY --from=uv --chown=app:app /app/.venv /app/.venv
|
|
66
|
+
|
|
67
|
+
# Get healthcheck script
|
|
68
|
+
COPY ./docker-healthcheck.sh /usr/local/bin/docker-healthcheck.sh
|
|
69
|
+
|
|
70
|
+
# Run as non-root
|
|
71
|
+
USER app
|
|
72
|
+
|
|
73
|
+
# When running the container, add --db-path and a bind mount to the host's db file
|
|
74
|
+
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "docker-healthcheck.sh" ]
|
|
75
|
+
ENTRYPOINT ["awslabs.nova-canvas-mcp-server"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.nova-canvas-mcp-server
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: An AWS Labs Model Context Protocol (MCP) server for Amazon Nova Canvas
|
|
5
5
|
Project-URL: Homepage, https://awslabs.github.io/mcp/
|
|
6
6
|
Project-URL: Documentation, https://awslabs.github.io/mcp/servers/nova-mcp-server/
|
|
@@ -91,6 +91,42 @@ Here are some ways you can work with MCP across AWS, and we'll be adding support
|
|
|
91
91
|
}
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
+
or docker after a succesful `docker build -t awslabs/nova-canvas-mcp-server .`:
|
|
95
|
+
|
|
96
|
+
```file
|
|
97
|
+
# ficticious `.env` file with AWS temporary credentials
|
|
98
|
+
AWS_ACCESS_KEY_ID=ASIAIOSFODNN7EXAMPLE
|
|
99
|
+
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
|
100
|
+
AWS_SESSION_TOKEN=AQoEXAMPLEH4aoAH0gNCAPy...truncated...zrkuWJOgQs8IZZaIv2BXIa2R4Olgk
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"mcpServers": {
|
|
106
|
+
"awslabs.nova-canvas-mcp-server": {
|
|
107
|
+
"command": "docker",
|
|
108
|
+
"args": [
|
|
109
|
+
"run",
|
|
110
|
+
"--rm",
|
|
111
|
+
"--interactive",
|
|
112
|
+
"--env",
|
|
113
|
+
"AWS_REGION=us-east-1",
|
|
114
|
+
"--env",
|
|
115
|
+
"FASTMCP_LOG_LEVEL=ERROR",
|
|
116
|
+
"--env-file",
|
|
117
|
+
"/full/path/to/file/above/.env",
|
|
118
|
+
"awslabs/nova-canvas-mcp-server:latest"
|
|
119
|
+
],
|
|
120
|
+
"env": {},
|
|
121
|
+
"disabled": false,
|
|
122
|
+
"autoApprove": []
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
NOTE: Your credentials will need to be kept refreshed from your host
|
|
129
|
+
|
|
94
130
|
### Installing via Smithery
|
|
95
131
|
|
|
96
132
|
To install Amazon Nova Canvas MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@awslabs/nova-canvas-mcp-server):
|
|
@@ -58,6 +58,42 @@ Here are some ways you can work with MCP across AWS, and we'll be adding support
|
|
|
58
58
|
}
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
or docker after a succesful `docker build -t awslabs/nova-canvas-mcp-server .`:
|
|
62
|
+
|
|
63
|
+
```file
|
|
64
|
+
# ficticious `.env` file with AWS temporary credentials
|
|
65
|
+
AWS_ACCESS_KEY_ID=ASIAIOSFODNN7EXAMPLE
|
|
66
|
+
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
|
67
|
+
AWS_SESSION_TOKEN=AQoEXAMPLEH4aoAH0gNCAPy...truncated...zrkuWJOgQs8IZZaIv2BXIa2R4Olgk
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"awslabs.nova-canvas-mcp-server": {
|
|
74
|
+
"command": "docker",
|
|
75
|
+
"args": [
|
|
76
|
+
"run",
|
|
77
|
+
"--rm",
|
|
78
|
+
"--interactive",
|
|
79
|
+
"--env",
|
|
80
|
+
"AWS_REGION=us-east-1",
|
|
81
|
+
"--env",
|
|
82
|
+
"FASTMCP_LOG_LEVEL=ERROR",
|
|
83
|
+
"--env-file",
|
|
84
|
+
"/full/path/to/file/above/.env",
|
|
85
|
+
"awslabs/nova-canvas-mcp-server:latest"
|
|
86
|
+
],
|
|
87
|
+
"env": {},
|
|
88
|
+
"disabled": false,
|
|
89
|
+
"autoApprove": []
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
NOTE: Your credentials will need to be kept refreshed from your host
|
|
96
|
+
|
|
61
97
|
### Installing via Smithery
|
|
62
98
|
|
|
63
99
|
To install Amazon Nova Canvas MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@awslabs/nova-canvas-mcp-server):
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
# and limitations under the License.
|
|
11
11
|
"""Nova Canvas MCP Server implementation."""
|
|
12
12
|
|
|
13
|
-
import argparse
|
|
14
13
|
import boto3
|
|
15
14
|
import os
|
|
16
15
|
import sys
|
|
@@ -316,24 +315,7 @@ async def mcp_generate_image_with_colors(
|
|
|
316
315
|
def main():
|
|
317
316
|
"""Run the MCP server with CLI argument support."""
|
|
318
317
|
logger.info('Starting nova-canvas-mcp-server MCP server')
|
|
319
|
-
|
|
320
|
-
parser = argparse.ArgumentParser(
|
|
321
|
-
description='MCP server for generating images using Amazon Nova Canvas'
|
|
322
|
-
)
|
|
323
|
-
parser.add_argument('--sse', action='store_true', help='Use SSE transport')
|
|
324
|
-
parser.add_argument('--port', type=int, default=8888, help='Port to run the server on')
|
|
325
|
-
|
|
326
|
-
args = parser.parse_args()
|
|
327
|
-
logger.debug(f'Parsed arguments: sse={args.sse}, port={args.port}')
|
|
328
|
-
|
|
329
|
-
# Run server with appropriate transport
|
|
330
|
-
if args.sse:
|
|
331
|
-
logger.info(f'Using SSE transport on port {args.port}')
|
|
332
|
-
mcp.settings.port = args.port
|
|
333
|
-
mcp.run(transport='sse')
|
|
334
|
-
else:
|
|
335
|
-
logger.info('Using standard stdio transport')
|
|
336
|
-
mcp.run()
|
|
318
|
+
mcp.run()
|
|
337
319
|
|
|
338
320
|
|
|
339
321
|
if __name__ == '__main__':
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
if [ "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l)" -ne "0" ]; then
|
|
4
|
+
echo -n "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l) awslabs.* streams found";
|
|
5
|
+
exit 0;
|
|
6
|
+
else
|
|
7
|
+
echo -n "Zero awslabs.* streams found";
|
|
8
|
+
exit 1;
|
|
9
|
+
fi;
|
|
10
|
+
|
|
11
|
+
echo -n "Never should reach here";
|
|
12
|
+
exit 99;
|