mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
e62ce679fe
Switch the --model / -m flag format from colon-separated (provider:model) to slash-separated (provider/model), e.g. anthropic/claude-sonnet-4-5-20250929 or ollama/qwen3:8b. The slash separator is cleaner since model names can contain colons (ollama tags, bedrock ARNs). Add centralized ParseModelString() in internal/models/providers.go that all callers now use. The old colon format is still accepted with a deprecation warning to stderr for backward compatibility. Update default model to claude-sonnet-4-5-20250929.
MCPHost Script Examples
This directory contains example scripts demonstrating various features of MCPHost's script mode.
Scripts
default-values-demo.sh
Demonstrates the new default values feature for script variables.
Features showcased:
- Optional variables with default values using
${var:-default}syntax - Mixed required and optional variables
- Default values in MCP server configuration
- Complex default values (paths, commands, formats)
Usage:
# Use all defaults
mcphost script default-values-demo.sh
# Override specific variables
mcphost script default-values-demo.sh --args:user_name "John" --args:work_dir "/projects"
# Override multiple variables
mcphost script default-values-demo.sh \
--args:user_name "Alice" \
--args:editor "vim" \
--args:format "json"
tls-test-script.sh
Demonstrates TLS skip verify for connecting to providers with self-signed certificates.
Features showcased:
tls-skip-verifyconfiguration in script frontmatter- Connecting to HTTPS endpoints with self-signed certificates
- Security considerations for development environments
Usage:
# Run with TLS skip verify enabled (configured in script)
mcphost script tls-test-script.sh
# Override the provider URL
mcphost script tls-test-script.sh --provider-url https://192.168.1.100:443
# Disable TLS skip verify via command line (overrides script config)
mcphost script tls-test-script.sh --tls-skip-verify=false
⚠️ WARNING: Only use tls-skip-verify for development or when connecting to trusted servers with self-signed certificates.
Variable Syntax Reference
MCPHost scripts support two types of variables:
Required Variables
${variable}
- Must be provided via
--args:variable value - Script will fail if not provided
Optional Variables with Defaults
${variable:-default_value}
- Uses
default_valueif not provided - Can be overridden with
--args:variable value - Supports empty defaults:
${var:-} - Supports complex defaults:
${path:-/tmp/default/path}
Best Practices
- Use descriptive variable names:
${user_name}instead of${name} - Provide sensible defaults: Choose defaults that work in most environments
- Document variables: Include usage examples in script comments
- Mix required and optional: Use required variables for critical inputs, optional for preferences
- Test with defaults: Ensure scripts work with all default values
Backward Compatibility
All existing scripts using ${variable} syntax continue to work unchanged. The new default syntax is purely additive.