awslabs.syntheticdata-mcp-server 0.0.1__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_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/PKG-INFO +2 -2
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/README.md +1 -1
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/awslabs/syntheticdata_mcp_server/server.py +3 -17
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/pyproject.toml +1 -1
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/test_server.py +16 -32
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/uv.lock +2 -1
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/.gitignore +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/.pre-commit-config.yaml +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/.python-version +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/CHANGELOG.md +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/LICENSE +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/NOTICE +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/awslabs/__init__.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/awslabs/syntheticdata_mcp_server/__init__.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/awslabs/syntheticdata_mcp_server/pandas_interpreter.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/awslabs/syntheticdata_mcp_server/storage/__init__.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/awslabs/syntheticdata_mcp_server/storage/base.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/awslabs/syntheticdata_mcp_server/storage/loader.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/awslabs/syntheticdata_mcp_server/storage/s3.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/__init__.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/conftest.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/test_constants.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/test_pandas_interpreter.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/test_storage/__init__.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/test_storage/test_loader.py +0 -0
- {awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/test_storage/test_s3.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.syntheticdata-mcp-server
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: An AWS Labs Model Context Protocol (MCP) server for syntheticdata
|
|
5
5
|
Project-URL: homepage, https://awslabs.github.io/mcp/
|
|
6
6
|
Project-URL: docs, https://awslabs.github.io/mcp/servers/syntheticdata-mcp-server/
|
|
@@ -97,7 +97,7 @@ The MCP server uses the AWS profile specified in the `AWS_PROFILE` environment v
|
|
|
97
97
|
### Getting Data Generation Instructions
|
|
98
98
|
|
|
99
99
|
```python
|
|
100
|
-
response = await server.
|
|
100
|
+
response = await server.get_data_gen_instructions(
|
|
101
101
|
business_description="An e-commerce platform with customers, orders, and products"
|
|
102
102
|
)
|
|
103
103
|
```
|
|
@@ -66,7 +66,7 @@ The MCP server uses the AWS profile specified in the `AWS_PROFILE` environment v
|
|
|
66
66
|
### Getting Data Generation Instructions
|
|
67
67
|
|
|
68
68
|
```python
|
|
69
|
-
response = await server.
|
|
69
|
+
response = await server.get_data_gen_instructions(
|
|
70
70
|
business_description="An e-commerce platform with customers, orders, and products"
|
|
71
71
|
)
|
|
72
72
|
```
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
"""AWS syntheticdata MCP Server implementation."""
|
|
13
13
|
|
|
14
|
-
import argparse
|
|
15
14
|
import os
|
|
16
15
|
import pandas as pd
|
|
17
16
|
import re
|
|
@@ -143,8 +142,8 @@ mcp = FastMCP(
|
|
|
143
142
|
)
|
|
144
143
|
|
|
145
144
|
|
|
146
|
-
@mcp.tool(name='
|
|
147
|
-
async def
|
|
145
|
+
@mcp.tool(name='get_data_gen_instructions')
|
|
146
|
+
async def get_data_gen_instructions(
|
|
148
147
|
business_description: str = Field(
|
|
149
148
|
...,
|
|
150
149
|
description='A detailed description of the business domain and use case. The more specific and comprehensive the description, the better the data generation instructions will be.',
|
|
@@ -756,20 +755,7 @@ def _validate_table_data(table_name: str, records: List[Dict]) -> Dict:
|
|
|
756
755
|
|
|
757
756
|
def main():
|
|
758
757
|
"""Run the MCP server with CLI argument support."""
|
|
759
|
-
|
|
760
|
-
description='MCP server for generating synthetic data based on business use cases'
|
|
761
|
-
)
|
|
762
|
-
parser.add_argument('--sse', action='store_true', help='Use SSE transport')
|
|
763
|
-
parser.add_argument('--port', type=int, default=8888, help='Port to run the server on')
|
|
764
|
-
|
|
765
|
-
args = parser.parse_args()
|
|
766
|
-
|
|
767
|
-
# Run server with appropriate transport
|
|
768
|
-
if args.sse:
|
|
769
|
-
mcp.settings.port = args.port
|
|
770
|
-
mcp.run(transport='sse')
|
|
771
|
-
else:
|
|
772
|
-
mcp.run()
|
|
758
|
+
mcp.run()
|
|
773
759
|
|
|
774
760
|
|
|
775
761
|
if __name__ == '__main__':
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Tests for syntheticdata MCP server functionality."""
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
-
import pytest
|
|
5
4
|
from awslabs.syntheticdata_mcp_server.server import (
|
|
6
5
|
ExecutePandasCodeInput,
|
|
7
6
|
LoadToStorageInput,
|
|
@@ -13,17 +12,16 @@ from awslabs.syntheticdata_mcp_server.server import (
|
|
|
13
12
|
_get_recommended_record_counts,
|
|
14
13
|
_validate_table_data,
|
|
15
14
|
execute_pandas_code,
|
|
16
|
-
|
|
15
|
+
get_data_gen_instructions,
|
|
17
16
|
load_to_storage,
|
|
18
17
|
main,
|
|
19
|
-
mcp,
|
|
20
18
|
validate_and_save_data,
|
|
21
19
|
)
|
|
22
20
|
from pytest import mark
|
|
23
21
|
|
|
24
22
|
|
|
25
23
|
@mark.asyncio
|
|
26
|
-
async def
|
|
24
|
+
async def test_get_data_gen_instructions() -> None:
|
|
27
25
|
"""Test generation of data generation instructions."""
|
|
28
26
|
business_description = """
|
|
29
27
|
An e-commerce platform that sells electronics. We need customer data with their
|
|
@@ -31,7 +29,7 @@ async def test_get_data_generation_instructions() -> None:
|
|
|
31
29
|
including payment status.
|
|
32
30
|
"""
|
|
33
31
|
|
|
34
|
-
result = await
|
|
32
|
+
result = await get_data_gen_instructions(business_description)
|
|
35
33
|
|
|
36
34
|
assert result['success'] is True
|
|
37
35
|
assert 'instructions' in result
|
|
@@ -58,9 +56,9 @@ async def test_get_data_generation_instructions() -> None:
|
|
|
58
56
|
|
|
59
57
|
|
|
60
58
|
@mark.asyncio
|
|
61
|
-
async def
|
|
59
|
+
async def test_get_data_gen_instructions_empty() -> None:
|
|
62
60
|
"""Test generation of data generation instructions with empty input."""
|
|
63
|
-
result = await
|
|
61
|
+
result = await get_data_gen_instructions('')
|
|
64
62
|
|
|
65
63
|
assert result['success'] is False
|
|
66
64
|
assert 'error' in result
|
|
@@ -68,9 +66,9 @@ async def test_get_data_generation_instructions_empty() -> None:
|
|
|
68
66
|
|
|
69
67
|
|
|
70
68
|
@mark.asyncio
|
|
71
|
-
async def
|
|
69
|
+
async def test_get_data_gen_instructions_invalid() -> None:
|
|
72
70
|
"""Test generation of data generation instructions with invalid input."""
|
|
73
|
-
result = await
|
|
71
|
+
result = await get_data_gen_instructions(' ')
|
|
74
72
|
|
|
75
73
|
assert result['success'] is False
|
|
76
74
|
assert 'error' in result
|
|
@@ -349,34 +347,20 @@ def test_get_entity_example_data() -> None:
|
|
|
349
347
|
assert all('description' in record for record in custom_data)
|
|
350
348
|
|
|
351
349
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
(['--port', '9999'], 9999, False), # Custom port
|
|
357
|
-
(['--sse'], 8888, True), # SSE enabled
|
|
358
|
-
(['--sse', '--port', '7777'], 7777, True), # Both custom
|
|
359
|
-
],
|
|
360
|
-
)
|
|
361
|
-
def test_main_cli_arguments(mock_cli_args, monkeypatch, args, expected_port, expected_sse) -> None:
|
|
362
|
-
"""Test CLI argument handling."""
|
|
363
|
-
# Update mock CLI args
|
|
364
|
-
mock_cli_args.extend(args)
|
|
365
|
-
|
|
366
|
-
# Mock FastMCP.run to capture arguments
|
|
367
|
-
run_args = {}
|
|
350
|
+
def test_main_cli_arguments(monkeypatch) -> None:
|
|
351
|
+
"""Test that main() calls mcp.run() without arguments."""
|
|
352
|
+
# Mock FastMCP.run to verify it's called
|
|
353
|
+
run_called = False
|
|
368
354
|
|
|
369
355
|
def mock_run(self, **kwargs):
|
|
370
|
-
|
|
356
|
+
nonlocal run_called
|
|
357
|
+
run_called = True
|
|
358
|
+
assert not kwargs # Verify no arguments are passed
|
|
371
359
|
|
|
372
360
|
monkeypatch.setattr('mcp.server.fastmcp.FastMCP.run', mock_run)
|
|
373
361
|
|
|
374
362
|
# Run main
|
|
375
363
|
main()
|
|
376
364
|
|
|
377
|
-
# Verify
|
|
378
|
-
|
|
379
|
-
assert run_args.get('transport') == 'sse'
|
|
380
|
-
assert mcp.settings.port == expected_port
|
|
381
|
-
else:
|
|
382
|
-
assert not run_args # Default stdio transport
|
|
365
|
+
# Verify run was called
|
|
366
|
+
assert run_called
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
+
revision = 1
|
|
2
3
|
requires-python = ">=3.10"
|
|
3
4
|
resolution-markers = [
|
|
4
5
|
"python_full_version >= '3.12'",
|
|
@@ -41,7 +42,7 @@ wheels = [
|
|
|
41
42
|
|
|
42
43
|
[[package]]
|
|
43
44
|
name = "awslabs-syntheticdata-mcp-server"
|
|
44
|
-
version = "
|
|
45
|
+
version = "1.0.9223372036854775807"
|
|
45
46
|
source = { editable = "." }
|
|
46
47
|
dependencies = [
|
|
47
48
|
{ name = "boto3" },
|
{awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/.gitignore
RENAMED
|
File without changes
|
|
File without changes
|
{awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/.python-version
RENAMED
|
File without changes
|
{awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/CHANGELOG.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/__init__.py
RENAMED
|
File without changes
|
{awslabs_syntheticdata_mcp_server-0.0.1 → awslabs_syntheticdata_mcp_server-1.0.0}/tests/conftest.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|