All scripts are organized under src/scripts/ with the following structure:
deployment/- Server deployment scriptstesting/- Testing and validation scriptsanalysis/- Content analysis toolsdata/- Data processing utilities
Location: /main.py
Purpose: Main entry point that automatically selects the appropriate server based on environment
Usage:
python main.pyEnvironment Variables:
RAILWAY_ENVIRONMENT: Detects Railway deploymentRAILWAY_PUBLIC_DOMAIN: Public domain (default: strunz.up.railway.app)RAILWAY_PRIVATE_DOMAIN: Private domain (default: strunz.railway.internal)
Location: src/scripts/deployment/railway_mcp_sse_server.py
Purpose: Production Railway server with SSE endpoint for monitoring
Features:
- Health check endpoint at
/ - SSE monitoring endpoint at
/sse - MCP protocol via stdio
Usage: Automatically selected when
RAILWAY_ENVIRONMENT=production
Location: src/scripts/deployment/railway_mcp_server.py
Purpose: Minimal Railway server without SSE
Features:
- Health check only
- MCP protocol via stdio Usage: For staging/development Railway deployments
Location: src/scripts/deployment/simple_server.py
Purpose: Lightweight health check server for testing
Usage: Fallback when MCP server fails to load
Location: archive/deprecated-scripts/start_server.py
Purpose: Legacy server starter
Status: Removed in cleanup - use main.py instead
Location: src/scripts/testing/test_sse_endpoint.sh
Purpose: Test SSE endpoint functionality
Usage:
./test_sse_endpoint.sh [URL]
# Default: http://localhost:8000/sse
# Production: ./test_sse_endpoint.sh https://strunz.up.railway.app/sseLocation: src/scripts/testing/test_mcp_jsonrpc.sh
Purpose: Comprehensive MCP tools testing via JSON-RPC
Usage:
./test_mcp_jsonrpc.shOutput: MCP_FULL_SERVER_TEST_REPORT.md
Location: src/scripts/testing/test_mcp_curl.sh
Purpose: Legacy MCP testing script
Status: Deprecated - use test_mcp_jsonrpc.sh
Location: src/scripts/testing/test_full_mcp_comprehensive.py
Purpose: Python-based comprehensive MCP testing
Usage:
python test_full_mcp_comprehensive.pyRequirements: aiohttp
Location: src/scripts/testing/test_mcp_sse.py
Purpose: Legacy SSE testing
Status: Deprecated - use test_sse_endpoint.sh
Location: src/scripts/analysis/analyze_strunz_content.py
Purpose: Analyze Dr. Strunz content structure and statistics
Usage:
python src/scripts/analysis/analyze_strunz_content.pyOutput: Content analysis report with statistics
Location: src/scripts/analysis/refined_strunz_analysis.py
Purpose: Enhanced content analysis with topic modeling
Usage:
python src/scripts/analysis/refined_strunz_analysis.pyFeatures:
- Topic extraction
- Keyword analysis
- Content categorization
Location: src/scripts/data/reconstruct_indices.sh
Purpose: Reconstruct FAISS indices from chunks during Docker build
Usage:
cd /app && bash src/scripts/data/reconstruct_indices.shNote: Used in Dockerfile for deployment
Location: src/scripts/data/split_faiss_index.py
Purpose: Split large FAISS indices into <40MB chunks for GitHub
Usage:
python src/scripts/data/split_faiss_index.py data/faiss_indices/combined_index.faissOutput: Multiple .partXXX files in chunks/ directory
-
Local Development:
python main.py
-
Docker Testing:
docker build -t strunz-mcp:test . docker run -p 8000:8000 strunz-mcp:test ./src/scripts/testing/test_sse_endpoint.sh -
Production Deployment:
- Push to main branch
- Railway automatically builds and deploys
- Test with:
./src/scripts/testing/test_sse_endpoint.sh https://strunz.up.railway.app/sse
| Variable | Default | Description |
|---|---|---|
RAILWAY_PUBLIC_DOMAIN |
strunz.up.railway.app | Public domain for Railway |
RAILWAY_PRIVATE_DOMAIN |
strunz.railway.internal | Internal Railway domain |
RAILWAY_ENVIRONMENT |
- | Set to 'production' for prod |
PORT |
8000 | Server port |
LOG_LEVEL |
INFO | Logging level |
The following scripts have been removed/deprecated:
start_server.py- REMOVED, archived. Usemain.pyinsteadofficial_mcp_server.py- REMOVED, was duplicate ofmcp_sdk_clean.pytest_mcp_curl.sh- Usetest_mcp_jsonrpc.shtest_mcp_sse.py- Usetest_sse_endpoint.sh
All scripts now use consistent paths and the project structure follows:
StrunzKnowledge/
├── main.py # Main entry point
├── src/
│ ├── scripts/
│ │ ├── deployment/ # Server scripts
│ │ ├── testing/ # Test scripts
│ │ ├── analysis/ # Analysis tools
│ │ └── data/ # Data utilities
│ └── mcp/ # MCP server implementation
└── data/ # Data files