mcp-souschef 3.2.0__tar.gz → 3.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. mcp_souschef-3.2.0/README.md → mcp_souschef-3.5.1/PKG-INFO +188 -23
  2. mcp_souschef-3.2.0/PKG-INFO → mcp_souschef-3.5.1/README.md +145 -59
  3. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/pyproject.toml +21 -11
  4. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/assessment.py +81 -25
  5. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/cli.py +265 -6
  6. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/converters/playbook.py +413 -156
  7. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/converters/template.py +122 -5
  8. mcp_souschef-3.5.1/souschef/core/ai_schemas.py +81 -0
  9. mcp_souschef-3.5.1/souschef/core/http_client.py +394 -0
  10. mcp_souschef-3.5.1/souschef/core/logging.py +344 -0
  11. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/core/metrics.py +73 -6
  12. mcp_souschef-3.5.1/souschef/core/url_validation.py +230 -0
  13. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/server.py +130 -0
  14. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ui/app.py +20 -6
  15. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ui/pages/ai_settings.py +151 -30
  16. mcp_souschef-3.5.1/souschef/ui/pages/chef_server_settings.py +300 -0
  17. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ui/pages/cookbook_analysis.py +66 -10
  18. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/LICENSE +0 -0
  19. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/__init__.py +0 -0
  20. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ci/__init__.py +0 -0
  21. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ci/common.py +0 -0
  22. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ci/github_actions.py +0 -0
  23. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ci/gitlab_ci.py +0 -0
  24. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ci/jenkins_pipeline.py +0 -0
  25. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/converters/__init__.py +0 -0
  26. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/converters/cookbook_specific.py +0 -0
  27. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/converters/habitat.py +0 -0
  28. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/converters/resource.py +0 -0
  29. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/core/__init__.py +0 -0
  30. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/core/constants.py +0 -0
  31. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/core/errors.py +0 -0
  32. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/core/path_utils.py +0 -0
  33. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/core/ruby_utils.py +0 -0
  34. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/core/validation.py +0 -0
  35. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/deployment.py +0 -0
  36. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/filesystem/__init__.py +0 -0
  37. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/filesystem/operations.py +0 -0
  38. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/generators/__init__.py +0 -0
  39. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/generators/repo.py +0 -0
  40. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/parsers/__init__.py +0 -0
  41. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/parsers/attributes.py +0 -0
  42. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/parsers/habitat.py +0 -0
  43. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/parsers/inspec.py +0 -0
  44. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/parsers/metadata.py +0 -0
  45. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/parsers/recipe.py +0 -0
  46. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/parsers/resource.py +0 -0
  47. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/parsers/template.py +0 -0
  48. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/profiling.py +0 -0
  49. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ui/__init__.py +0 -0
  50. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ui/health_check.py +0 -0
  51. {mcp_souschef-3.2.0 → mcp_souschef-3.5.1}/souschef/ui/pages/validation_reports.py +0 -0
@@ -1,3 +1,45 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-souschef
3
+ Version: 3.5.1
4
+ Summary: AI-powered MCP server for Chef to Ansible conversion
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Keywords: chef,ansible,migration,infrastructure,automation,mcp,ai,conversion
8
+ Author: SousChef Contributors
9
+ Requires-Python: >=3.10,<4.0
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: System Administrators
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: System :: Systems Administration
23
+ Classifier: Topic :: Utilities
24
+ Provides-Extra: ai
25
+ Provides-Extra: all
26
+ Provides-Extra: ui
27
+ Requires-Dist: anthropic (>=0.75.0) ; extra == "ai" or extra == "all"
28
+ Requires-Dist: click (>=8.1.0)
29
+ Requires-Dist: mcp (>=1.25.0)
30
+ Requires-Dist: openai (>=1.0.0) ; extra == "ai" or extra == "all"
31
+ Requires-Dist: pandas (>=2.0.0) ; extra == "ui" or extra == "all"
32
+ Requires-Dist: plotly (>=5.17.0,<7.0) ; extra == "ui" or extra == "all"
33
+ Requires-Dist: pydantic (>=2.0.0)
34
+ Requires-Dist: python-dotenv (>=1.2.1)
35
+ Requires-Dist: pyyaml (>=6.0.0)
36
+ Requires-Dist: requests (>=2.31.0)
37
+ Requires-Dist: streamlit (>=1.28.0) ; extra == "ui" or extra == "all"
38
+ Project-URL: Documentation, https://kpeacocke.github.io/souschef/
39
+ Project-URL: Homepage, https://github.com/kpeacocke/souschef
40
+ Project-URL: Repository, https://github.com/kpeacocke/souschef
41
+ Description-Content-Type: text/markdown
42
+
1
43
  # Chef to Ansible migration - SousChef MCP
2
44
 
3
45
  An AI-powered MCP (Model Context Protocol) server that provides comprehensive Chef-to-Ansible migration capabilities for enterprise infrastructure transformation.
