awslabs.documentdb-mcp-server 0.0.1__tar.gz → 1.0.1__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.
Files changed (27) hide show
  1. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/PKG-INFO +1 -4
  2. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/README.md +0 -3
  3. awslabs_documentdb_mcp_server-1.0.1/awslabs/documentdb_mcp_server/__init__.py +17 -0
  4. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/awslabs/documentdb_mcp_server/analytic_tools.py +9 -6
  5. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/awslabs/documentdb_mcp_server/config.py +9 -6
  6. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/awslabs/documentdb_mcp_server/connection_tools.py +9 -6
  7. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/awslabs/documentdb_mcp_server/db_management_tools.py +9 -6
  8. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/awslabs/documentdb_mcp_server/query_tools.py +9 -6
  9. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/awslabs/documentdb_mcp_server/server.py +11 -19
  10. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/awslabs/documentdb_mcp_server/write_tools.py +9 -6
  11. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/pyproject.toml +1 -1
  12. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/tests/conftest.py +9 -6
  13. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/tests/test_analytic_tools.py +9 -6
  14. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/tests/test_connection_tools.py +9 -6
  15. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/tests/test_db_management_tools.py +9 -6
  16. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/tests/test_init.py +9 -6
  17. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/tests/test_main.py +9 -23
  18. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/tests/test_query_tools.py +9 -6
  19. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/tests/test_write_tools.py +9 -6
  20. awslabs_documentdb_mcp_server-0.0.1/awslabs/documentdb_mcp_server/__init__.py +0 -14
  21. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/.gitignore +0 -0
  22. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/.pre-commit-config.yaml +0 -0
  23. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/.python-version +0 -0
  24. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/CHANGELOG.md +0 -0
  25. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/LICENSE +0 -0
  26. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/NOTICE +0 -0
  27. {awslabs_documentdb_mcp_server-0.0.1 → awslabs_documentdb_mcp_server-1.0.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awslabs.documentdb-mcp-server
3
- Version: 0.0.1
3
+ Version: 1.0.1
4
4
  Summary: An AWS Labs Model Context Protocol (MCP) server for documentdb
5
5
  Project-URL: homepage, https://awslabs.github.io/mcp/
6
6
  Project-URL: docs, https://awslabs.github.io/mcp/servers/documentdb-mcp-server/
@@ -100,9 +100,6 @@ python -m awslabs.documentdb_mcp_server.server --allow-write
100
100
 
101
101
  | Option | Description | Default |
102
102
  |--------|-------------|---------|
103
- | `--port` | Port to run the server on | 8888 |
104
- | `--host` | Host to bind the server to | 127.0.0.1 |
105
- | `--sse` | Use SSE transport | False |
106
103
  | `--log-level` | Set logging level (TRACE, DEBUG, INFO, etc.) | INFO |
107
104
  | `--connection-timeout` | Idle connection timeout in minutes | 30 |
108
105
  | `--allow-write` | Enable write operations (otherwise defaults to read-only mode) | False |
@@ -71,9 +71,6 @@ python -m awslabs.documentdb_mcp_server.server --allow-write
71
71
 
72
72
  | Option | Description | Default |
73
73
  |--------|-------------|---------|
74
- | `--port` | Port to run the server on | 8888 |
75
- | `--host` | Host to bind the server to | 127.0.0.1 |
76
- | `--sse` | Use SSE transport | False |
77
74
  | `--log-level` | Set logging level (TRACE, DEBUG, INFO, etc.) | INFO |
78
75
  | `--connection-timeout` | Idle connection timeout in minutes | 30 |
79
76
  | `--allow-write` | Enable write operations (otherwise defaults to read-only mode) | False |
@@ -0,0 +1,17 @@
1
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
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
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
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.
14
+
15
+ """AWS Labs DocumentDB MCP Server package."""
16
+
17
+ __version__ = '1.0.0'
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
 
12
15
  """Analytic tools for DocumentDB MCP Server."""
13
16
 
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
 
12
15
  """Configuration settings for DocumentDB MCP Server."""
13
16
 
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
 
12
15
  """Connection management tools for DocumentDB MCP Server."""
13
16
 
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
 
12
15
  """Database management tools for DocumentDB MCP Server."""
13
16
 
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
 
12
15
  """Query tools for DocumentDB MCP Server."""
13
16
 
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
 
12
15
  """AWS Labs DocumentDB MCP Server implementation for querying AWS DocumentDB."""
13
16
 
@@ -92,9 +95,6 @@ def main():
92
95
  parser = argparse.ArgumentParser(
93
96
  description='An AWS Labs Model Context Protocol (MCP) server for DocumentDB'
94
97
  )
95
- parser.add_argument('--sse', action='store_true', help='Use SSE transport')
96
- parser.add_argument('--port', type=int, default=8888, help='Port to run the server on')
97
- parser.add_argument('--host', type=str, default='127.0.0.1', help='Host to bind the server to')
98
98
  parser.add_argument(
99
99
  '--log-level',
100
100
  type=str,
@@ -124,7 +124,7 @@ def main():
124
124
  format='<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <level>{level: <8}</level> | <cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> - <level>{message}</level>',
125
125
  )
126
126
 
127
- logger.info(f'Starting DocumentDB MCP Server on {args.host}:{args.port}')
127
+ logger.info('Starting DocumentDB MCP Server')
128
128
  logger.info(f'Log level: {args.log_level}')
129
129
 
130
130
  # Set connection timeout
@@ -139,15 +139,7 @@ def main():
139
139
  logger.info('Server is running with WRITE operations ENABLED. Database can be modified.')
140
140
 
141
141
  try:
142
- # Run server with appropriate transport
143
- if args.sse:
144
- mcp.settings.port = args.port
145
- mcp.settings.host = args.host
146
- mcp.run(transport='sse')
147
- else:
148
- mcp.settings.port = args.port
149
- mcp.settings.host = args.host
150
- mcp.run()
142
+ mcp.run()
151
143
  except Exception as e:
152
144
  logger.critical(f'Failed to start server: {str(e)}')
153
145
  finally:
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
 
12
15
  """Write tools for DocumentDB MCP Server."""
13
16
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "awslabs.documentdb-mcp-server"
3
- version = "0.0.1"
3
+ version = "1.0.1"
4
4
  description = "An AWS Labs Model Context Protocol (MCP) server for documentdb"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
  """Test fixtures for DocumentDB MCP server tests."""
12
15
 
13
16
  import os
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
  """Tests for DocumentDB MCP Server analytic tools (statistics and schema analysis)."""
12
15
 
13
16
  import pytest
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
  """Tests for DocumentDB MCP Server connection tools."""
12
15
 
13
16
  import pytest
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
  """Tests for DocumentDB MCP Server database management tools."""
12
15
 
13
16
  import pytest
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
  """Tests for the awslabs.documentdb-mcp-server package."""
12
15
 
13
16
  import importlib
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
  """Tests for the main function in server.py."""
12
15
 
13
16
  from awslabs.documentdb_mcp_server.server import main
@@ -26,23 +29,6 @@ class TestMain:
26
29
 
27
30
  # Check that mcp.run was called with the correct arguments
28
31
  mock_run.assert_called_once()
29
- assert mock_run.call_args[1].get('transport') is None
30
-
31
- @patch('awslabs.documentdb_mcp_server.server.mcp.run')
32
- @patch('sys.argv', ['awslabs.documentdb-mcp-server', '--sse', '--port', '9999'])
33
- def test_main_sse(self, mock_run):
34
- """Test main function with SSE transport."""
35
- # Call the main function
36
- main()
37
-
38
- # Check that mcp.run was called with the correct arguments
39
- mock_run.assert_called_once()
40
- assert mock_run.call_args[1].get('transport') == 'sse'
41
-
42
- # Check that the port was set correctly
43
- from awslabs.documentdb_mcp_server.server import mcp
44
-
45
- assert mcp.settings.port == 9999
46
32
 
47
33
  def test_module_execution(self):
48
34
  """Test the module execution when run as __main__."""
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
  """Tests for DocumentDB MCP Server query tools (find and aggregate)."""
12
15
 
13
16
  import pytest
@@ -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"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
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.
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
  """Tests for DocumentDB MCP Server write tools (insert, update, delete)."""
12
15
 
13
16
  import pytest
@@ -1,14 +0,0 @@
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
- """AWS Labs DocumentDB MCP Server package."""
13
-
14
- __version__ = '1.0.0'