home / mcp / sample data mcp server

Sample Data MCP Server

Generates fixed-length test data records for realistic test datasets with configurable field types and formats.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "cdelashmutt-pivotal-sample-data-mcp": {
      "command": "uv",
      "args": [
        "run",
        "/path/to/sample-data-mcp/main.py"
      ]
    }
  }
}

You can use this MCP server to generate fixed-length test data records based on field specifications. It helps you create realistic test datasets with customizable field types and formats, which is ideal for testing data pipelines, validation rules, and integration scenarios.

How to use

Use a compatible MCP client to connect to the server and request data generation based on your field specifications. You define the fields you want, including type, length, and constraints, and the MCP server will produce records that match those rules. This supports rapid generation of consistent test datasets for development and QA.

How to install

Prerequisites you need before installing the MCP server:

  • Python 3.13 or higher
  • UV package manager

Install with UV by following these steps in order:

uv sync

Claude Code integration

To run the MCP server from Claude Code, add the MCP server configuration to your Claude Code setup. Use the following example configuration snippet in your MCP settings file.

{
  "mcpServers": {
    "sample_data_mcp": {
      "command": "uv",
      "args": ["run", "/path/to/sample-data-mcp/main.py"],
      "cwd": "/path/to/sample-data-mcp"
    }
  }
}

Field specification example

Define the fields you want to generate by listing them with a name, type, and length. You can add constraints like minimum/maximum values or date formats as needed.

fields = [
    {
        "name": "customer_id",
        "type": "integer",
        "length": 8,
        "min": 1000,
        "max": 9999
    },
    {
        "name": "customer_name",
        "type": "string",
        "length": 25
    },
    {
        "name": "status",
        "type": "enum",
        "length": 6,
        "values": ["ACTIVE", "INACTIVE", "PENDING"]
    },
    {
        "name": "signup_date",
        "type": "date",
        "length": 8,
        "format": "%Y%m%d"
    },
    {
        "name": "filler",
        "type": "filler",
        "length": 5
    }
]

Field types

The server supports multiple field types to cover common test data needs.

  • string: Random names generated from a Faker-backed source
  • enum: Random selection from a provided list
  • integer: Random integers within a defined range
  • date: Random dates with a configurable format
  • filler: Space padding to fixed length

Development and testing

Run local development tests if you want to exercise the MCP flow during development.

uv run mcp dev main.py

Available tools

generate_test_data_tool

Tool to generate fixed-length test data records based on a provided field specification, including support for string, enum, integer, date, and filler field types.