@@ -5,7 +47,7 @@ An AI-powered MCP (Model Context Protocol) server that provides comprehensive Ch
5
47
  [![GitHub release](https://img.shields.io/github/v/release/kpeacocke/souschef)](https://github.com/kpeacocke/souschef/releases)
6
48
  [![Python Version](https://img.shields.io/badge/python-3.14%2B-blue.svg)](https://www.python.org/downloads/)
7
49
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
- [![Test Coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg)](htmlcov/index.html)
50
+ [![Test Coverage](https://img.shields.io/badge/coverage-83%25-green.svg)](htmlcov/index.html)
9
51
  [![Code style: Ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
10
52
  [![Type Checked: mypy](https://img.shields.io/badge/type%20checked-mypy-blue.svg)](http://mypy-lang.org/)
11
53
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kpeacocke_souschef&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kpeacocke_souschef)
@@ -14,17 +56,17 @@ An AI-powered MCP (Model Context Protocol) server that provides comprehensive Ch
14
56
 
15
57
  ## Overview - Chef to Ansible features
16
58
 
17
- SousChef is a complete enterprise-grade migration platform with **32 primary MCP tools** organised across **10 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
59
+ SousChef is a complete enterprise-grade migration platform with **35 primary MCP tools** organised across **11 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments, Chef Server integration, and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
18
60
 
19
61
  ### About Tool Counts
20
62
 
21
- **Why 32 tools in the documentation but more in the server?**
63
+ **Why 35 tools in the documentation but more in the server?**
22
64
 
23
- The MCP server provides **37 total tools** (35 public + 2 internal). This documentation focuses on the **32 primary user-facing tools** that cover the main migration capabilities. The remaining 3 tools are low-level filesystem operations and helper utilities used internally by the main tools.
65
+ The MCP server provides **38 total tools**. This documentation focuses on the **35 primary user-facing tools** that cover the main migration capabilities. The remaining 3 tools are low-level filesystem operations used internally by the main tools.
24
66
 
25
- As a user, you'll primarily interact with the 27 documented tools. Your AI assistant may use the additional tools automatically when needed, but you don't need to know about them for successful migrations.
67
+ As a user, you'll primarily interact with the documented tools. Your AI assistant may use the additional tools automatically when needed, but you don't need to know about them for successful migrations.
26
68
 
27
- > **For developers:** See `souschef/server.py` for the complete list of all 37 registered tools.
69
+ > **For developers:** See `souschef/server.py` for the complete list of all 38 registered tools.
28
70
 
29
71
  ## Model Agnostic - Works with Any AI Model
30
72
 
@@ -37,7 +79,7 @@ As a user, you'll primarily interact with the 27 documented tools. Your AI assis
37
79
  - **Local Models** (Ollama, llama.cpp, etc.)
38
80
  - **Custom Enterprise Models**
39
81
 
40
- **How it works:** You choose your AI model provider in your MCP client. SousChef provides the Chef/Ansible expertise through 27 specialized tools. The model calls these tools to help with your migration.
82
+ **How it works:** You choose your AI model provider in your MCP client. SousChef provides the Chef/Ansible expertise through 35 specialized tools. The model calls these tools to help with your migration.
41
83
 
42
84
  > See [config/CONFIGURATION.md](config/CONFIGURATION.md) for configuration examples with different model providers.
43
85
 
@@ -48,6 +90,28 @@ As a user, you'll primarily interact with the 27 documented tools. Your AI assis
48
90
  - **[API Reference](docs/api-reference/)** - Detailed tool documentation
49
91
  - **[Migration Guide](docs/migration-guide/)** - Step-by-step migration process
50
92
 
93
+ ## What's New in v3.4.0-beta
94
+
95
+ **Chef Server Integration & AI-Enhanced Template Conversion** - New tools for dynamic inventory and intelligent template conversion:
96
+
97
+ - **Chef Server Connectivity**: Validate Chef Server connections and query nodes with `validate_chef_server_connection` and `get_chef_nodes`
98
+ - **AI-Enhanced Templates**: Convert ERB to Jinja2 with AI validation using `convert_template_with_ai` for complex Ruby logic
99
+ - **CLI Commands**: New commands `validate-chef-server`, `query-chef-nodes`, and `convert-template-ai` for command-line access
100
+ - **Streamlit UI**: Chef Server Settings page for managing server configuration and validation
101
+
102
+ ## What's New in v3.3.0
103
+
104
+ **AI-Assisted Effort Estimation** - SousChef now displays realistic migration effort comparisons directly in the Streamlit UI:
105
+
106
+ - **Manual Migration Estimates**: Full effort without AI assistance
107
+ - **SousChef-Assisted Estimates**: 50% time reduction through automated boilerplate conversion
108
+ - **Time Savings Display**: Instant visual comparison showing hours saved and efficiency gains
109
+ - **Interactive Metrics**: Summary and per-cookbook effort comparisons with clear deltas
110
+
111
+ Example: A cookbook estimated at 40 hours of manual work shows SousChef-assisted time as 20 hours, saving 20 hours (50%) and reducing team needs from 2 developers to 1.
112
+
113
+ See the [Assessment Guide](docs/migration-guide/assessment.md#effort-estimation-model) for details on the effort estimation model.
114
+
51
115
  ## Installation
52
116
 
53
117
  ```bash
@@ -264,6 +328,54 @@ Output formats:
264
328
  - **analyse_cookbook_dependencies** - Analyse dependencies and migration order
265
329
  - **generate_migration_report** - Generate executive and technical migration reports
266
330
 
331
+ ### 12. Chef Server Integration & Dynamic Inventory
332
+
333
+ Dynamic inventory generation and Chef Server connectivity for hybrid environments:
334
+
335
+ - **validate_chef_server_connection** - Test Chef Server REST API connectivity and authentication
336
+ - **get_chef_nodes** - Query Chef Server for nodes matching search criteria, extracting roles, environment, platform, and IP information
337
+ - **convert_template_with_ai** - Convert ERB templates to Jinja2 with AI-based validation for complex Ruby logic
338
+
339
+ #### Chef Server Features
340
+
341
+ - **Connection Validation**: Test Chef Server connectivity before migrations
342
+ - **Dynamic Node Queries**: Search Chef Server by role, environment, or custom attributes
343
+ - **Node Metadata Extraction**: Retrieve IP addresses, FQDNs, platforms, and roles for inventory
344
+ - **AI-Enhanced Conversion**: Intelligent ERB→Jinja2 conversion with validation for complex Ruby constructs
345
+ - **Fallback Handling**: Graceful degradation when Chef Server is unavailable
346
+
347
+ #### Usage Examples
348
+
349
+ ```bash
350
+ # Validate Chef Server connection
351
+ souschef validate-chef-server --server-url https://chef.example.com --node-name admin
352
+
353
+ # Query Chef Server for nodes
354
+ souschef query-chef-nodes --search-query "role:web_server" --json
355
+
356
+ # Convert template with AI assistance
357
+ souschef convert-template-ai /path/to/template.erb --ai --output /path/to/output.j2
358
+ ```
359
+
360
+ #### MCP Tool Usage
361
+
362
+ ```python
363
+ # Validate Chef Server from AI assistant
364
+ validate_chef_server_connection(
365
+ server_url="https://chef.example.com",
366
+ node_name="admin"
367
+ )
368
+
369
+ # Query nodes for dynamic inventory
370
+ get_chef_nodes(search_query="role:web_server AND environment:production")
371
+
372
+ # Convert template with AI validation
373
+ convert_template_with_ai(
374
+ erb_path="/path/to/template.erb",
375
+ use_ai_enhancement=True
376
+ )
377
+ ```
378
+
267
379
  ## Migration Workflow
268
380
 
269
381
  ### Phase 1: Discovery & Assessment
@@ -354,7 +466,12 @@ profile_parsing_operation recipe /path/to/recipe.rb --detailed
354
466
  Interactive web-based interface for Chef-to-Ansible migration planning and visualization:
355
467
 
356
468
  - **Cookbook Analysis Dashboard**: Interactive directory scanning with metadata parsing and complexity assessment
357
- - **Migration Planning Wizard**: Step-by-step migration planning with effort estimation and risk analysis
469
+ - **AI-Assisted Effort Estimation** (v3.3.0+):
470
+ - **Manual Migration Estimate**: Full effort without AI assistance
471
+ - **SousChef-Assisted Estimate**: 50% time reduction through automated boilerplate conversion
472
+ - **Time Savings Display**: Clear comparison showing hours saved and efficiency percentage
473
+ - **Visual Metrics**: Side-by-side metric cards for instant visual comparison
474
+ - **Migration Planning Wizard**: Step-by-step migration planning with dual effort scenarios and risk analysis
358
475
  - **Dependency Mapping**: Visual dependency graphs showing cookbook relationships and migration ordering
359
476
  - **Validation Reports**: Conversion validation results with syntax checking and best practice compliance
360
477
  - **Progress Tracking**: Real-time migration progress with completion metrics and bottleneck identification
@@ -385,6 +502,51 @@ docker run -p 9999:9999 souschef-ui
385
502
  docker-compose up
386
503
  ```
387
504
 
505
+ **Run Published Image from GitHub Container Registry:**
506
+
507
+ SousChef images are automatically published to GitHub Container Registry (GHCR) on each release:
508
+
509
+ ```bash
510
+ # Pull the latest released image
511
+ docker pull ghcr.io/mcp-souschef:latest
512
+
513
+ # Or pull a specific version
514
+ docker pull ghcr.io/mcp-souschef:3.2.0
515
+
516
+ # Run the image with your .env file
517
+ docker run -p 9999:9999 \
518
+ --env-file .env \
519
+ ghcr.io/mcp-souschef:latest
520
+
521
+ # Or with docker-compose
522
+ cat > docker-compose.override.yml << 'EOF'
523
+ version: '3.8'
524
+ services:
525
+ souschef-ui:
526
+ image: ghcr.io/mcp-souschef:latest
527
+ build: ~
528
+ EOF
529
+ docker-compose up
530
+ ```
531
+
532
+ **Container Images:**
533
+
534
+ - **Registry**: GitHub Container Registry (GHCR)
535
+ - **Image Name**: `mcp-souschef`
536
+ - **Full URL**: `ghcr.io/mcp-souschef`
537
+ - **Available Tags**:
538
+ - `latest` - Most recent release
539
+ - `3.2.0` - Specific version (semver)
540
+ - `3.2` - Latest patch of a minor version
541
+ - `3` - Latest patch of a major version
542
+
543
+ **Why use GHCR?**
544
+
545
+ - Integrated with GitHub releases and CI/CD
546
+ - Faster pulls for users in GitHub ecosystem
547
+ - Security scanning and SBOM included
548
+ - Multi-platform support (amd64, arm64)
549
+
388
550
  **Docker Environment Configuration:**
389
551
 
390
552
  SousChef supports AI configuration via environment variables in Docker containers. Create a `.env` file in your project root:
@@ -408,6 +570,7 @@ SOUSCHEF_AI_BASE_URL=
408
570
  SOUSCHEF_AI_PROJECT_ID=
409
571
  SOUSCHEF_AI_TEMPERATURE=0.7
410
572
  SOUSCHEF_AI_MAX_TOKENS=4000
573
+ SOUSCHEF_ALLOWED_HOSTNAMES=api.example.com,*.example.org
411
574
 
412
575
  # Streamlit Configuration (optional)
413
576
  STREAMLIT_SERVER_PORT=9999
@@ -430,6 +593,7 @@ STREAMLIT_SERVER_HEADLESS=true
430
593
  - `SOUSCHEF_AI_PROJECT_ID` - Project ID for Watsonx (optional)
431
594
  - `SOUSCHEF_AI_TEMPERATURE` - Model temperature 0.0-2.0 (optional, default: 0.7)
432
595
  - `SOUSCHEF_AI_MAX_TOKENS` - Maximum tokens to generate (optional, default: 4000)
596
+ - `SOUSCHEF_ALLOWED_HOSTNAMES` - Comma-separated list of allowed hostnames for outbound API requests (optional)
433
597
 
434
598
  **Docker Compose (recommended for development):**
435
599
 
@@ -471,7 +635,7 @@ The UI includes sophisticated dependency graph visualization powered by NetworkX
471
635
  - **Interactive Exploration**: Zoom, pan, and hover over nodes to explore complex dependency relationships
472
636
  - **Color Coding**: Visual distinction between cookbooks, dependencies, community cookbooks, and circular dependencies
473
637
  - **Static Export**: Matplotlib-based static graphs for reports and documentation
474
- - **Large Graph Support**: Optimized layouts for complex cookbook ecosystems
638
+ - **Large Graph Support**: Optimised layouts for complex cookbook ecosystems
475
639
 
476
640
  #### Real-Time Progress Tracking
477
641
 
@@ -664,7 +828,7 @@ Following enterprise-grade testing standards with comprehensive test coverage:
664
828
  - **Specialized Tests**: Enhanced guards (test_enhanced_guards.py), error handling (test_error_paths.py, test_error_recovery.py), real-world fixtures (test_real_world_fixtures.py)
665
829
  - **Performance Tests**: Benchmarking and optimization validation (test_performance.py)
666
830
  - **Snapshot Tests**: Regression testing for output stability (test_snapshots.py)
667
- - **92% Coverage**: Comprehensive test coverage exceeding the 90% target for production readiness
831
+ - **83% Coverage**: Comprehensive test coverage approaching the 90% target for production readiness
668
832
 
669
833
  ### Quality Assurance
670
834
 
@@ -1034,18 +1198,18 @@ poetry run pytest
1034
1198
  poetry run pytest --cov=souschef --cov-report=term-missing --cov-report=html
1035
1199
 
1036
1200
  # Run specific test suites
1037
- poetry run pytest tests/test_server.py # Core unit tests
1038
- poetry run pytest tests/test_cli.py # CLI tests
1039
- poetry run pytest tests/test_mcp.py # MCP protocol tests
1040
- poetry run pytest tests/test_integration.py # Integration tests
1041
- poetry run pytest tests/test_integration_accuracy.py # Accuracy validation
1042
- poetry run pytest tests/test_enhanced_guards.py # Guard conversion tests
1043
- poetry run pytest tests/test_error_paths.py # Error handling
1044
- poetry run pytest tests/test_error_recovery.py # Error recovery
1045
- poetry run pytest tests/test_real_world_fixtures.py # Real-world cookbooks
1046
- poetry run pytest tests/test_property_based.py # Hypothesis fuzz tests
1047
- poetry run pytest tests/test_performance.py # Performance benchmarks
1048
- poetry run pytest tests/test_snapshots.py # Snapshot regression tests
1201
+ poetry run pytest tests/unit/test_server.py # Core unit tests
1202
+ poetry run pytest tests/unit/test_cli.py # CLI tests
1203
+ poetry run pytest tests/e2e/test_mcp.py # MCP protocol tests
1204
+ poetry run pytest tests/integration/test_integration.py # Integration tests
1205
+ poetry run pytest tests/integration/test_integration_accuracy.py # Accuracy validation
1206
+ poetry run pytest tests/unit/test_enhanced_guards.py # Guard conversion tests
1207
+ poetry run pytest tests/unit/test_error_paths.py # Error handling
1208
+ poetry run pytest tests/unit/test_error_recovery.py # Error recovery
1209
+ poetry run pytest tests/integration/test_real_world_fixtures.py # Real-world cookbooks
1210
+ poetry run pytest tests/unit/test_property_based.py # Hypothesis fuzz tests
1211
+ poetry run pytest tests/integration/test_performance.py # Performance benchmarks
1212
+ poetry run pytest tests/unit/test_snapshots.py # Snapshot regression tests
1049
1213
 
1050
1214
  # Run with benchmarks
1051
1215
  poetry run pytest --benchmark-only
@@ -1085,7 +1249,7 @@ The project includes comprehensive test coverage across multiple dimensions:
1085
1249
  - **Snapshots** (`test_snapshots.py`): Regression testing for output stability
1086
1250
 
1087
1251
  5. **Test Fixtures**
1088
- - Sample Chef cookbooks in `tests/fixtures/`
1252
+ - Sample Chef cookbooks in `tests/integration/fixtures/`
1089
1253
  - Multiple cookbook types: apache2, docker, mysql, nodejs, legacy Chef 12, Habitat plans
1090
1254
  - Real-world metadata, recipes, attributes, and resources
1091
1255
  - Used across integration and accuracy testing
@@ -1150,3 +1314,4 @@ Questions? Check [ARCHITECTURE.md](docs/ARCHITECTURE.md) for module responsibili
1150
1314
  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
1151
1315
 
1152
1316
  ---
1317
+
@@ -1,38 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: mcp-souschef
3
- Version: 3.2.0
4
- Summary: AI-powered MCP server for Chef to Ansible conversion
5
- License: MIT
6
- License-File: LICENSE
7
- Keywords: chef,ansible,migration,infrastructure,automation,mcp,ai,conversion
8
- Author: SousChef Contributors
9
- Requires-Python: >=3.13,<4.0
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Developers
12
- Classifier: Intended Audience :: System Administrators
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.13
17
- Classifier: Programming Language :: Python :: 3.14
18
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
- Classifier: Topic :: System :: Systems Administration
20
- Classifier: Topic :: Utilities
21
- Provides-Extra: ui
22
- Requires-Dist: anthropic (>=0.75.0)
23
- Requires-Dist: click (>=8.1.0)
24
- Requires-Dist: mcp (>=1.25.0)
25
- Requires-Dist: openai (>=1.0.0)
26
- Requires-Dist: pandas (>=2.0.0) ; extra == "ui"
27
- Requires-Dist: plotly (>=5.0.0)
28
- Requires-Dist: python-dotenv (>=1.2.1)
29
- Requires-Dist: pyyaml (>=6.0.0)
30
- Requires-Dist: streamlit (>=1.28.0)
31
- Project-URL: Documentation, https://kpeacocke.github.io/souschef/
32
- Project-URL: Homepage, https://github.com/kpeacocke/souschef
33
- Project-URL: Repository, https://github.com/kpeacocke/souschef
34
- Description-Content-Type: text/markdown
35
-
36
1
  # Chef to Ansible migration - SousChef MCP
37
2
 
38
3
  An AI-powered MCP (Model Context Protocol) server that provides comprehensive Chef-to-Ansible migration capabilities for enterprise infrastructure transformation.
@@ -40,7 +5,7 @@ An AI-powered MCP (Model Context Protocol) server that provides comprehensive Ch
40
5
  [![GitHub release](https://img.shields.io/github/v/release/kpeacocke/souschef)](https://github.com/kpeacocke/souschef/releases)
41
6
  [![Python Version](https://img.shields.io/badge/python-3.14%2B-blue.svg)](https://www.python.org/downloads/)
42
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
43
- [![Test Coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg)](htmlcov/index.html)
8
+ [![Test Coverage](https://img.shields.io/badge/coverage-83%25-green.svg)](htmlcov/index.html)
44
9
  [![Code style: Ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
45
10
  [![Type Checked: mypy](https://img.shields.io/badge/type%20checked-mypy-blue.svg)](http://mypy-lang.org/)
46
11
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kpeacocke_souschef&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kpeacocke_souschef)
@@ -49,17 +14,17 @@ An AI-powered MCP (Model Context Protocol) server that provides comprehensive Ch
49
14
 
50
15
  ## Overview - Chef to Ansible features
51
16
 
52
- SousChef is a complete enterprise-grade migration platform with **32 primary MCP tools** organised across **10 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
17
+ SousChef is a complete enterprise-grade migration platform with **35 primary MCP tools** organised across **11 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments, Chef Server integration, and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
53
18
 
54
19
  ### About Tool Counts
55
20
 
56
- **Why 32 tools in the documentation but more in the server?**
21
+ **Why 35 tools in the documentation but more in the server?**
57
22
 
58
- The MCP server provides **37 total tools** (35 public + 2 internal). This documentation focuses on the **32 primary user-facing tools** that cover the main migration capabilities. The remaining 3 tools are low-level filesystem operations and helper utilities used internally by the main tools.
23
+ The MCP server provides **38 total tools**. This documentation focuses on the **35 primary user-facing tools** that cover the main migration capabilities. The remaining 3 tools are low-level filesystem operations used internally by the main tools.
59
24
 
60
- As a user, you'll primarily interact with the 27 documented tools. Your AI assistant may use the additional tools automatically when needed, but you don't need to know about them for successful migrations.
25
+ As a user, you'll primarily interact with the documented tools. Your AI assistant may use the additional tools automatically when needed, but you don't need to know about them for successful migrations.
61
26
 
62
- > **For developers:** See `souschef/server.py` for the complete list of all 37 registered tools.
27
+ > **For developers:** See `souschef/server.py` for the complete list of all 38 registered tools.
63
28
 
64
29
  ## Model Agnostic - Works with Any AI Model
65
30
 
@@ -72,7 +37,7 @@ As a user, you'll primarily interact with the 27 documented tools. Your AI assis
72
37
  - **Local Models** (Ollama, llama.cpp, etc.)
73
38
  - **Custom Enterprise Models**
74
39
 
75
- **How it works:** You choose your AI model provider in your MCP client. SousChef provides the Chef/Ansible expertise through 27 specialized tools. The model calls these tools to help with your migration.
40
+ **How it works:** You choose your AI model provider in your MCP client. SousChef provides the Chef/Ansible expertise through 35 specialized tools. The model calls these tools to help with your migration.
76
41
 
77
42
  > See [config/CONFIGURATION.md](config/CONFIGURATION.md) for configuration examples with different model providers.
78
43
 
@@ -83,6 +48,28 @@ As a user, you'll primarily interact with the 27 documented tools. Your AI assis
83
48
  - **[API Reference](docs/api-reference/)** - Detailed tool documentation
84
49
  - **[Migration Guide](docs/migration-guide/)** - Step-by-step migration process
85
50
 
51
+ ## What's New in v3.4.0-beta
52
+
53
+ **Chef Server Integration & AI-Enhanced Template Conversion** - New tools for dynamic inventory and intelligent template conversion:
54
+
55
+ - **Chef Server Connectivity**: Validate Chef Server connections and query nodes with `validate_chef_server_connection` and `get_chef_nodes`
56
+ - **AI-Enhanced Templates**: Convert ERB to Jinja2 with AI validation using `convert_template_with_ai` for complex Ruby logic
57
+ - **CLI Commands**: New commands `validate-chef-server`, `query-chef-nodes`, and `convert-template-ai` for command-line access
58
+ - **Streamlit UI**: Chef Server Settings page for managing server configuration and validation
59
+
60
+ ## What's New in v3.3.0
61
+
62
+ **AI-Assisted Effort Estimation** - SousChef now displays realistic migration effort comparisons directly in the Streamlit UI:
63
+
64
+ - **Manual Migration Estimates**: Full effort without AI assistance
65
+ - **SousChef-Assisted Estimates**: 50% time reduction through automated boilerplate conversion
66
+ - **Time Savings Display**: Instant visual comparison showing hours saved and efficiency gains
67
+ - **Interactive Metrics**: Summary and per-cookbook effort comparisons with clear deltas
68
+
69
+ Example: A cookbook estimated at 40 hours of manual work shows SousChef-assisted time as 20 hours, saving 20 hours (50%) and reducing team needs from 2 developers to 1.
70
+
71
+ See the [Assessment Guide](docs/migration-guide/assessment.md#effort-estimation-model) for details on the effort estimation model.
72
+
86
73
  ## Installation
87
74
 
88
75
  ```bash
@@ -299,6 +286,54 @@ Output formats:
299
286
  - **analyse_cookbook_dependencies** - Analyse dependencies and migration order
300
287
  - **generate_migration_report** - Generate executive and technical migration reports
301
288
 
289
+ ### 12. Chef Server Integration & Dynamic Inventory
290
+
291
+ Dynamic inventory generation and Chef Server connectivity for hybrid environments:
292
+
293
+ - **validate_chef_server_connection** - Test Chef Server REST API connectivity and authentication
294
+ - **get_chef_nodes** - Query Chef Server for nodes matching search criteria, extracting roles, environment, platform, and IP information
295
+ - **convert_template_with_ai** - Convert ERB templates to Jinja2 with AI-based validation for complex Ruby logic
296
+
297
+ #### Chef Server Features
298
+
299
+ - **Connection Validation**: Test Chef Server connectivity before migrations
300
+ - **Dynamic Node Queries**: Search Chef Server by role, environment, or custom attributes
301
+ - **Node Metadata Extraction**: Retrieve IP addresses, FQDNs, platforms, and roles for inventory
302
+ - **AI-Enhanced Conversion**: Intelligent ERB→Jinja2 conversion with validation for complex Ruby constructs
303
+ - **Fallback Handling**: Graceful degradation when Chef Server is unavailable
304
+
305
+ #### Usage Examples
306
+
307
+ ```bash
308
+ # Validate Chef Server connection
309
+ souschef validate-chef-server --server-url https://chef.example.com --node-name admin
310
+
311
+ # Query Chef Server for nodes
312
+ souschef query-chef-nodes --search-query "role:web_server" --json
313
+
314
+ # Convert template with AI assistance
315
+ souschef convert-template-ai /path/to/template.erb --ai --output /path/to/output.j2
316
+ ```
317
+
318
+ #### MCP Tool Usage
319
+
320
+ ```python
321
+ # Validate Chef Server from AI assistant
322
+ validate_chef_server_connection(
323
+ server_url="https://chef.example.com",
324
+ node_name="admin"
325
+ )
326
+
327
+ # Query nodes for dynamic inventory
328
+ get_chef_nodes(search_query="role:web_server AND environment:production")
329
+
330
+ # Convert template with AI validation
331
+ convert_template_with_ai(
332
+ erb_path="/path/to/template.erb",
333
+ use_ai_enhancement=True
334
+ )
335
+ ```
336
+
302
337
  ## Migration Workflow
303
338
 
304
339
  ### Phase 1: Discovery & Assessment
@@ -389,7 +424,12 @@ profile_parsing_operation recipe /path/to/recipe.rb --detailed
389
424
  Interactive web-based interface for Chef-to-Ansible migration planning and visualization:
390
425
 
391
426
  - **Cookbook Analysis Dashboard**: Interactive directory scanning with metadata parsing and complexity assessment
392
- - **Migration Planning Wizard**: Step-by-step migration planning with effort estimation and risk analysis
427
+ - **AI-Assisted Effort Estimation** (v3.3.0+):
428
+ - **Manual Migration Estimate**: Full effort without AI assistance
429
+ - **SousChef-Assisted Estimate**: 50% time reduction through automated boilerplate conversion
430
+ - **Time Savings Display**: Clear comparison showing hours saved and efficiency percentage
431
+ - **Visual Metrics**: Side-by-side metric cards for instant visual comparison
432
+ - **Migration Planning Wizard**: Step-by-step migration planning with dual effort scenarios and risk analysis
393
433
  - **Dependency Mapping**: Visual dependency graphs showing cookbook relationships and migration ordering
394
434
  - **Validation Reports**: Conversion validation results with syntax checking and best practice compliance
395
435
  - **Progress Tracking**: Real-time migration progress with completion metrics and bottleneck identification
@@ -420,6 +460,51 @@ docker run -p 9999:9999 souschef-ui
420
460
  docker-compose up
421
461
  ```
422
462
 
463
+ **Run Published Image from GitHub Container Registry:**
464
+
465
+ SousChef images are automatically published to GitHub Container Registry (GHCR) on each release:
466
+
467
+ ```bash
468
+ # Pull the latest released image
469
+ docker pull ghcr.io/mcp-souschef:latest
470
+
471
+ # Or pull a specific version
472
+ docker pull ghcr.io/mcp-souschef:3.2.0
473
+
474
+ # Run the image with your .env file
475
+ docker run -p 9999:9999 \
476
+ --env-file .env \
477
+ ghcr.io/mcp-souschef:latest
478
+
479
+ # Or with docker-compose
480
+ cat > docker-compose.override.yml << 'EOF'
481
+ version: '3.8'
482
+ services:
483
+ souschef-ui:
484
+ image: ghcr.io/mcp-souschef:latest
485
+ build: ~
486
+ EOF
487
+ docker-compose up
488
+ ```
489
+
490
+ **Container Images:**
491
+
492
+ - **Registry**: GitHub Container Registry (GHCR)
493
+ - **Image Name**: `mcp-souschef`
494
+ - **Full URL**: `ghcr.io/mcp-souschef`
495
+ - **Available Tags**:
496
+ - `latest` - Most recent release
497
+ - `3.2.0` - Specific version (semver)
498
+ - `3.2` - Latest patch of a minor version
499
+ - `3` - Latest patch of a major version
500
+
501
+ **Why use GHCR?**
502
+
503
+ - Integrated with GitHub releases and CI/CD
504
+ - Faster pulls for users in GitHub ecosystem
505
+ - Security scanning and SBOM included
506
+ - Multi-platform support (amd64, arm64)
507
+
423
508
  **Docker Environment Configuration:**
424
509
 
425
510
  SousChef supports AI configuration via environment variables in Docker containers. Create a `.env` file in your project root:
@@ -443,6 +528,7 @@ SOUSCHEF_AI_BASE_URL=
443
528
  SOUSCHEF_AI_PROJECT_ID=
444
529
  SOUSCHEF_AI_TEMPERATURE=0.7
445
530
  SOUSCHEF_AI_MAX_TOKENS=4000
531
+ SOUSCHEF_ALLOWED_HOSTNAMES=api.example.com,*.example.org
446
532
 
447
533
  # Streamlit Configuration (optional)
448
534
  STREAMLIT_SERVER_PORT=9999
@@ -465,6 +551,7 @@ STREAMLIT_SERVER_HEADLESS=true
465
551
  - `SOUSCHEF_AI_PROJECT_ID` - Project ID for Watsonx (optional)
466
552
  - `SOUSCHEF_AI_TEMPERATURE` - Model temperature 0.0-2.0 (optional, default: 0.7)
467
553
  - `SOUSCHEF_AI_MAX_TOKENS` - Maximum tokens to generate (optional, default: 4000)
554
+ - `SOUSCHEF_ALLOWED_HOSTNAMES` - Comma-separated list of allowed hostnames for outbound API requests (optional)
468
555
 
469
556
  **Docker Compose (recommended for development):**
470
557
 
@@ -506,7 +593,7 @@ The UI includes sophisticated dependency graph visualization powered by NetworkX
506
593
  - **Interactive Exploration**: Zoom, pan, and hover over nodes to explore complex dependency relationships
507
594
  - **Color Coding**: Visual distinction between cookbooks, dependencies, community cookbooks, and circular dependencies
508
595
  - **Static Export**: Matplotlib-based static graphs for reports and documentation
509
- - **Large Graph Support**: Optimized layouts for complex cookbook ecosystems
596
+ - **Large Graph Support**: Optimised layouts for complex cookbook ecosystems
510
597
 
511
598
  #### Real-Time Progress Tracking
512
599
 
@@ -699,7 +786,7 @@ Following enterprise-grade testing standards with comprehensive test coverage:
699
786
  - **Specialized Tests**: Enhanced guards (test_enhanced_guards.py), error handling (test_error_paths.py, test_error_recovery.py), real-world fixtures (test_real_world_fixtures.py)
700
787
  - **Performance Tests**: Benchmarking and optimization validation (test_performance.py)
701
788
  - **Snapshot Tests**: Regression testing for output stability (test_snapshots.py)
702
- - **92% Coverage**: Comprehensive test coverage exceeding the 90% target for production readiness
789
+ - **83% Coverage**: Comprehensive test coverage approaching the 90% target for production readiness
703
790
 
704
791
  ### Quality Assurance
705
792
 
@@ -1069,18 +1156,18 @@ poetry run pytest
1069
1156
  poetry run pytest --cov=souschef --cov-report=term-missing --cov-report=html
1070
1157
 
1071
1158
  # Run specific test suites
1072
- poetry run pytest tests/test_server.py # Core unit tests
1073
- poetry run pytest tests/test_cli.py # CLI tests
1074
- poetry run pytest tests/test_mcp.py # MCP protocol tests
1075
- poetry run pytest tests/test_integration.py # Integration tests
1076
- poetry run pytest tests/test_integration_accuracy.py # Accuracy validation
1077
- poetry run pytest tests/test_enhanced_guards.py # Guard conversion tests
1078
- poetry run pytest tests/test_error_paths.py # Error handling
1079
- poetry run pytest tests/test_error_recovery.py # Error recovery
1080
- poetry run pytest tests/test_real_world_fixtures.py # Real-world cookbooks
1081
- poetry run pytest tests/test_property_based.py # Hypothesis fuzz tests
1082
- poetry run pytest tests/test_performance.py # Performance benchmarks
1083
- poetry run pytest tests/test_snapshots.py # Snapshot regression tests
1159
+ poetry run pytest tests/unit/test_server.py # Core unit tests
1160
+ poetry run pytest tests/unit/test_cli.py # CLI tests
1161
+ poetry run pytest tests/e2e/test_mcp.py # MCP protocol tests
1162
+ poetry run pytest tests/integration/test_integration.py # Integration tests
1163
+ poetry run pytest tests/integration/test_integration_accuracy.py # Accuracy validation
1164
+ poetry run pytest tests/unit/test_enhanced_guards.py # Guard conversion tests
1165
+ poetry run pytest tests/unit/test_error_paths.py # Error handling
1166
+ poetry run pytest tests/unit/test_error_recovery.py # Error recovery
1167
+ poetry run pytest tests/integration/test_real_world_fixtures.py # Real-world cookbooks
1168
+ poetry run pytest tests/unit/test_property_based.py # Hypothesis fuzz tests
1169
+ poetry run pytest tests/integration/test_performance.py # Performance benchmarks
1170
+ poetry run pytest tests/unit/test_snapshots.py # Snapshot regression tests
1084
1171
 
1085
1172
  # Run with benchmarks
1086
1173
  poetry run pytest --benchmark-only
@@ -1120,7 +1207,7 @@ The project includes comprehensive test coverage across multiple dimensions:
1120
1207
  - **Snapshots** (`test_snapshots.py`): Regression testing for output stability
1121
1208
 
1122
1209
  5. **Test Fixtures**
1123
- - Sample Chef cookbooks in `tests/fixtures/`
1210
+ - Sample Chef cookbooks in `tests/integration/fixtures/`
1124
1211
  - Multiple cookbook types: apache2, docker, mysql, nodejs, legacy Chef 12, Habitat plans
1125
1212
  - Real-world metadata, recipes, attributes, and resources
1126
1213
  - Used across integration and accuracy testing
@@ -1185,4 +1272,3 @@ Questions? Check [ARCHITECTURE.md](docs/ARCHITECTURE.md) for module responsibili
1185
1272
  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
1186
1273
 
1187
1274
  ---
1188
-