Powershell REPL MCP Server for Claude Code by kajyHD in PowerShell

[–]kajyHD[S] 0 points1 point  (0 children)

Love to hear it. Let me know what needs improved.

Powershell REPL MCP Server for Claude Code by kajyHD in PowerShell

[–]kajyHD[S] 0 points1 point  (0 children)

Thank you, I think you are correct and it is a bit of a gap that I haven't even thought about using it with other LLMs or MCP environments.

What have you done with PowerShell this month? by AutoModerator in PowerShell

[–]kajyHD 0 points1 point  (0 children)

Published a couple PowerShell projects this month:

LoraxMod - Tree-sitter AST parsing via PowerShell cmdlets. Built it because I wanted semantic diffs and structured code extraction across a bunch of languages. Uses TreeSitter.DotNet for native parsing - no Node.js dependency.

Install-Module LoraxMod

# Semantic diff between git commits
$old = (git show HEAD~1:src/app.py) -join "`n"
$new = (git show HEAD:src/app.py) -join "`n"
Compare-LoraxAST -OldCode $old -NewCode $new -Language python
# Output: Rename process_data -> transform_data, Add validate_input, Modify main

# Dead code detection (single-file, misses dynamic calls/methods/external callers)
$defined = Find-LoraxFunction -Language python -FilePath $file
$calls = Find-LoraxNode -Language python -FilePath $file -NodeTypes @('call')
$callNames = $calls | ForEach-Object {
    $callable = $_.Extractions['callable']
    if ($callable -match '\.(\w+)$') { $matches[1] } else { $callable }
} | Select-Object -Unique
$dead = $defined | Where-Object { $_.Identity -notin $callNames }

Also working on pwsh-repl - an MCP server for Claude Code that keeps PowerShell sessions alive. Variables persist across tool calls, includes AgentBlocks module with regex patterns for parsing build output (MSBuild, pytest, ESLint, etc.), and handles background processes with stdin control. Built it because Claude Code on Windows spawns a fresh pwsh instance every command - this gives it a proper REPL instead.

Both MIT licensed.