Transform your PowerShell scripts into intelligent, AI-driven services that respond to natural language. PowerShell Model Context Protocol (PSMCP) bridges the gap between your code and large language models, enabling seamless AI-human-code collaboration without complex configuration.
No YAML, no friction. Just prompts, tools, and instant execution. It's not automation. It's collaboration.
🔧 What you'll see:
☑️Using New-MCP to scaffold a working AI server
☑️Integration with GitHub Copilot in Agent Mode
☑️Live demo: Add a PowerShell function, restart the server, and the AI just knows
This isn’t just code—it’s a conversation.
Install-Module PSMCP
New-MCP d:\temp\testMCP
code-insiders d:\temp\testMCP
To use PSMCP effectively, you'll need VS Code v1.99.3 or later. Here's how to install it:
- Visit the VS Code download page
- Download the appropriate version for your operating system
- Run the installer and follow the on-screen instructions
This guide walks you through setting up GitHub Copilot in Visual Studio Code. To use Copilot in VS Code, you need to have access to GitHub Copilot with your GitHub account.
Start by creating a new MCP server with a simple command. This scaffolds the necessary files and sets the stage for dynamic AI interaction.
Once initialized, you're ready to configure your MCP tools—no YAML, no fuss.
The JSON file defines your available tools. In this example, we’re creating a simple Invoke-Addition function.
Clicking "Start" embeds the tool definition into the MCP config. Now it’s registered and ready to go.
With the tool registered, starting the server wires up everything under the hood.
The server is hot and listening. Now you can talk to your code like it’s a teammate.
Time to interact. Drop a natural language prompt and let the AI figure out which function to use.
Your intent is recognized—and the AI knows exactly what tool to invoke.
Copilot steps in, proposing to call your registered function based on your prompt.
Confirm to execute and let the AI orchestrate the rest.
Peek under the hood—see the actual arguments passed to your function.
Confirm to execute and let the AI orchestrate the rest.
Execution complete. The function ran with your inputs, and now you get the result.
This isn’t just code—it’s a conversation. One prompt, one response, and a world of automation opens up.
Edit the <yourMCPServerName.ps1> file adding your functions.
TIPS:
- Write Help/Comments for your functions that describes what the function does, example(s) and outputs. This will help your MCP Client discover the capabilities and use the functions how you intended.
- Make your Functions Global. (e.g. functionName Global:Get-myFunction {})
- At the bottom of your <yourMCPServerName.ps1> add each function comma seperated so that they will be availabile in your MCP Client (e.g. VSCode)
🟨 Conclusion This workflow redefines how we build and run tools. From scaffolding an MCP server to interacting with it using plain language, the line between prompt and program is disappearing.
No more brittle glue code. No more hand-rolling APIs. Just describe what you want, and your AI-enhanced PowerShell server takes it from there—registering, invoking, and summarizing functions on demand.
Welcome to the future of coding. It’s not just execution—it’s collaboration.
PSMCP allows you to start your MCP server project from predefined templates using the -template parameter with the New-MCP command. Templates provide a quick starting point with common configurations or specific functionalities.
To use a template, simply specify its name when creating your MCP project:
# Example using the 'youtube' template
New-MCP -Path d:\\mygit\\MyYouTubeMCP -template youtubeThis command will create a new MCP project in the specified path, using the youtube.template.ps1 file as the basis for your MCPServer.ps1.
Available templates include:
server: The default template, providing a basic server setup with anInvoke-Additionexample function.youtube: A template pre-configured for interacting with YouTube (requires thePSAImodule).
You can explore the available templates in the template/ directory of the PSMCP module installation.
Contributions are welcomed from the community! Whether you're fixing bugs, adding features, improving documentation, or sharing examples, your help makes PSMCP better.
- Fork the repository - Create your own copy of the project to work with
- Create a branch - Make your changes in a new branch
- Submit a pull request - Once you're happy with your changes, submit a PR for review
- Discuss and review - Collaborate with maintainers to refine your contribution
- Get merged - Once approved, your changes will become part of PSMCP
- Bug fixes and issue reports
- New features and enhancements
- Documentation improvements
- Example scripts and usage scenarios
- Performance optimizations
Please ensure your code follows the project's style and includes appropriate tests.
For changes, please open an issue first to discuss what you would like to change.
Thank you to all our contributors who help make PSMCP better!









