feat: Add MCP server for generating notional data

- Implement data generation server with support for insurance data
- Add comprehensive test suite with 16 test cases
- Support custom schemas and data relationships
- Use faker, mimesis, numpy, and SDV for realistic data
- Pass all type checks with pyright and lint checks with ruff

Co-Authored-By: alexander@anthropic.com <alexander@anthropic.com>
This commit is contained in:
Devin AI
2024-12-11 22:48:15 +00:00
parent 7d2f7d22b5
commit e0cfb6c06d
11 changed files with 2297 additions and 0 deletions

42
src/datagen/README.md Normal file
View File

@@ -0,0 +1,42 @@
# MCP Data Generation Server
This server implements the Model Context Protocol (MCP) to provide notional data generation capabilities using Python libraries including Faker, Mimesis, NumPy, and SDV.
## Features
- Generate synthetic data tables based on specified schemas and parameters
- Support for multiple data generation libraries (Faker, Mimesis, SDV)
- Configurable row counts and column specifications
- Export data in CSV format
## Installation
```bash
pip install mcp-server-datagen
```
## Usage
The server exposes MCP tools for generating notional data:
- `generate_tables`: Generate multiple related tables based on a schema
- `define_schema`: Define table schemas with column specifications
- `export_csv`: Export generated data to CSV files
## Development
1. Create virtual environment and install dependencies:
```bash
uv venv
uv pip install -e ".[dev]"
```
2. Run type checking:
```bash
uv run --frozen pyright
```
3. Build package:
```bash
uv build
```