awslabs.nova-canvas-mcp-server 0.2.8__py3-none-any.whl → 1.0.1__py3-none-any.whl
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/__init__.py +9 -6
- awslabs/nova_canvas_mcp_server/__init__.py +9 -6
- awslabs/nova_canvas_mcp_server/consts.py +9 -6
- awslabs/nova_canvas_mcp_server/models.py +9 -6
- awslabs/nova_canvas_mcp_server/novacanvas.py +9 -6
- awslabs/nova_canvas_mcp_server/server.py +10 -25
- {awslabs_nova_canvas_mcp_server-0.2.8.dist-info → awslabs_nova_canvas_mcp_server-1.0.1.dist-info}/METADATA +3 -3
- awslabs_nova_canvas_mcp_server-1.0.1.dist-info/RECORD +12 -0
- awslabs_nova_canvas_mcp_server-0.2.8.dist-info/RECORD +0 -12
- {awslabs_nova_canvas_mcp_server-0.2.8.dist-info → awslabs_nova_canvas_mcp_server-1.0.1.dist-info}/WHEEL +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.8.dist-info → awslabs_nova_canvas_mcp_server-1.0.1.dist-info}/entry_points.txt +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.8.dist-info → awslabs_nova_canvas_mcp_server-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {awslabs_nova_canvas_mcp_server-0.2.8.dist-info → awslabs_nova_canvas_mcp_server-1.0.1.dist-info}/licenses/NOTICE +0 -0
awslabs/__init__.py
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
# This file is part of the awslabs namespace.
|
|
12
15
|
# It is intentionally minimal to support PEP 420 namespace packages.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""awslabs.nova-canvas-mcp-server"""
|
|
12
15
|
|
|
13
16
|
__version__ = '0.1.6'
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
# Constants
|
|
12
15
|
NOVA_CANVAS_MODEL_ID = 'amazon.nova-canvas-v1:0'
|
|
13
16
|
DEFAULT_WIDTH = 1024
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Pydantic models for Amazon Nova Canvas image generation."""
|
|
12
15
|
|
|
13
16
|
import random
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Amazon Nova Canvas API interaction module.
|
|
12
15
|
|
|
13
16
|
This module provides functions for generating images using Amazon Nova Canvas
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Nova Canvas MCP Server implementation."""
|
|
12
15
|
|
|
13
|
-
import argparse
|
|
14
16
|
import boto3
|
|
15
17
|
import os
|
|
16
18
|
import sys
|
|
@@ -316,24 +318,7 @@ async def mcp_generate_image_with_colors(
|
|
|
316
318
|
def main():
|
|
317
319
|
"""Run the MCP server with CLI argument support."""
|
|
318
320
|
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()
|
|
321
|
+
mcp.run()
|
|
337
322
|
|
|
338
323
|
|
|
339
324
|
if __name__ == '__main__':
|
|
@@ -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.1
|
|
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,10 +91,10 @@ 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
|
|
94
|
+
or docker after a successful `docker build -t awslabs/nova-canvas-mcp-server .`:
|
|
95
95
|
|
|
96
96
|
```file
|
|
97
|
-
#
|
|
97
|
+
# fictitious `.env` file with AWS temporary credentials
|
|
98
98
|
AWS_ACCESS_KEY_ID=ASIAIOSFODNN7EXAMPLE
|
|
99
99
|
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
|
100
100
|
AWS_SESSION_TOKEN=AQoEXAMPLEH4aoAH0gNCAPy...truncated...zrkuWJOgQs8IZZaIv2BXIa2R4Olgk
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
awslabs/__init__.py,sha256=G7eEcWsmny92kyAWsWZfTcvujk7GZEKSZgniz3M4mvU,730
|
|
2
|
+
awslabs/nova_canvas_mcp_server/__init__.py,sha256=Pr3fdURHAnXwC19L9L4KhulaDaD5LV8OFuEd8tvNI3g,675
|
|
3
|
+
awslabs/nova_canvas_mcp_server/consts.py,sha256=DwCcIaQlpoFFvATvZ9JrA3mwtySaXjev_89V8SzEX6g,3205
|
|
4
|
+
awslabs/nova_canvas_mcp_server/models.py,sha256=lfnSbRfO20WVfWrPUgR6beUbfi9dQ_KjsJ3LNOYMXjs,10696
|
|
5
|
+
awslabs/nova_canvas_mcp_server/novacanvas.py,sha256=kmfzWoDcEMcz-HqfVydQanI4CTPS2H37WLrIqFBoJt0,15648
|
|
6
|
+
awslabs/nova_canvas_mcp_server/server.py,sha256=-TG1jmgdA_5M9ao3tCDbUc-Pcq9dvLW2aJbyxpO-Sns,12259
|
|
7
|
+
awslabs_nova_canvas_mcp_server-1.0.1.dist-info/METADATA,sha256=QUitZz443hvKfaA1Olm7uXOGg_caRV_Lo7y2mxadB-o,5309
|
|
8
|
+
awslabs_nova_canvas_mcp_server-1.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
9
|
+
awslabs_nova_canvas_mcp_server-1.0.1.dist-info/entry_points.txt,sha256=v8V4vn8YuugOSL7w_sUxz-M0EDZNZU2_ydJZDd31pGI,94
|
|
10
|
+
awslabs_nova_canvas_mcp_server-1.0.1.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
11
|
+
awslabs_nova_canvas_mcp_server-1.0.1.dist-info/licenses/NOTICE,sha256=EC9f1wOeurVFIaRRiYhnSgf3shhotNjXebssKCUTEvM,98
|
|
12
|
+
awslabs_nova_canvas_mcp_server-1.0.1.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
awslabs/__init__.py,sha256=BIBSY3C1KeFtC_77foZxP2Jju9462uxgEQUPoJTve7w,673
|
|
2
|
-
awslabs/nova_canvas_mcp_server/__init__.py,sha256=dA3Jtbkz7AmaKycMKx62NyqjiWdgSLlWhu2aCTMdKKk,618
|
|
3
|
-
awslabs/nova_canvas_mcp_server/consts.py,sha256=IhTCNHyNOaNq9fwqaWMwrSk-7eYWV7lEF1ASklLaDB8,3148
|
|
4
|
-
awslabs/nova_canvas_mcp_server/models.py,sha256=1C7ZVWKnp08NSHFuWGfdwCfEynFAwFIMMMj7kGW19X4,10639
|
|
5
|
-
awslabs/nova_canvas_mcp_server/novacanvas.py,sha256=wie9X_PBpKsyrgw6HvqkUD-2qAPDV9bNfwDtolRmbLA,15591
|
|
6
|
-
awslabs/nova_canvas_mcp_server/server.py,sha256=yfB5edAZtTav6_ZbWHMAAlDvqhtv8XK4nJMiP7xAGl8,12884
|
|
7
|
-
awslabs_nova_canvas_mcp_server-0.2.8.dist-info/METADATA,sha256=Hmztf1f4hEMA2zlkR8vYAC8RPOkoei0xsIwi724rDfE,5308
|
|
8
|
-
awslabs_nova_canvas_mcp_server-0.2.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
9
|
-
awslabs_nova_canvas_mcp_server-0.2.8.dist-info/entry_points.txt,sha256=v8V4vn8YuugOSL7w_sUxz-M0EDZNZU2_ydJZDd31pGI,94
|
|
10
|
-
awslabs_nova_canvas_mcp_server-0.2.8.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
11
|
-
awslabs_nova_canvas_mcp_server-0.2.8.dist-info/licenses/NOTICE,sha256=EC9f1wOeurVFIaRRiYhnSgf3shhotNjXebssKCUTEvM,98
|
|
12
|
-
awslabs_nova_canvas_mcp_server-0.2.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|