STDF MCP Server

STDF MCP Server

Enables LLMs to access, analyze, and extract information from STDF-V4 semiconductor test data files, supporting metadata extraction, parametric analysis, yield calculations, and multi-site test data filtering with CSV/Excel export capabilities.

Category
Visit Server

README

#STDF MCP Server

A Model Context Protocol (MCP) server that enables LLMs to efficiently access, analyze, and extract information from STDF-V4 (Standard Test Data Format) files used in semiconductor testing.

Python 3.11+ License: MIT

Features

17 Specialized Tools

Metadata Extraction (6 tools):

  • extract_file_overview - Quick file assessment and key identifiers
  • extract_test_configuration - Hardware setup and test environment
  • extract_yield_summary - Test results analysis and yield calculation
  • extract_facility_details - Manufacturing context and facility information
  • extract_program_metadata - Test program and software version details
  • extract_test_parameters - Comprehensive parameter listing with limits

Record Extraction (7 tools):

  • extract_pir_prr_records - Part Information/Results Records
  • extract_ptr_records - Parametric Test Records with filtering
  • extract_ftr_records - Functional Test Records
  • extract_hbr_records - Hardware Bin Records
  • extract_sbr_records - Software Bin Records
  • extract_sdr_records - Site Description Records
  • extract_mrr_record - Master Results Record

Test Analysis (3 tools):

  • extract_test_parameter_summary - Statistical summaries with test suite filtering
  • extract_filtered_data - Excel extraction with multi-site support
  • extract_test_time - Test execution time analysis with site filtering

Yield Analysis (1 tool):

  • extract_per_unit_yield - Per-unit bin data extraction to CSV (PART_ID, HW Bin, SW Bin)

Key Capabilities

  • STDF-V4 Format Support: Comprehensive support for STDF-V4 specification
  • High Performance: Handles files up to 2GB with <512MB memory through streaming parser
  • Multi-Site Support: Parallel test site data extraction and analysis
  • Test Suite Filtering: Filter by test name, number, or suite with regex support
  • CSV/Excel Export: Generate analysis-ready datasets
  • Automatic Validation: Built-in file integrity validation
  • TDD Development: Comprehensive test coverage with real STDF files

Quick Start

Installation

# Clone the repository
git clone https://github.com/your-org/stdf-mcp.git
cd stdf-mcp

# Install the package
pip install -e .

Running the MCP Server

# Start the MCP server
python -m stdf_mcp.simple_server

The server will start and listen for MCP protocol connections on stdin/stdout.

Configuration for Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "stdf": {
      "command": "python",
      "args": ["-m", "stdf_mcp.simple_server"],
      "cwd": "/path/to/stdf-mcp"
    }
  }
}

Replace /path/to/stdf-mcp with the actual path to your installation.

Usage Examples

Extract File Overview

# In Claude with MCP server connected
"Please extract the file overview from TestCases/example.stdf"

Returns: Lot ID, wafer count, device info, test dates, and file statistics.

Extract Yield Data

"Extract per-unit yield data from TestCases/production_test.stdf"

Generates CSV with columns: PART_ID, HW Bin, SW Bin

  • Output location: TestCases/Output/production_test_YieldAnalysis_20251108_123045.csv

Filter Parametric Data

"Extract PTR records for test 'VDD_CURRENT' from TestCases/wafer_test.stdf"

Returns filtered parametric test results with statistics.

Test Time Analysis

"Extract test time analysis for site 1 from TestCases/multi_site.stdf"

Generates CSV with per-unit test execution times and summary statistics.

Tool Reference

Metadata Tools

Tool Description Output
extract_file_overview File summary and identifiers JSON
extract_test_configuration Test setup and hardware config JSON
extract_yield_summary Pass/fail counts and yield % JSON
extract_facility_details Manufacturing facility info JSON
extract_program_metadata Test program version/config JSON
extract_test_parameters All test parameters with limits JSON

Record Extraction Tools

Tool Description Filters Output
extract_pir_prr_records Part info and results Site JSON
extract_ptr_records Parametric tests Test name/number/suite, Site JSON
extract_ftr_records Functional tests Test name/number/suite, Site JSON
extract_hbr_records Hardware bins Site JSON
extract_sbr_records Software bins Site JSON
extract_sdr_records Site descriptions Site JSON
extract_mrr_record Master results - JSON

Analysis Tools

