Skip to content

PowerShell.MCP v1.7.6 - -Skip/-First Compatibility for All Line-Range Cmdlets

Choose a tag to compare

@yotsuda yotsuda released this 05 Apr 14:22
· 14 commits to main since this release
a46fb98

-Skip/-First Compatibility for All Line-Range Cmdlets

AI agents frequently attempt -Skip/-First (the standard PowerShell paging idiom) before discovering that PowerShell.MCP uses -LineRange. This release adds -Skip/-First as compatibility parameters across all four line-range cmdlets, so the first attempt just works.

Closes #41 — thanks @doraemonkeys for the suggestion!

What's New

-Skip/-First Compatibility (Show-TextFiles, Remove-LinesFromFile, Update-LinesInFile, Update-MatchInFile)

All cmdlets that accept -LineRange now also accept -Skip and -First. The parameters are mapped to -LineRange internally:

# These are equivalent:
Show-TextFiles file.txt -Skip 200 -First 50
Show-TextFiles file.txt -LineRange 201-250

# -First alone:
Show-TextFiles file.txt -First 20
Show-TextFiles file.txt -LineRange 1-20

# -Skip alone (to end of file):
Show-TextFiles file.txt -Skip 100
Show-TextFiles file.txt -LineRange 101,-1

# Works with all four cmdlets:
Remove-LinesFromFile file.txt -Skip 10 -First 5
Update-LinesInFile file.txt -Skip 3 -First 2 -Content "A", "B"
Update-MatchInFile file.txt -OldText "foo" -Replacement "bar" -First 20

Design decisions:

  • -LineRange remains the canonical interface
  • -Skip/-First cannot be mixed with -LineRange

What's Changed Since v1.7.5

  • -Skip/-First compatibility parameters added to Show-TextFiles, Remove-LinesFromFile, Update-LinesInFile, Update-MatchInFile
  • PlatyPS help updated for new parameters

Installation & Upgrade

Windows

# New installation
Install-PSResource PowerShell.MCP

# Upgrade existing
Update-PSResource PowerShell.MCP

Linux / macOS

# Install
Install-PSResource PowerShell.MCP

# Set execute permission
chmod +x (Get-MCPProxyPath)

Update MCP Configuration

For Claude Code:

Register-PwshToClaudeCode

For Claude Desktop:

Register-PwshToClaudeDesktop

For other MCP clients: Run Get-MCPProxyPath -Escape to get the JSON-escaped executable path, then add it to your client's configuration file manually.

Restart your MCP client after updating.


Full Documentation: https://github.com/yotsuda/PowerShell.MCP

Questions? GitHub Discussions | Report Issues: GitHub Issues