1. Conduid
  2. Developer Tools
  3. MCPServerPS
MCP server · Developer Tools

MCPServerPS

Implement an MCP server as PowerShell module

Unclaimed devtools
34Low

Scored 7 months ago · breakdown

About MCPServerPS

MCPServerPS is an MCP server published by daxian-dbw in the Developer Tools category: implement an MCP server as PowerShell module.

The repository has 13 stars and 7 forks, with the last commit a month ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/daxian-dbw/MCPServerPS

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about MCPServerPS

Powered by Claude · Grounded in docs

I know everything about MCPServerPS. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

MCPServerPS

This project creates a PowerShell module that serves as a Model Context Protocol (MCP) server. The module exposes the Start-MyMCP cmdlet, which starts the MCP server and dynamically exposes tools based on how it is invoked.

MCP server as a PowerShell Module

Benefits of shipping an MCP server as a PowerShell module:

  • Small size: 3.35 MB. Only the .NET MCP SDK assemblies are required.
  • Availability: easy to distribute and install via PowerShell Gallery across platforms.
  • Flexible: expose C# tools, .ps1 script tools, or module function tools.
  • For an MCP server that needs PowerShell features, the runtime is naturally available (runs in pwsh.exe), so no need to ship PowerShell SDK assemblies.

Building the Module

To build the project, run:

dotnet publish .\MCPServerPS.csproj

The published module will be available at .\out\MCPServerPS.

After deploying the module to your PowerShell module path, you can start the MCP server using the Start-MyMCP cmdlet.

Start-MyMCP Cmdlet Parameter Sets

The Start-MyMCP cmdlet supports three parameter sets:

Start-MyMCP [<CommonParameters>]
Start-MyMCP -ScriptRoot <string> [<CommonParameters>]
Start-MyMCP -Module <string> [<CommonParameters>]
  • Default: Start-MyMCP exposes all MCP tools defined in the C# code of this assembly.
  • ScriptRoot: Start-MyMCP -ScriptRoot <path-to-directory> exposes each .ps1 script file in the specified directory as an MCP tool.
  • Module: Start-MyMCP -Module <module-name-or-path-to-module> exposes each function within the specified module as an MCP tool.

Examples of script tools and module function tools can be found in the ./scripts folder.

Both script tools and module function tools use comment-based help to define the description and parameters for each tool. This ensures that tool metadata is discoverable and user-friendly.

Runspace Behavior

  • Each script tool runs in its own dedicated Runspace, so they are isolated from each other.
  • Module function tools share the same Runspace for the module, allowing changes to module state made by one function tool to be visible to others. This is because module functions are considered related and may need to share state.

Using MCPServerPS in VSCode

1. Exposing C# MCP Tools

{
    "servers": {
        "MCPServerPS": {
            "type": "stdio",
            "command": "pwsh",
            "args": [
                "-noprofile",
                "-c",
                "MCPServerPS\\Start-MyMCP"
            ]
        }
    },
    "inputs": []
}

2. Exposing PowerShell Script Tools

Assume the local repo root is at E:\repos\MCPServerPS.

{
    "servers": {
        "MCPServerPS": {
            "type": "stdio",
            "command": "pwsh",
            "args": [
                "-noprofile",
                "-c",
                "MCPServerPS\\Start-MyMCP -ScriptRoot E:\\repos\\MCPServerPS\\scripts"
            ]
        }
    },
    "inputs": []
}

3. Exposing Module Function Tools

Assume the local repo root is at E:\repos\MCPServerPS.

{
    "servers": {
        "MCPServerPS": {
            "type": "stdio",
            "command": "pwsh",
            "args": [
                "-noprofile",
                "-c",
                "MCPServerPS\\Start-MyMCP -Module E:\\repos\\MCPServerPS\\scripts\\tools.psm1"
            ]
        }
    },
    "inputs": []
}

Install from PowerShell Gallery

The MCPServerPS module requires PowerShell 7.4 or higher. To install it, run the following command:

Install-PSResource -Name MCPServerPS -Repository PSGallery

Install from GitHub Release

Download the latest release zip using the gh CLI, then extract it to your PowerShell module path.

# Download the latest release zip
gh release download --repo daxian-dbw/MCPServerPS --pattern "MCPServerPS-*.zip" --output MCPServerPS.zip --clobber

# Extract to your PowerShell module path (adjust destination as needed)
Expand-Archive -Path MCPServerPS.zip -DestinationPath "$HOME\Documents\PowerShell\Modules" -Force

After extracting, verify the module is available:

Get-Module -ListAvailable MCPServerPS

Installing latest version from main

Prerequisites

  1. The PSResourceGet module is installed.
  2. A SecretVault is created called default.

Instructions

Setup a PAT to read the feed.

Create a Personal Access Token (Classic) with package:read permission. At the time of writing, this is the only type of token that allows these premissions.

## The command should prompt for the secret.
Set-Secret -Name GitHubPackageRead

Register the Repository. This assumes you called you vault default as described in the prerequisites.

Register-PSResourceRepository `
    -name daxian-dbw `
    -uri https://nuget.pkg.github.com/daxian-dbw/index.json `
    -ApiVersion V3 `
    -CredentialInfo @{ VaultName='default'; SecretName='GitHubPackageRead' } `
    -Trusted

Then, you can install the module:

Install-PSResource -Name MCPServerPS -Repository daxian-dbw

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About MCPServerPS

How do I install MCPServerPS?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is MCPServerPS safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is MCPServerPS still maintained?

Yes — the last commit was a month ago. The repository has 13 stars and 7 forks.