PyWellen MCP is a powerful Model Context Protocol (MCP) server that enables LLM agents to interact with digital waveform files. Analyze VCD, FST, GHW, and other waveform formats using natural language queries and AI-powered tools.
- π― 35+ MCP Tools across 9 comprehensive categories
- π Multi-format Support: VCD, FST, GHW, LXT, LXT2, VZT waveforms
- π Natural Language Queries: Ask about signals using plain English
- β‘ High Performance: Multi-threaded parsing, LRU caching, optimized algorithms
- π External Integrations: GTKWave, Verdi, Simvision viewer support
- π€ Export Capabilities: CSV, JSON, YAML, hierarchy trees, signal lists
- π§ LLM Optimization: Signal summarization, pattern detection, recommendation
- π Production Ready: Comprehensive error handling, security, monitoring
# From PyPI (when published)
pip install pywellen-mcp
# From source
git clone https://github.com/fvutils/pywellen-mcp.git
cd pywellen-mcp
pip install -e ".[dev]"Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"pywellen": {
"command": "pywellen-mcp",
"args": []
}
}
}# Chat with your LLM using natural language:
"Open the waveform file /path/to/design.vcd"
"Show me all clock signals"
"What's the value of top.cpu.reset at time 1000?"
"Compare signals clk_a and clk_b"
"Export the signal data to CSV"35 Tools Implemented | 182/193 Tests Passing | 94.3% Success Rate
- β Phase 1: Core Infrastructure (4 tools)
- β Phase 2: Hierarchy Navigation (4 tools)
- β Phase 3: Signal Data Access (5 tools)
- β Phase 4: Debugging & Analysis (7 tools)
- β Phase 5: Comparison & Format Conversion (7 tools)
- β Phase 6: LLM Optimization (5 tools)
- β Phase 7: Export & Integration (8 tools)
- π§ Phase 8: Production Readiness (CI/CD, security, monitoring)
waveform_open- Open waveform files (VCD, FST, GHW)waveform_close- Close sessionswaveform_info- Get waveform metadatawaveform_list_sessions- List active sessions
hierarchy_list_top_scopes- List top-level design scopeshierarchy_get_scope- Get scope detailshierarchy_list_variables- List variables in a scopehierarchy_search- Search hierarchy with patterns
signal_get_value- Get signal value at specific timesignal_get_values- Get values over time rangesignal_get_changes- Get value change eventssignal_get_statistics- Calculate signal statisticssignal_search- Search signals with filters
time_get_range- Get simulation time rangetime_convert- Convert time units
debug_find_transitions- Find signal transitionsdebug_trace_causality- Trace signal causalitydebug_compare_waveforms- Compare waveformsdebug_build_timeline- Build event timelinesdebug_check_protocol- Protocol checkerdebug_identify_glitches- Glitch detectiondebug_find_correlation- Signal correlation
compare_signals- Compare signal valuescompare_waveforms- Compare entire waveformscompare_time_ranges- Compare time ranges
format_value- Format signal valuesformat_as_signed- Convert to signed valuesformat_as_binary- Binary representationformat_as_hex- Hex representation
query_natural_language- Natural language queriessignal_summarize- Automatic signal summarizationrecommend_related_signals- Signal recommendationsdocs_get_started- Getting started guidedocs_tool_guide- Tool usage documentation
export_to_csv- Export signals to CSVexport_hierarchy_tree- Export design hierarchyload_signal_list- Load signal configurationssave_signal_list- Save signal configurationsexport_signal_data- Export to JSON/YAMLintegration_launch_viewer- Launch external viewersintegration_watch_file- File change monitoringintegration_generate_gtkwave_save- Generate GTKWave saves
- Getting Started - Installation and first steps
- Quick Reference - Common workflows
- API Reference - Complete tool documentation
- Best Practices - Performance and optimization
- Deployment Guide - Production deployment
- Full Documentation - Complete docs
- Analyze waveforms without leaving your LLM chat
- Natural language debugging: "Show me when reset goes low"
- Automated signal correlation workflows
- Quick protocol compliance checks
- Interactive design exploration
- Compare pre/post synthesis waveforms
- Generate test reports automatically
- Integration with existing EDA tools
- MCP-based waveform analysis API
- Extensible plugin architecture
- Support for custom waveform formats
- Python-based scripting interface
- Multi-threaded VCD parsing for faster file loading
- LRU caching for frequently accessed signals
- Lazy loading of signal data on demand
- Efficient time range queries with binary search
- Path validation prevents directory traversal
- Command injection protection for viewer launches
- File permission checks before operations
- Session isolation prevents cross-session access
- Structured error responses with context
- Recovery strategies for common failures
- Graceful degradation on missing data
- Detailed logging for debugging
# Run all tests
pytest
# Run with coverage
pytest --cov=pywellen_mcp --cov-report=html
# Run specific category
pytest tests/unit/test_tools_llm.py
pytest tests/unit/test_tools_export.py# Run benchmark suite
python scripts/benchmark.py
# Profile specific operations
python -m cProfile -s cumtime scripts/benchmark.py# Run security checks
python scripts/security_audit.py
# Check specific categories
python scripts/security_audit.py --check-paths
python scripts/security_audit.py --check-commandspywellen-mcp/
βββ src/pywellen_mcp/
β βββ server.py # MCP server implementation
β βββ session.py # Session management
β βββ tools_waveform.py # Core waveform operations
β βββ tools_hierarchy.py # Hierarchy navigation
β βββ tools_signal.py # Signal analysis
β βββ tools_time.py # Time management
β βββ tools_debug.py # Debugging tools
β βββ tools_compare.py # Comparison operations
β βββ tools_format.py # Format conversion
β βββ tools_llm.py # LLM optimization
β βββ tools_export.py # Export capabilities
β βββ tools_integration.py # External integrations
βββ tests/
β βββ unit/ # Comprehensive unit tests
βββ scripts/
β βββ benchmark.py # Performance benchmarks
β βββ security_audit.py # Security checks
βββ docs/ # Sphinx documentation
- Open:
waveform_opencreates session with unique ID - Use: Tools access session via session_id parameter
- Cleanup: Automatic after 1 hour timeout or explicit close
All operations return structured errors:
{
"error": "SESSION_NOT_FOUND",
"message": "Session abc123 not found",
"context": {
"session_id": "abc123",
"active_sessions": ["def456"]
}
}We welcome contributions! Please see our Contributing Guide.
# Clone repository
git clone https://github.com/fvutils/pywellen-mcp.git
cd pywellen-mcp
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest- Style: Black formatting, PEP 8 compliance
- Type Hints: Full type annotations
- Documentation: Docstrings for all public APIs
- Testing: Minimum 80% code coverage
- CI/CD pipeline (GitHub Actions)
- Performance benchmarking suite
- Security audit script
- Comprehensive documentation
- Memory profiling
- Integration tests with real waveforms
- Version 1.0.0 release
- WebSocket-based streaming for large waveforms
- Distributed analysis for massive designs
- Machine learning-based anomaly detection
- Plugin system for custom analyzers
- Support for SystemVerilog assertions
- Real-time waveform monitoring
- Wellen - Rust waveform parsing library
- MCP - Model Context Protocol specification
- Anthropic - MCP development and Claude integration
- GTKWave, Verdi, Simvision - Waveform viewer integrations
Licensed under the Apache License, Version 2.0. See LICENSE for details.
- Homepage: https://github.com/fvutils/pywellen-mcp
- Documentation: https://fvutils.github.io/pywellen-mcp
- PyPI: https://pypi.org/project/pywellen-mcp/
- Issues: https://github.com/fvutils/pywellen-mcp/issues
- Discussions: https://github.com/fvutils/pywellen-mcp/discussions
- Author: Matthew Ballance
- Email: mballance@fvutils.com
- GitHub: @mballance
Made with β€οΈ by the FVUtils community