Releases: yotsuda/PowerShell.MCP
PowerShell.MCP v1.4.1 - Syntax Highlighting & Stability Improvements
PowerShell.MCP v1.4.1 - Syntax Highlighting & Startup Banner
This release improves syntax highlighting accuracy, prevents conflicts from multiple server instances, and adds customizable startup banners.
🎉 What's New
Startup Banner
The start_powershell_console tool now accepts an optional banner parameter to display a customizable message when the PowerShell console launches. AI assistants can use this to add personality with greetings, jokes, or fun facts!
Single Instance Enforcement
PowerShell.MCP now detects if another server is already running and fails module import with a clear error message. This prevents confusion from orphaned sessions or duplicate servers.
Detection uses a connection test to the named pipe/socket, which works reliably on all platforms.
📊 What's Changed Since v1.4.0
New Features
- Startup banner:
start_powershell_consolenow supports abannerparameter for custom startup messages (displayed in green)
Improvements
- Comment token coloring: Comments are now properly colored (DarkGreen by default)
- PSReadLine color matching: Default colors updated to match PSReadLine defaults
- Keyword: Yellow → Green
- Member: White → Gray
- Default: White → Gray
Internal
- Build script now supports
-Targetparameter for selective builds (Dll, WinX64, LinuxX64, OsxX64, OsxArm64)
📄 Installation & Upgrade
Windows
# New installation
Install-Module PowerShell.MCP -Force
# Upgrade existing
Update-Module PowerShell.MCPLinux / macOS
# Install
pwsh -Command "Install-Module PowerShell.MCP -Scope CurrentUser -Force"
# Set execute permission
chmod +x $(pwsh -Command "Import-Module PowerShell.MCP; Get-MCPProxyPath")Update MCP Configuration
- Get new proxy path:
# Windows (escaped for JSON)
Get-MCPProxyPath -Escape
# Linux / macOS
Get-MCPProxyPath- Update claude_desktop_config.json with the path from step 1:
{
"mcpServers": {
"PowerShell": {
"command": "C:\\Users\\YourName\\Documents\\PowerShell\\Modules\\PowerShell.MCP\\1.4.1\\bin\\win-x64\\PowerShell.MCP.Proxy.exe"
}
}
}- Restart Claude Desktop (or Claude Code)
📖 Full Guide: https://github.com/yotsuda/PowerShell.MCP#quick-start
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions | Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.
PowerShell.MCP v1.4.0 - Cross-Platform Support: Linux & macOS
Cross-Platform Support: Linux & macOS
This release adds Linux and macOS support, enabling PowerShell.MCP to run on all major platforms.
🎉 Cross-Platform Support
Now available on Linux and macOS
| Platform | Architecture | Status |
|---|---|---|
| Windows | x64 | ✅ Supported |
| Linux | x64 | ✅ New |
| macOS | x64 (Intel) | ✅ New |
| macOS | arm64 (Apple Silicon) | ✅ New |
📊 What's Changed Since v1.3.9
New Features
- Linux support: Works with gnome-terminal, konsole, xfce4-terminal, xterm, lxterminal, mate-terminal, terminator, tilix, alacritty, kitty
- macOS support: Works with Terminal.app on both Intel and Apple Silicon Macs
- Login shell integration: Uses
$SHELL -l -cto properly inherit user environment (PATH, etc.) - Home directory start: pwsh console starts in user's home directory with
-WorkingDirectory ~ - Multiple sessions: Removed Named Pipe existence check to allow multiple PowerShell.MCP sessions
Improvements
- Version mismatch error now shows
Get-MCPProxyPath -Escapetip on Windows - Version mismatch error now shows
Get-MCPProxyPathtip on Linux/macOS - Added GitHub Actions CI/CD for cross-platform testing
- PSReadLine is automatically removed on Linux/macOS (not supported)
Bug Fixes
- Fixed nullable reference warnings in TextFileUtility and ShowTextFileCmdlet
- Fixed Update-MatchInFile help to show
-OldTextinstead of-Contains
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions | Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.
PowerShell.MCP v1.3.9 - Breaking Change: -Contains to -OldText & BOM Preservation Fix
Breaking Change: -Contains to -OldText & BOM Preservation Fix
This release includes a breaking parameter rename in Update-MatchInFile, BOM preservation fix for UTF-8 files, tail line removal support, and significant code quality improvements.
⚠️ Breaking Change
-Contains → -OldText in Update-MatchInFile
The -Contains parameter has been renamed to -OldText for clarity:
# Before (v1.3.8)
Update-MatchInFile file.txt -Contains "old" -Replacement "new"
# After (v1.3.9)
Update-MatchInFile file.txt -OldText "old" -Replacement "new"📊 What's Changed Since v1.3.8
Bug Fixes
- BOM preservation: UTF-8 files with BOM now retain BOM when entire content is replaced
New Features
- Tail line removal:
Remove-LinesFromFilesupports negativeLineRange(e.g.,-LineRange -10removes last 10 lines)
Improvements
- Updated tool descriptions with
-WhatIfrecommendations and tail removal syntax - Renamed
CreateInteractiveMaptoShowInteractiveMapwith localized display text
Code Quality
- Extracted
AnsiColorsclass for centralized ANSI color code management - Extracted
ContentAccumulatingCmdletBasefor shared pipeline input handling - Added
IsWhatIfModehelper method toTextFileCmdletBase - Translated all Japanese comments to English
- Removed unused
NotificationServiceand debug comments
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions | Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.
PowerShell.MCP v1.3.8 - Visual -WhatIf Preview for Remove-LinesFromFile & Safety Improvements
Visual -WhatIf Preview for Remove-LinesFromFile & Safety Improvements
This release adds visual diff preview to Remove-LinesFromFile, safer deletion handling for Update-LinesInFile, newline validation across all pattern-matching cmdlets, and performance improvements to Update-MatchInFile.
✨ What's New
🔍 Visual -WhatIf Preview for Remove-LinesFromFile
Remove-LinesFromFile -WhatIf now displays a detailed preview showing exactly which lines will be deleted:
- Red highlighting for lines being removed
- Yellow background for matched pattern/text within deleted lines
- Surrounding context lines for clarity
- No file modification until you confirm
# Preview which lines will be deleted
Remove-LinesFromFile log.txt -Contains "ERROR" -WhatIf
# Output shows:
# 1- Previous line
# 2: Error message here ← Red with "ERROR" highlighted in yellow
# 3- Next line⚡ Performance: Update-MatchInFile Single-Pass Processing
Update-MatchInFile has been refactored from 2-pass to 1-pass processing, reading the file only once instead of twice. This improves performance especially for large files.
🛡️ Safer Deletion Handling for Update-LinesInFile
Update-LinesInFile now requires -Content parameter when -LineRange is specified:
# Explicit deletion (works as before)
Update-LinesInFile file.txt -LineRange 5,10 -Content @()
# Omitting -Content now throws an error (previously would silently delete)
Update-LinesInFile file.txt -LineRange 5,10 # Error!This prevents accidental line deletion when -Content is forgotten.
🚫 Newline Validation for Pattern Parameters
All cmdlets with -Pattern or -Contains parameters now reject newline characters:
# These now throw errors immediately (instead of silently failing to match)
Show-TextFile file.txt -Pattern "line1`nline2" # Error!
Update-MatchInFile file.txt -Contains "a`nb" -Replacement "x" # Error!
Remove-LinesFromFile file.txt -Pattern "multi`nline" # Error!📊 What's Changed Since v1.3.7
New Features
Visual -WhatIf Preview:
Remove-LinesFromFile -WhatIfshows lines to be deleted in red- Pattern/Contains matches highlighted with yellow background
- Context lines displayed for clarity
Pipeline Input Support:
Add-LinesToFile -Contentnow accepts pipeline inputUpdate-LinesInFile -Contentnow accepts pipeline input
Improvements
Performance:
Update-MatchInFilerefactored from 2-pass to 1-pass processing (reads file once instead of twice)
Display:
Update-MatchInFilenormal execution now shows only replacement text (green), while-WhatIfshows both before (red) and after (green)
Safety:
Update-LinesInFilenow requires-Contentwhen-LineRangeis specified- Newline validation added to
Show-TextFile,Update-MatchInFile,Remove-LinesFromFile
Bug Fixes:
Add-LinesToFilenow displays actual insertion line number in summary message
Code Quality
- Reduced code duplication with shared pipeline input handling
- Lazy initialization for content accumulation
🔧 Technical Details
Newline Validation
| Cmdlet | -Pattern | -Contains |
|---|---|---|
| Show-TextFile | ✅ Error | ✅ Error |
| Update-MatchInFile | ✅ Error | ✅ Error |
| Remove-LinesFromFile | ✅ Error | ✅ Error |
Update-LinesInFile Content Behavior
| Specification | Intent | Behavior |
|---|---|---|
-Content omitted |
Ambiguous | Error (safe default) |
-Content @() |
Explicit delete | Delete lines |
-Content "text" |
Replace | Replace with text |
-Content "" |
Replace with empty | Single empty line |
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions
Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.
PowerShell.MCP v1.3.7 - Enhanced Text File Cmdlets with Visual Diff Preview
Enhanced Text File Cmdlets with Visual Diff Preview
This release brings significant improvements to text file operations, featuring a new visual diff preview for -WhatIf, tail display support with negative line ranges, and consistent ANSI color output across all cmdlets.
✨ What's New
🔍 Visual Diff Preview with -WhatIf
Update-MatchInFile -WhatIf now displays a detailed line-by-line diff preview showing exactly what will change:
- Red highlighting for text being removed
- Green highlighting for text being added
- Surrounding context lines for clarity
- No file modification until you confirm
# Preview changes before applying
Update-MatchInFile config.json -Contains "localhost" -Replacement "production" -WhatIf📜 Tail Display with Negative LineRange
Show-TextFile now supports negative line numbers to display the last N lines of a file:
# Show last 10 lines
Show-TextFile log.txt -LineRange -10
# Equivalent to above
Show-TextFile log.txt -LineRange -10,-1🎨 Consistent ANSI Color Output
All text file cmdlets now use a unified color scheme:
- Bold white headers (
==> filename <==) - Cyan summary messages
- Yellow for search match highlights
- Green for additions
- Red for deletions
- Yellow for WhatIf messages
📊 What's Changed Since v1.3.6
New Features
Visual Diff Preview:
Update-MatchInFile -WhatIfshows detailed before/after comparison-Confirmwith "No" now exits silently without output
Tail Display:
- Added
RotateBuffer<T>class for efficient tail operations Show-TextFile -LineRange -Ndisplays last N lines- Negative end values (e.g.,
100,-1) mean "to end of file"
Color Improvements:
- Standardized ANSI color scheme across all cmdlets
- Added bold headers to
Update-LinesInFileoutput - Yellow highlighting for pattern matches in context lines
Improvements
- Prompt display after command execution: The PowerShell prompt now displays immediately after each command completes, making it clearer when the console is ready for the next input
Bug Fixes
- Fixed
Show-TextFilegapLine handling to prevent duplicate output - Fixed 1-line gap display between match groups
Code Quality
- Removed DEBUG logs from Proxy services (cleaner stderr output)
- Removed unused
Test-TextFileContainscmdlet - Refactored cmdlets to use
RotateBufferfor consistent tail handling
🔧 Technical Details
RotateBuffer
A new fixed-capacity circular buffer for efficient "last N items" collection:
var buffer = new RotateBuffer<string>(10); // Keep last 10 items
foreach (var line in File.ReadLines(path))
buffer.Add(line);
// buffer now contains last 10 linesLineRange Parameter Enhancements
| Input | Meaning |
|---|---|
5 |
Line 5 only |
5,10 |
Lines 5 to 10 |
5,-1 or 5,0 |
Line 5 to end of file |
-10 |
Last 10 lines |
-10,-1 |
Last 10 lines (explicit) |
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions
Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.
PowerShell.MCP v1.3.6 - Enhanced CLI Tool Color Support
Enhanced CLI Tool Color Support
This release extends automatic color output support to additional CLI tools, improving the visual experience when working with modern development tools like GitHub CLI, .NET tools, and 24-bit color terminals.
✨ What's New
🌈 Extended Color Output Support
Added automatic color output for additional CLI tools commonly used in development workflows:
- GitHub CLI (gh): Now displays colored output via
CLICOLOR_FORCE - .NET Tools: Console applications now support ANSI color redirection
- 24-bit Color Terminals: Modern terminals with truecolor support are automatically detected via
COLORTERM
These additions complement existing color support for Git, npm, yarn, cargo, and pytest, providing a consistent colorful experience across your entire toolchain.
📊 What's Changed Since v1.3.5
Core Enhancements
Environment Variables:
- Added
CLICOLOR_FORCE='1'for GitHub CLI and standard CLI tools - Added
COLORTERM='truecolor'for 24-bit color terminal support - Added
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION='1'for .NET tools
Behavior:
- All color environment variables are set conditionally (only if not already defined)
- Respects user's existing color configuration
- Maintains backward compatibility with v1.3.5
🔧 Technical Details: Color Environment Variables
PowerShell.MCP automatically configures the following environment variables to enable ANSI color output in MCP environments where stdout is redirected (not a TTY):
| Environment Variable | Value | Target Tools | Version Added | Description |
|---|---|---|---|---|
GIT_CONFIG_PARAMETERS |
'color.ui=always' |
Git | v1.3.5 | Forces Git to output colors even when stdout is not a terminal. Preserves existing user configurations. |
FORCE_COLOR |
1 |
Node.js tools (yarn, chalk, etc.) | v1.3.5 | Standard variable for Node.js ecosystem to force color output. |
NPM_CONFIG_COLOR |
always |
npm | v1.3.5 | npm-specific configuration to always show colors. |
CARGO_TERM_COLOR |
always |
Rust cargo | v1.3.5 | Enables colored output for Rust's package manager. |
PY_COLORS |
1 |
pytest, Python tools | v1.3.5 | Standard Python variable to enable ANSI colors. |
CLICOLOR_FORCE |
1 |
GitHub CLI (gh), standard CLI tools | v1.3.6 | Industry-standard variable for forcing color output in POSIX-style tools. |
COLORTERM |
truecolor |
Modern terminals | v1.3.6 | Indicates 24-bit color (16 million colors) support to applications. |
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION |
1 |
.NET console apps | v1.3.6 | Enables ANSI color codes in .NET applications when output is redirected. |
Configuration Behavior
- Non-Destructive: All variables are set conditionally using
if (-not $env:VARIABLE), respecting existing user configurations. - Persistent: Environment variables remain active throughout the PowerShell session.
- Automatic: Configuration happens transparently when the MCP server starts—no user action required.
Why These Variables Are Needed
When PowerShell captures output from external CLI tools (e.g., via pipes or variable assignment), those tools detect that their output is being redirected rather than displayed directly to a terminal. Most CLI tools disable ANSI color codes in this "non-interactive" mode to avoid cluttering logs with escape sequences. These environment variables override that detection, forcing tools to output color codes even when their stdout is redirected, ensuring colorful output is preserved for better readability and user experience.
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions
Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.
PowerShell.MCP v1.3.5 - Enhanced Developer Experience & System Insights
Enhanced Developer Experience & System Insights
This release focuses on improving developer experience with syntax highlighting, automatic color output, and comprehensive system information for better context awareness.
✨ What's New
🎨 Syntax Highlighting for Commands
Commands executed in the console now display with PSReadLine-style syntax highlighting, making it easier to read and understand the executed PowerShell code.
🌈 Automatic Color Output for CLI Tools
Popular development tools (Git, npm, yarn, cargo, pytest) now automatically enable ANSI color output, providing richer visual feedback while respecting your existing configurations.
📊 Comprehensive System Information
The get_current_location tool now returns detailed system context (OS version, PowerShell version, hostname, timezone, execution policy) to help Claude better understand your environment.
📝 Improved Create Work Procedure Built-in Prompts
Enhanced Create Work Procedure prompt with better markdown table formatting and clearer examples for VS Code preview compatibility.
📊 What's Changed Since v1.3.4
Core Enhancements
System Information:
- Added comprehensive system context (OS, PowerShell version, hostname, user, privileges, culture, timezone, execution policy)
- Renamed machine_name to host_name using System.Net.Dns API
- Restructured JSON output with system and available_drives sections
Visual Improvements:
- Syntax highlighting for executed commands with token-based coloring
- Automatic ANSI color output for Git, npm, yarn, cargo, pytest
Prompt Templates:
- Improved markdown table formatting in Create Work Procedure prompt
- Simplified column naming (effort_remaining → effort)
- Added clear table format examples
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions
Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.
PowerShell.MCP v1.3.4 - Prompt Consolidation & Enhanced Workflow
Prompt Consolidation & Enhanced Workflow
This release focuses on consolidating learning prompts and streamlining task execution workflows for better flexibility and usability.
✨ What's New
🎯 Unified Two Learning Built-in Prompts
Consolidated Learn Programming Language and Learn CLI Tools into a single, more powerful Learn Programming & CLI prompt for more flexible parameter design and better learning experience.
🗑️ Removed Two Built-in Prompts
Removed System Administration and Software Development built-in prompts to encourage use of Create Work Procedure and Execute Work Procedure instead for better results.
🔧 Improved Three Built-in Prompts
- Create Work Procedure and Execute Work Procedure - Simplified with clearer status workflow
- Analyze Content - Enhanced with chart type selection
- HTML Generation Guidelines for AI - Clarified CSS color rules and session persistence
📊 What's Changed Since v1.3.3
Prompt Changes
Consolidated:
- Learn Programming Language + Learn CLI Tools → Learn Programming & CLI
Removed:
- System Administration
- Software Development
Improved:
- Create Work Procedure and Execute Work Procedure
- Analyze Content
- HTML Generation Guidelines for AI
Other Changes
- Standardized prompt descriptions across all 19 supported languages (822 lines removed from .resx files)
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions
Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.
PowerShell.MCP v1.3.3 - Modular Prompts
Modular Prompts
This release focuses on built-in prompt modularity for better usefulness and maintainability.
✨ What's New
🧩 Modular Prompt Architecture
HTML generation guidelines are now available as a separate, reusable built-in prompt.
Benefits:
- ✅ Better separation of concerns
- ✅ Improved maintainability and reusability
- ✅ Users can combine prompts as needed
New Prompt:
- HTML Generation Guidelines for AI - Technical guidelines for generating high-quality HTML reports with proper formatting, charts, and styling
The AnalyzeContent prompt now suggests using this companion prompt for visual HTML reports.
📊 What's Changed Since v1.3.2
- Separated HTML generation guidelines from Analyze Content into standalone prompt
- Improved prompt cross-referencing with localized names
- Enhanced code maintainability and modularity
No Breaking Changes - All v1.3.2 scripts work unchanged.
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions
Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.
PowerShell.MCP v1.3.2 - Stability Fix + PowerShell.Map v1.0.1 Support
Stability Fix + PowerShell.Map v1.0.1 Support
This release prioritizes engine stability by reverting the v1.3.1 stream capture feature and adds PowerShell.Map v1.0.1 support with 3D maps and location descriptions.
✨ What's New
🛡️ Engine Stability Restored
v1.3.1's complete stream capture (including Verbose and Debug) caused instability in production. This release reverts to the proven v1.3.0 implementation.
Trade-off:
- ✅ Significantly improved stability and reliability
⚠️ Verbose and Debug streams no longer automatically captured- 💡 Users can manually share Verbose/Debug output when needed
Four critical streams remain captured: Success, Error, Warning, Information.
🗺️ PowerShell.Map v1.0.1 Support
Updated Create Interactive Map built-in prompt for PowerShell.Map v1.0.1 features:
- 3D Map Display - Create immersive 3D interactive maps
- Location Descriptions - Detailed descriptions for each location (visible on hover/click)
- Improved Workflow - Console starts first, then suggests module updates
📊 What's Changed Since v1.3.1
- Reverted stream capture to v1.3.0 implementation for stability
- PowerShell.Map v1.0.1 support with 3D maps and location descriptions
- Improved module update workflow
No Breaking Changes - All v1.3.1 scripts work unchanged.
Full Documentation: https://github.com/yotsuda/PowerShell.MCP
Questions? GitHub Discussions
Report Issues: GitHub Issues
⚠ Security Notice: Provides complete PowerShell access. Use in trusted environments only.