io.github.KaiErikNiermann/pypreset
Generates Codecov configuration with customizable coverage thresholds and ignore patterns for project testing.
Generates Dependabot configuration for automated dependency updates in the project repository.
Provides a preset to scaffold a Discord bot project with appropriate structure and configuration.
Generates multi-stage Dockerfiles and .dockerignore files for containerized deployment.
Initializes a Git repository and generates .gitignore files for Python projects.
Automates GitHub release management via the gh CLI, including tagging, creating releases, and publishing.
Generates CI/CD workflows for testing, linting, and publishing to PyPI, as well as local verification with act.
Generates GitHub Pages deployment workflows for documentation generated with MkDocs or Sphinx.
Supports Podman as an alternative container runtime for Dockerfile and devcontainer generation.
Supports Poetry as a package manager for project dependency management and virtual environment setup.
Generates pre-commit hooks configuration for automated code quality checks before commits.
Provides tools to read, set, and validate PyPI metadata, and generates PyPI publishing workflows.
Configures Ruff for linting and formatting, integrated into CI workflows and pre-commit hooks.
Generates Sphinx documentation scaffolding with optional GitHub Pages deployment.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@io.github.KaiErikNiermann/pypresetCreate a Python CLI tool with Poetry and Docker support."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-name: io.github.KaiErikNiermann/pypreset
Features
Preset-based project creation from YAML configs with single inheritance
Augment existing projects with CI workflows, tests, Docker, documentation, and more
Three package managers: Poetry, uv (PEP 621 + hatchling), and setuptools (PEP 621 + setuptools.build_meta)
Two layout styles:
src/layout and flat layoutType checking: mypy, pyright, ty, or none
Code quality: ruff linting/formatting, radon complexity checks, pre-commit hooks
Docker & devcontainer: generate multi-stage Dockerfiles,
.dockerignore, and VS Code devcontainer configs (Docker or Podman)Coverage integration: Codecov support with configurable thresholds and ignore patterns
Documentation scaffolding: MkDocs (Material theme) or Sphinx (RTD theme) with optional GitHub Pages deployment
Multi-environment testing: tox configuration with tox-uv backend
pyenv / .python-version: generate
.python-versionfor pyenv and uv, withpython-version-filein CI workflowsVersion management: bump-my-version integration, GitHub release automation via
ghCLIWorkflow verification: local GitHub Actions testing with
act(auto-detect, auto-install, dry-run and full-run modes)PyPI metadata management: read, set, and check publish-readiness of
pyproject.tomlmetadataUser defaults: persistent config at
~/.config/pypreset/config.yamlMCP server: expose all functionality to AI coding assistants via the Model Context Protocol
Related MCP server: code-mcp
Installation
pip install pypreset
# With MCP server support
pip install pypreset[mcp]Quick Start
# Create a CLI tool project with Poetry
pypreset create my-cli --preset cli-tool
# Create a data science project with uv
pypreset create my-analysis --preset data-science --package-manager uv
# Create an empty package with src layout (default)
pypreset create my-package --preset empty-package
# Create a Discord bot
pypreset create my-bot --preset discord-bot
# Create a project with Docker support
pypreset create my-service --preset cli-tool --docker --devcontainer
# Create with .python-version for pyenv/uv
pypreset create my-lib --pyenv --python-version 3.13
# Create with Podman, Codecov, docs, and tox
pypreset create my-project --preset empty-package \
--container-runtime podman --docker \
--coverage-tool codecov --coverage-threshold 80 \
--docs mkdocs --docs-gh-pages \
--toxCommands
create -- Scaffold a new project
pypreset create <name> [OPTIONS]Option | Description |
| Preset to use (default: |
| Output directory (default: |
| Custom preset YAML file |
|
|
|
|
|
|
|
|
| e.g., |
| Enable/disable testing scaffold |
| Enable/disable formatting config |
| Enable radon complexity checking |
| Generate pre-commit hooks config |
| Include bump-my-version config |
| Additional packages (repeatable) |
| Additional dev packages (repeatable) |
| Generate Dockerfile and |
| Generate |
|
|
|
|
| Minimum coverage % (e.g., |
|
|
| Generate GitHub Pages deploy workflow |
| Generate |
| Generate |
| Initialize git repository |
| Run dependency install after creation |
| Preview what would be created without generating anything |
augment -- Add components to an existing project
Analyzes pyproject.toml to auto-detect your tooling, then generates the selected components. Runs in interactive mode by default (prompts for values it can't detect); use --auto to skip prompts.
pypreset augment [path] [OPTIONS]Available components:
Flag | Component | What it generates |
| Test CI | GitHub Actions workflow that runs pytest across a Python version matrix |
| Lint CI | GitHub Actions workflow for ruff, type checking, and complexity analysis |
| Dependabot |
|
| Tests directory |
|
| Gitignore | Python-specific |
| PyPI publish | GitHub Actions workflow for OIDC-based publishing to PyPI on release |
| Docker | Multi-stage |
| Devcontainer |
|
| Codecov |
|
| Documentation | Sphinx or MkDocs scaffolding ( |
| tox |
|
| README |
|
| pyenv |
|
# Interactive mode (prompts for missing values)
pypreset augment ./my-project
# Auto-detect everything, no prompts
pypreset augment --auto
# Generate only specific components
pypreset augment --test-workflow --lint-workflow --gitignore
# Add Docker and devcontainer
pypreset augment --dockerfile --devcontainer
# Add PyPI publish workflow
pypreset augment --pypi-publish
# Add documentation scaffolding
pypreset augment --docs mkdocs
# Generate a README from your project metadata
pypreset augment --readme
# Overwrite existing files
pypreset augment --forceworkflow -- Local workflow verification
Verify GitHub Actions workflows locally using act. The proxy auto-detects whether act is installed, can install it on supported systems, and surfaces all act output directly.
# Verify all workflows (dry-run, no containers)
pypreset workflow verify
# Verify a specific workflow file
pypreset workflow verify --workflow .github/workflows/ci.yaml
# Verify a specific job
pypreset workflow verify --job lint
# Full run (executes in containers, requires Docker)
pypreset workflow verify --full-run
# Auto-install act if missing
pypreset workflow verify --auto-install
# Pass extra flags to act
pypreset workflow verify --flag="--secret=GITHUB_TOKEN=xxx"
# Check if act is installed
pypreset workflow check-act
# Install act automatically
pypreset workflow install-actSupported auto-install targets: Arch Linux (pacman), Ubuntu/Debian (apt), Fedora (dnf), macOS/Linux with Homebrew. Other systems get a link to the act installation page.
version -- Release management
pypreset version release --bump patch # 0.1.0 -> 0.1.1
pypreset version release --bump minor # 0.1.0 -> 0.2.0
pypreset version release --bump major # 0.1.0 -> 1.0.0
pypreset version release-version 2.0.0 # Explicit version
pypreset version rerun <ver> # Re-tag and push an existing version
pypreset version rerelease <ver> # Delete and recreate a GitHub releaseRequires the gh CLI to be installed and authenticated.
metadata -- PyPI metadata management
pypreset metadata show # Display current metadata
pypreset metadata set --description "My cool package" # Set description
pypreset metadata set --github-owner myuser # Auto-generate URLs
pypreset metadata set --license MIT --keyword python # Set license and keywords
pypreset metadata check # Check publish-readinessbadges -- Generate badge markdown
Reads pyproject.toml to detect your project name, repository URL, and license, then prints badge markdown you can paste into your README.
pypreset badges # Badges for current directory
pypreset badges ./my-project # Badges for a specific projectOther commands
pypreset list-presets # List all available presets
pypreset show-preset <name> # Show full preset details
pypreset validate [path] # Validate project structure
pypreset analyze [path] # Detect and display project tooling
pypreset config show # Show current user defaults
pypreset config init # Create default config file
pypreset config set <key> <value> # Set a config valuePresets
Built-in presets: empty-package, cli-tool, data-science, discord-bot.
Presets are YAML files that define metadata, dependencies, directory structure, testing, formatting, and more. They support single inheritance via the base: field. Presets can override the README template by setting metadata.readme_template to a custom .j2 filename.
Custom presets
Place custom preset files in ~/.config/pypreset/presets/ or pass a file directly:
pypreset create my-project --config ./my-preset.yamlUser presets take precedence over built-in presets with the same name.
User Configuration
Persistent defaults are stored at ~/.config/pypreset/config.yaml and applied as the lowest-priority layer (presets and CLI flags override them).
pypreset config init # Create with defaults
pypreset config set layout flat # Set default layout
pypreset config set type_checker ty # Set default type checker
pypreset config show # View current configMCP Server
pypreset is published to the MCP Registry as io.github.KaiErikNiermann/pypreset.
Install via the registry (recommended):
# Claude Code
claude mcp add pypreset -- uvx --from "pypreset[mcp]" pypreset-mcp
# Or add manually to ~/.claude/settings.json{
"mcpServers": {
"pypreset": {
"command": "uvx",
"args": ["--from", "pypreset[mcp]", "pypreset-mcp"]
}
}
}Or install locally:
pip install pypreset[mcp]{
"mcpServers": {
"pypreset": {
"command": "pypreset-mcp",
"args": []
}
}
}Available tools:
Tool | Description |
| Create a new project from a preset with optional overrides |
| Add CI workflows, tests, Docker, docs, and more to an existing project |
| Check structural correctness of a project directory |
| Verify GitHub Actions workflows locally using act |
| List all available presets with names and descriptions |
| Show the full YAML configuration of a specific preset |
| Read current user-level defaults |
| Update user-level defaults |
| Set or update PyPI metadata in |
| Generate badge markdown links from project metadata |
Resources: preset://list, config://user, template://list
Prompts: create-project, augment-project
Development
All tasks use the Justfile:
just install # Install dependencies
just test # Run tests
just test-cov # Tests with coverage
just lint # Ruff check
just format # Ruff format
just typecheck # Pyright
just radon # Cyclomatic complexity check
just check # lint + typecheck + radon + test
just all # format + lint-fix + typecheck + radon + testSee CONTRIBUTING.md for development setup and guidelines.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/KaiErikNiermann/pypreset'
If you have feedback or need assistance with the MCP directory API, please join our Discord server