Tool Description Key Features Output
extract_test_parameter_summary Statistical summaries Test suite filtering, Min/Max/Avg/StdDev JSON
extract_filtered_data Filtered data export Test suite filtering, Multi-site Excel (.xlsx)
extract_test_time Test execution time Site filtering, Statistics CSV
extract_per_unit_yield Per-unit bin data 3-column format (no PorF) CSV

Requirements

  • Python: 3.11 or higher
  • Dependencies:
    • mcp>=1.0.0 - Model Context Protocol SDK
    • numpy>=1.24.0 - Statistical calculations
    • matplotlib>=3.6.0 - Visualization (future)
    • openpyxl>=3.1.0 - Excel file generation

Development

Setup Development Environment

# Install with development dependencies
pip install -e ".[dev]"

# Install pre-commit hooks (optional)
pip install pre-commit
pre-commit install

Running Tests

# Run all tests
pytest

# Run with coverage report
pytest --cov=src/stdf_mcp --cov-report=html

# Run specific test categories
pytest -m unit          # Unit tests only
pytest -m integration   # Integration tests only
pytest -m contract      # Contract tests only

Code Quality

# Format code
black src/ tests/

# Type checking
mypy src/

# Linting
flake8 src/ tests/

# Run all quality checks
black src/ tests/ && flake8 src/ tests/ && mypy src/ && pytest

Project Structure

stdf-mcp/
├── src/stdf_mcp/          # Main package
│   ├── stdf/              # STDF parser and record definitions
│   ├── tools/             # MCP tool implementations
│   │   ├── metadata/      # Metadata extraction tools
│   │   ├── records/       # Record extraction tools
│   │   ├── test_summary/  # Test parameter summary
│   │   ├── filtered_data/ # Filtered data extraction
│   │   ├── test_time/     # Test time analysis
│   │   └── yield_analysis/# Yield data extraction
│   └── simple_server.py   # MCP server implementation
├── tests/                 # Test suite
│   ├── unit/             # Unit tests
│   ├── integration/      # Integration tests
│   └── contract/         # Contract tests
├── TestCases/            # Sample STDF files
│   └── Output/           # Generated outputs (gitignored)
├── specs/                # Feature specifications
├── pyproject.toml        # Package configuration
└── README.md             # This file

Performance Targets

Operation Target Notes
Metadata extraction <5 seconds All 6 metadata tools
Record extraction <10 seconds For 1GB files
Filtered data <30 seconds With Excel generation
Test time analysis <10 seconds Multi-site support
Yield extraction <5 seconds 10,000 units
Memory usage <512MB For 2GB files

Scope

Supported

  • ✅ STDF-V4 format exclusively
  • ✅ Package/final test data
  • ✅ Files up to 2GB
  • ✅ Streaming/chunked processing
  • ✅ Multi-site test configurations
  • ✅ Test suite filtering with regex
  • ✅ CSV and Excel output formats

Not Supported

  • ❌ STDF-V3 files (rejected with clear error)
  • ❌ Wafer test data (package test only)
  • ❌ Data retention between sessions
  • ❌ Authentication/authorization
  • ❌ Direct database access

Testing

The project uses a comprehensive TDD approach:

  • Unit Tests: Core STDF-V4 parsing and data models (80%+ coverage)
  • Integration Tests: End-to-end workflows with real STDF files
  • Contract Tests: MCP tool API compliance verification
  • TestCases Integration: Real STDF-V4 files from TestCases/ directory
  • Output Standards: Results stored in TestCases/Output/ with timestamped naming

Troubleshooting

Common Issues

Issue: ModuleNotFoundError: No module named 'stdf_mcp'

  • Solution: Install the package with pip install -e .

Issue: MCP server not appearing in Claude Desktop

  • Solution: Check configuration file path and ensure cwd points to the correct directory

Issue: INVALID_STDF_FORMAT error

  • Solution: Verify file is STDF-V4 format. STDF-V3 is not supported.

Issue: NO_PRR_RECORDS error for yield extraction

  • Solution: File contains no Part Results Records. Verify it's a package test file.

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Follow PEP8 and run code quality checks
  4. Write tests for new functionality
  5. Ensure all tests pass (pytest)
  6. Commit your changes (git commit -m '[NewFeature] Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

Commit Message Format

Use one of these prefixes:

  • [NewFeature] - New functionality
  • [Enhancement] - Improvements to existing features
  • [BugFix] - Bug fixes
  • [Document] - Documentation updates
  • [WIP] - Work in progress

License

MIT License - see LICENSE file for details.

Acknowledgments

Support

For issues, questions, or contributions:


Version: 0.1.0 Status: Alpha Last Updated: 2025-11-08

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured