awslabs.nova-canvas-mcp-server 0.1.62303__tar.gz → 0.1.81650__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.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/PKG-INFO +1 -1
- awslabs_nova_canvas_mcp_server-0.1.81650/awslabs/__init__.py +12 -0
- awslabs_nova_canvas_mcp_server-0.1.81650/awslabs/nova_canvas_mcp_server/__init__.py +13 -0
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/awslabs/nova_canvas_mcp_server/consts.py +10 -0
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/awslabs/nova_canvas_mcp_server/models.py +10 -0
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/awslabs/nova_canvas_mcp_server/novacanvas.py +11 -1
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/awslabs/nova_canvas_mcp_server/server.py +10 -0
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/pyproject.toml +1 -1
- awslabs_nova_canvas_mcp_server-0.1.62303/Dockerfile +0 -29
- awslabs_nova_canvas_mcp_server-0.1.62303/awslabs/__init__.py +0 -2
- awslabs_nova_canvas_mcp_server-0.1.62303/awslabs/nova_canvas_mcp_server/__init__.py +0 -3
- awslabs_nova_canvas_mcp_server-0.1.62303/smithery.yaml +0 -58
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/.gitignore +0 -0
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/.pre-commit-config.yaml +0 -0
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/.python-version +0 -0
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/CHANGELOG.md +0 -0
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/README.md +0 -0
- {awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/uv.lock +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
# This file is part of the awslabs namespace.
|
|
12
|
+
# It is intentionally minimal to support PEP 420 namespace packages.
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
"""awslabs.nova-canvas-mcp-server"""
|
|
12
|
+
|
|
13
|
+
__version__ = '0.1.6'
|
|
@@ -1,3 +1,13 @@
|
|
|
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.
|
|
1
11
|
# Constants
|
|
2
12
|
NOVA_CANVAS_MODEL_ID = 'amazon.nova-canvas-v1:0'
|
|
3
13
|
DEFAULT_WIDTH = 1024
|
|
@@ -1,3 +1,13 @@
|
|
|
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.
|
|
1
11
|
"""Pydantic models for Amazon Nova Canvas image generation."""
|
|
2
12
|
|
|
3
13
|
import random
|
|
@@ -1,3 +1,13 @@
|
|
|
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.
|
|
1
11
|
"""Amazon Nova Canvas API interaction module.
|
|
2
12
|
|
|
3
13
|
This module provides functions for generating images using Amazon Nova Canvas
|
|
@@ -121,7 +131,7 @@ async def invoke_nova_canvas(
|
|
|
121
131
|
response = bedrock_runtime_client.invoke_model(modelId=NOVA_CANVAS_MODEL_ID, body=request)
|
|
122
132
|
|
|
123
133
|
# Decode the response body
|
|
124
|
-
result = json.loads(response['body'].read())
|
|
134
|
+
result = json.loads(response['body'].read().decode('utf-8'))
|
|
125
135
|
logger.info('Nova Canvas API call successful')
|
|
126
136
|
return result
|
|
127
137
|
except Exception as e:
|
|
@@ -1,3 +1,13 @@
|
|
|
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.
|
|
1
11
|
"""Nova Canvas MCP Server implementation."""
|
|
2
12
|
|
|
3
13
|
import argparse
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
|
|
2
|
-
FROM python:3.10-alpine
|
|
3
|
-
|
|
4
|
-
# Install build dependencies
|
|
5
|
-
RUN apk add --no-cache gcc musl-dev linux-headers
|
|
6
|
-
|
|
7
|
-
WORKDIR /app
|
|
8
|
-
|
|
9
|
-
# Copy the entire repository (monorepo context)
|
|
10
|
-
COPY . .
|
|
11
|
-
|
|
12
|
-
# Set working directory to the MCP server subdirectory
|
|
13
|
-
WORKDIR /app/src/nova-canvas-mcp-server
|
|
14
|
-
|
|
15
|
-
# Create dummy AWS credentials to satisfy boto3 when using the default profile
|
|
16
|
-
RUN mkdir -p /root/.aws && \
|
|
17
|
-
echo "[default]" > /root/.aws/credentials && \
|
|
18
|
-
echo "aws_access_key_id = dummy" >> /root/.aws/credentials && \
|
|
19
|
-
echo "aws_secret_access_key = dummy" >> /root/.aws/credentials
|
|
20
|
-
|
|
21
|
-
# Upgrade pip and install the package
|
|
22
|
-
RUN pip install --no-cache-dir --upgrade pip && \
|
|
23
|
-
pip install --no-cache-dir .
|
|
24
|
-
|
|
25
|
-
# Expose port if using SSE transport (optional)
|
|
26
|
-
EXPOSE 8888
|
|
27
|
-
|
|
28
|
-
# Start the MCP server (entrypoint provided by project.scripts in pyproject.toml)
|
|
29
|
-
CMD ["awslabs.nova-canvas-mcp-server"]
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
|
|
2
|
-
|
|
3
|
-
build:
|
|
4
|
-
dockerBuildPath: ../..
|
|
5
|
-
startCommand:
|
|
6
|
-
type: stdio
|
|
7
|
-
configSchema:
|
|
8
|
-
# JSON Schema defining the configuration options for the MCP.
|
|
9
|
-
type: object
|
|
10
|
-
required: []
|
|
11
|
-
properties:
|
|
12
|
-
awsProfile:
|
|
13
|
-
type: string
|
|
14
|
-
default: default
|
|
15
|
-
description: AWS profile to use for authentication. Dummy credentials are
|
|
16
|
-
provided if using the default profile.
|
|
17
|
-
awsRegion:
|
|
18
|
-
type: string
|
|
19
|
-
default: us-east-1
|
|
20
|
-
description: AWS region to use (e.g., us-east-1)
|
|
21
|
-
fastmcpLogLevel:
|
|
22
|
-
type: string
|
|
23
|
-
default: WARNING
|
|
24
|
-
description: Log level for the MCP server (e.g., DEBUG, INFO, WARNING, ERROR)
|
|
25
|
-
sse:
|
|
26
|
-
type: boolean
|
|
27
|
-
default: false
|
|
28
|
-
description: Use SSE transport if set to true; otherwise, use stdio transport
|
|
29
|
-
port:
|
|
30
|
-
type: number
|
|
31
|
-
default: 8888
|
|
32
|
-
description: Port to run the server on when using SSE transport
|
|
33
|
-
commandFunction:
|
|
34
|
-
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|
|
35
|
-
|-
|
|
36
|
-
(config) => {
|
|
37
|
-
// Build the command and set up env variables based on the config
|
|
38
|
-
// To ensure a valid AWS profile in the container, dummy credentials are injected if using 'default'
|
|
39
|
-
const command = 'awslabs.nova-canvas-mcp-server';
|
|
40
|
-
let args = [];
|
|
41
|
-
if (config.sse) {
|
|
42
|
-
args.push('--sse');
|
|
43
|
-
args.push('--port');
|
|
44
|
-
args.push(String(config.port));
|
|
45
|
-
}
|
|
46
|
-
const env = {
|
|
47
|
-
AWS_PROFILE: config.awsProfile || 'default',
|
|
48
|
-
AWS_REGION: config.awsRegion || 'us-east-1',
|
|
49
|
-
FASTMCP_LOG_LEVEL: config.fastmcpLogLevel || 'WARNING'
|
|
50
|
-
};
|
|
51
|
-
return { command, args, env };
|
|
52
|
-
}
|
|
53
|
-
exampleConfig:
|
|
54
|
-
awsProfile: default
|
|
55
|
-
awsRegion: us-east-1
|
|
56
|
-
fastmcpLogLevel: DEBUG
|
|
57
|
-
sse: false
|
|
58
|
-
port: 8888
|
{awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/.gitignore
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/CHANGELOG.md
RENAMED
|
File without changes
|
{awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/README.md
RENAMED
|
File without changes
|
{awslabs_nova_canvas_mcp_server-0.1.62303 → awslabs_nova_canvas_mcp_server-0.1.81650}/uv.lock
RENAMED
|
File without changes
|