portainer-mcp/.env.example
Adolfo Delorenzo be1e05c382 Simplify authentication to require URL and API key only
Major configuration and tooling updates:

Authentication Changes:
- Remove username/password authentication support
- Require PORTAINER_URL and PORTAINER_API_KEY (both mandatory)
- Simplify PortainerConfig class and validation logic
- Update all documentation to reflect API key requirement

Multiple Runtime Support:
- Add uvx support for running without installation
- Add uv support with dedicated wrapper script
- Add npx support with Node.js wrapper script
- Maintain backward compatibility with direct Python execution

Documentation Updates:
- Comprehensive README.md with all execution methods
- Detailed USAGE.md with step-by-step instructions
- Updated .env.example with clear required vs optional sections
- Enhanced docstrings in server.py and config.py

Tooling Support:
- package.json for npm/npx support with cross-platform wrapper
- scripts/run-with-uv.py for uv integration
- bin/portainer-core-mcp Node.js wrapper for npx
- test_uvx.py for uvx functionality testing

Configuration Improvements:
- Clear separation of required vs optional environment variables
- Better validation error messages
- Simplified authentication flow
- Enhanced project metadata in pyproject.toml

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 07:48:23 -06:00

43 lines
1.1 KiB
Plaintext

# Portainer Core MCP Server Configuration
# =============================================================================
# REQUIRED CONFIGURATION
# =============================================================================
# Portainer instance URL (required)
# Examples:
# - https://portainer.example.com
# - https://portainer.company.com:9443
# - http://localhost:9000
PORTAINER_URL=https://portainer.example.com
# Portainer API key for authentication (required)
# Generate this from Portainer UI: User settings > API tokens
# Example: ptr_XYZ123abc456def789
PORTAINER_API_KEY=your-api-key-here
# =============================================================================
# OPTIONAL CONFIGURATION
# =============================================================================
# HTTP client settings
HTTP_TIMEOUT=30
MAX_RETRIES=3
RETRY_DELAY=1.0
# Circuit breaker settings
CIRCUIT_BREAKER_FAILURE_THRESHOLD=5
CIRCUIT_BREAKER_RECOVERY_TIMEOUT=60
# Token management settings
TOKEN_CACHE_TTL=3600
TOKEN_REFRESH_THRESHOLD=300
# Logging settings
LOG_LEVEL=INFO
LOG_FORMAT=json
# Development settings
DEBUG=false