#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.
Features
17 Specialized Tools
Metadata Extraction (6 tools):
extract_file_overview- Quick file assessment and key identifiersextract_test_configuration- Hardware setup and test environmentextract_yield_summary- Test results analysis and yield calculationextract_facility_details- Manufacturing context and facility informationextract_program_metadata- Test program and software version detailsextract_test_parameters- Comprehensive parameter listing with limits
Record Extraction (7 tools):
extract_pir_prr_records- Part Information/Results Recordsextract_ptr_records- Parametric Test Records with filteringextract_ftr_records- Functional Test Recordsextract_hbr_records- Hardware Bin Recordsextract_sbr_records- Software Bin Recordsextract_sdr_records- Site Description Recordsextract_mrr_record- Master Results Record
Test Analysis (3 tools):
extract_test_parameter_summary- Statistical summaries with test suite filteringextract_filtered_data- Excel extraction with multi-site supportextract_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
Running the MCP 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
Replace /path/to/stdf-mcp with the actual path to your installation.
Usage Examples
Extract File Overview
Returns: Lot ID, wafer count, device info, test dates, and file statistics.
Extract Yield Data
Generates CSV with columns: PART_ID, HW Bin, SW Bin
Output location:
TestCases/Output/production_test_YieldAnalysis_20251108_123045.csv
Filter Parametric Data
Returns filtered parametric test results with statistics.
Test Time Analysis
Generates CSV with per-unit test execution times and summary statistics.
Tool Reference
Metadata Tools
Tool | Description | Output |
| File summary and identifiers | JSON |
| Test setup and hardware config | JSON |
| Pass/fail counts and yield % | JSON |
| Manufacturing facility info | JSON |
| Test program version/config | JSON |
| All test parameters with limits | JSON |
Record Extraction Tools
Tool | Description | Filters | Output |
| Part info and results | Site | JSON |
| Parametric tests | Test name/number/suite, Site | JSON |
| Functional tests | Test name/number/suite, Site | JSON |
| Hardware bins | Site | JSON |
| Software bins | Site | JSON |
| Site descriptions | Site | JSON |
| Master results | - | JSON |
Analysis Tools
Tool | Description | Key Features | Output |
| Statistical summaries | Test suite filtering, Min/Max/Avg/StdDev | JSON |
| Filtered data export | Test suite filtering, Multi-site | Excel (.xlsx) |
| Test execution time | Site filtering, Statistics | CSV |
| Per-unit bin data | 3-column format (no PorF) | CSV |
Requirements
Python: 3.11 or higher
Dependencies:
mcp>=1.0.0- Model Context Protocol SDKnumpy>=1.24.0- Statistical calculationsmatplotlib>=3.6.0- Visualization (future)openpyxl>=3.1.0- Excel file generation
Development
Setup Development Environment
Running Tests
Code Quality
Project Structure
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/directoryOutput 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
cwdpoints 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:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Follow PEP8 and run code quality checks
Write tests for new functionality
Ensure all tests pass (
pytest)Commit your changes (
git commit -m '[NewFeature] Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)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
STDF-V4 Specification: Teradyne Standard Test Data Format
Model Context Protocol: Anthropic MCP
Support
For issues, questions, or contributions:
Issues: GitHub Issues
Discussions: GitHub Discussions
Version: 0.1.0 Status: Alpha Last Updated: 2025-11-08