Package Configuration
Package configuration allows you to specify executable packages from various registries including npm, PyPI, Docker, and Homebrew that can be used to run your MCP servers. This provides flexibility in choosing the right runtime environment and dependencies for your specific use case.Overview
Pylee supports packages from multiple registries, enabling you to:- Run Node.js packages from npm registry
- Execute Python packages from PyPI
- Use containerized applications from Docker Hub
- Install system tools via Homebrew
- Handle custom packages from unknown registries
Supported Package Registries
npm (Node.js)
Execute Node.js packages directly from the npm registry:@modelcontextprotocol/server-filesystem
- File system access@modelcontextprotocol/server-git
- Git repository integration@modelcontextprotocol/server-sqlite
- SQLite database access@modelcontextprotocol/server-postgres
- PostgreSQL integration
PyPI (Python)
Run Python packages from the Python Package Index:mcp-server-github
- GitHub API integrationmcp-server-slack
- Slack workspace accessmcp-server-gdrive
- Google Drive file managementmcp-server-notion
- Notion database operations
Docker
Execute containerized applications using Docker:- Use fully qualified image names (registry/namespace/image)
- Configure port mappings through runtime arguments
- Mount volumes for persistent data access
- Set resource limits via package arguments
Homebrew (macOS/Linux)
Install and run system tools via Homebrew:- System utilities and CLI tools
- Development tools and compilers
- Database clients and servers
- Networking and security tools
Unknown Registry
For custom or private registries:Package Configuration Fields
Required Fields
registry_type- The package registry identifier
- Supported values:
npm
,pypi
,docker
,homebrew
,unknown
- Determines how the package will be resolved and executed
- The package name as it appears in the registry
- For Docker: use fully qualified image names
- For npm/PyPI: use exact package names
- For Homebrew: use formula names
- Package version to install/use
- Use
latest
for the most recent version - Specify exact versions for reproducible builds
- Support for semantic versioning ranges
Optional Fields
runtime_hint- Hint about the runtime environment
- Common values:
node
,python
,docker
,brew
- Can specify full paths to custom runtimes
- Used to optimize execution strategy
- Arguments passed to the runtime (not the package)
- Examples: Node.js memory flags, Python optimization flags
- Docker run options, Homebrew execution parameters
- Array of strings for complex argument structures
- Arguments passed directly to the package
- Configuration flags, input parameters
- Package-specific options and settings
- Executed after runtime arguments
- Array of environment variable definitions
- Each variable has name, value, required, and secret flags
- Used for API keys, configuration paths, feature flags
- Supports both required and optional variables
Environment Variables
Environment variables provide configuration and secrets to your packages:Variable Properties
- Environment variable name
- Should follow standard naming conventions (UPPERCASE_SNAKE_CASE)
- Used as the actual environment variable name during execution
- The variable value
- Can be empty for runtime-provided values
- Supports string interpolation in some contexts
- Whether the variable must have a value
- Required variables without values will prevent execution
- Used for validation before package execution
- Whether the variable contains sensitive information
- Secret variables are masked in logs and UI
- Should be used for API keys, passwords, tokens
Common Environment Patterns
API ConfigurationVariables in Package Configuration
Package configuration supports dynamic variables using bracket notation ({variable_name}
) to avoid hardcoding sensitive information or environment-specific values. Variables are resolved at runtime through a hierarchical lookup system.
Variable Resolution Order
When a variable is referenced, Pylee resolves its value by checking the following sources in order:- Organization variables or secrets - Global settings for your organization
- Registry variables or secrets - Shared configuration across the registry
- User prompt - Interactive prompt when no value is found for required variables
Using Variables in Package Configuration
Variables can be used in any string value within your package configuration: Environment Variables with Dynamic Values:Configuration Examples
Complete npm Package Setup
Python Package with Secrets
Docker Container Configuration
Best Practices
Version Management
Pin Specific VersionsSecurity Considerations
Protect Sensitive DataPerformance Optimization
Configure Runtime LimitsTroubleshooting
Common Issues
Package Not Found- Verify the package name matches the registry exactly
- Check if the version exists in the registry
- Ensure network access to the package registry
- Review runtime_arguments for compatibility
- Check environment variable requirements
- Validate package_arguments syntax
- Ensure proper file system permissions
- Check Docker daemon access (for Docker packages)
- Verify Homebrew installation permissions
- Confirm required variables have values
- Check for typos in variable names
- Validate secret variable handling
Debugging Tips
Enable Debug LoggingNext Steps
After configuring your packages:- Learn about MCP server configuration for advanced settings
- Set up local connections for development
- Configure remote connections for production
- Explore MCP server examples
Need Help?
For package configuration support:- Check the MCP Server Registry for examples
- Review package-specific documentation
- Visit community discussions
- Explore [registry-specific documentation](https://docs.npmjs.com/, https://pypi.org/help/, https://docs.docker.com/)