A self-hosted Model Context Protocol (MCP) server that provides a sandboxed PowerShell environment for AI assistants.
# Run the server (it will be available at http://localhost:8080)
docker run -d -p 8080:8080 --name mcp-server nopenix/powershell-mcp-server:latest
That's it! Your server is now running and ready to connect to AI tools.
This server provides a sandboxed PowerShell environment that AI assistants can use to:
Important Note: This runs in a containerized, isolated environment - it does NOT have direct access to your host system's files, processes, or resources. It's perfect for learning PowerShell, testing commands safely, or running PowerShell-specific tasks in a controlled environment.
This server is built on:
mcr.microsoft.com/powershell:latest)The container includes:
/openapi.yaml for API documentationhttp://localhost:8080http://localhost:8080Now you can ask OpenWebUI to run PowerShell commands!
http://localhost:8080http://localhost:8080http://localhost:8080Once connected, you can ask your AI assistant to run PowerShell commands such as:
"Show me how to list files in PowerShell"
"Generate a random password using PowerShell"
"How do I work with JSON in PowerShell?"
"Show me PowerShell examples for string manipulation"
"What are the built-in PowerShell variables?"
"Help me understand PowerShell pipelines"
"What PowerShell commands are available for working with dates?"
Since this is a sandboxed environment, it's safe for experimentation and learning!
โ Sandboxed Environment: Runs in an isolated container, protecting your host system โ Safe Experimentation: Perfect for learning PowerShell without risk โ Controlled Access: No direct access to host files or processes โ Clear Logging: All commands executed are logged for visibility
The server provides comprehensive logging:
To view logs:
# View container logs
docker logs mcp-server
Sensitive information in logs is automatically masked.
You can test that your server is working with simple curl commands:
# Test basic connectivity
curl http://localhost:8080/test
# Check available capabilities
curl http://localhost:8080/capabilities
# List available tools
curl http://localhost:8080/tools/list
# View OpenAPI specification
curl http://localhost:8080/openapi.yaml
# Run a simple command
curl -X POST http://localhost:8080/tools/runCommand \
-H "Content-Type: application/json" \
-d '{"command":"Get-Date"}'
If you prefer docker-compose:
# Download the compose file
curl -O https://raw.githubusercontent.com/NopeNix/PowerShell-MCP-Server/main/docker-compose.yml
# Start the service
docker-compose up -d
To view logs with docker-compose:
docker-compose logs -f
Content type
Image
Digest
sha256:0f8fc868eโฆ
Size
135.4 MB
Last updated
8 months ago
docker pull nopenix/powershell-mcp-server