Power Platform & Azure CLI Bridge MCP server

Bridges Power Platform CLI and Azure CLI commands with specialized tools for executing Dataverse environment operations, making Azure REST API requests, and performing Graph API operations.
Back to servers
Provider
Natraj Yegnaraman
Release date
Mar 30, 2025
Language
TypeScript
Stats
4 stars

This repository provides a Model Context Protocol (MCP) server for interacting with Graph API, Azure REST API, and Power Platform/Dataverse APIs through their respective command-line tools. It enables AI models to access and utilize these services through a standardized protocol.

Prerequisites

Before getting started, ensure you have:

  • VSCode Insiders (March 2025 version) or Claude Desktop
  • If not using DevContainer:
    • Azure CLI installed and authenticated
    • Power Platform CLI installed and authenticated
  • For DevContainer option:

Installation

To install the necessary components:

  1. Install NodeJS if not already installed
  2. Install the GenAIScript CLI globally:
npm install -g genaiscript

Alternatively, you can use it without installation:

npx genaiscript

Configuration

DevContainer Configuration (Optional)

If you're experiencing authentication issues with GitHub Copilot on Windows, you can use DevContainers:

  1. Create a genaiscript.env file in the .devcontainer folder with the following content:
PAC_CLIENT_ID=2caa17e6-884b-473b-80c5-c05d8859a2fa
PAC_CLIENT_SECRET=
ENVIRONMENT_URL=https://abc.crm6.dynamics.com
TENANT_ID=
AZ_CLIENT_ID=aba9829f-6288-44d7-9168-53eca9a1f4a5
AZ_CLIENT_SECRET=
DOCKER_CONTAINER=true

Claude Desktop Configuration

For Windows:

{
    "globalShortcut": "Ctrl+Space",
    "mcpServers": {
        "genaiscript-mcp": {
            "type": "stdio",
            "command": "cmd",
            "args": [
                "/c",
                "npx",
                "genaiscript",
                "mcp",
                "--remote",
                "https://github.com/rajyraman/genaiscript-pac-az-mcp/",
                "--remote-branch",
                "main",
                "--groups",
                "mcp",
                "--startup",
                "mcp_resources"
            ],
            "env": {
                "DEBUG": "*"
            }
        }
    }
}

For MacOS/Linux:

{
    "globalShortcut": "Ctrl+Space",
    "mcpServers": {
        "genaiscript-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "genaiscript",
                "mcp",
                "--remote",
                "https://github.com/rajyraman/genaiscript-pac-az-mcp/",
                "--remote-branch",
                "main",
                "--groups",
                "mcp",
                "--startup",
                "mcp_resources"
            ],
            "env": {
                "DEBUG": "*"
            }
        }
    }
}

VSCode Configuration

Create or modify the .vscode/mcp.json file:

For Windows:

{
    "servers": {
        "genaiscript-mcp-remote": {
            "type": "stdio",
            "command": "cmd",
            "args": [
                "/c",
                "npx",
                "genaiscript",
                "mcp",
                "--remote",
                "https://github.com/rajyraman/genaiscript-pac-az-mcp/",
                "--remote-branch",
                "main",
                "--groups",
                "mcp"
            ],
            "env": {
                "DEBUG": "*"
            }
        }
    }
}

For MacOS/Linux:

{
    "servers": {
        "genaiscript-mcp-remote": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "genaiscript",
                "mcp",
                "--remote",
                "https://github.com/rajyraman/genaiscript-pac-az-mcp/",
                "--remote-branch",
                "main",
                "--groups",
                "mcp"
            ],
            "env": {
                "DEBUG": "*"
            }
        }
    }
}

Usage

Starting the MCP Server

In VSCode Insiders, you can start the MCP Server by clicking the Start link in the MCP panel. If it's already running, you'll see a Running indicator.

Using Prompt Files

There are two main prompt files available:

  • az.prompt.md - For Azure REST API or Graph API questions
  • pac.prompt.md - For Power Platform questions

In VSCode

Use the prompts directly in the VSCode interface by selecting them from the MCP resources panel.

In Claude Desktop

  1. Upload the appropriate prompt file to your session
  2. The prompts will appear as Resources
  3. Select the appropriate prompt for your needs (choosing one at a time is recommended for initial testing)

Example Queries

You can use the MCP server to:

  1. Query Power Platform environment details
  2. Retrieve Azure subscription information
  3. Access Graph API data
  4. Get information about Power Platform environments

The server will execute the appropriate CLI commands based on your queries and return the results through the MCP protocol.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later