loading…
Search for a command to run...
loading…
Enables platform engineering workflows via GitHub Copilot, including creating repositories from templates and provisioning Azure deployment environments.
Enables platform engineering workflows via GitHub Copilot, including creating repositories from templates and provisioning Azure deployment environments.
A Platform Engineering MCP Server offering reusable platform engineering workflows based on Azure and GitHub that can be run by your Agent.
This MCP Server supports two authentication methods with GitHub:
[!WARNING] Use a PAT for testing and development purposes only. For production use, authenticate with a GitHub App.
The simplest way to get started is using a GitHub Personal Access Token:
Create a new PAT in GitHub:
repo (Full control of private repositories)workflow (Update GitHub Action workflows)Set the token in your environment:
GITHUB_PAT environment variableFor production use and better security, create and configure a GitHub App:
Create a new GitHub App in your Organization:
Generate a private key for your GitHub App:
Install the GitHub App in your Organization:
Write down the following environment variables:
GITHUB_APP_ID: Found in the GitHub App's settings page (displayed as "App ID")GITHUB_PRIVATE_KEY: The contents of the .pem file you downloadedGITHUB_INSTALLATION_ID: Found in the URL when you installed the appPE_CONFIG_REPO: Your organization's platform engineering configuration repositoryYou must either create or choose an existing repository as the one which will hold your engineering platform's configuration file. If you are authenticating with a GitHub App, this repo should be created in the organization where you have installed it.
In your chosen repository:
pe.yaml. config/pe.yaml example file in this repo. This is just a starter example that you must edit.pe.yaml file to point to your repository templates. GitHub's documentation on creating repository templates.pe.yaml file to point to GitHub Organizations from where you want to source GitHub Actions workflow templates. These must be located under the .github repo's workflow-templates folder in each of the Organizations you add. GitHub's documentation on creating workflow templates for your organization.Read more about this configuration repository at 6. Configuration Repository, which explains the structure and purpose of the pe.yaml file.
In VSCode Insiders, add a new MCP Server to your User Settings JSON file. You can use either authentication method. We recommend using Docker (preferred) for easier setup and consistency.
Docker provides an isolated environment with all dependencies pre-installed, including the Azure CLI.
"mcp": {
"servers": {
"platform-eng-copilot": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "GITHUB_PAT",
"-e", "AZURE_SUBSCRIPTION_ID",
"-e", "AZURE_TENANT_ID",
"-e", "AZURE_CLIENT_ID",
"-e", "AZURE_CLIENT_SECRET",
"-e", "PE_CONFIG_REPO",
"-e", "DEVCENTER_NAME",
"-e", "DEVCENTER_PROJECT",
"-e", "DEVCENTER_CATALOG",
"platform-eng-copilot"
],
"env": {
"GITHUB_PAT": "<YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>",
"AZURE_SUBSCRIPTION_ID":"<YOUR_AZURE_SUBSCRIPTION_ID>",
"AZURE_TENANT_ID":"<YOUR_AZURE_TENANT_ID>",
"AZURE_CLIENT_ID":"<YOUR_AZURE_CLIENT_ID>",
"AZURE_CLIENT_SECRET":"<YOUR_AZURE_CLIENT_SECRET>",
"PE_CONFIG_REPO":"<YOUR_GITHUB_ORG>/<YOUR_REPO_WITH_PE_YAML_FILE>",
"DEVCENTER_NAME":"<YOUR_DEVCENTER_NAME>",
"DEVCENTER_PROJECT":"<YOUR_DEVCENTER_PROJECT>",
"DEVCENTER_CATALOG":"<YOUR_DEVCENTER_CATALOG>"
}
}
}
}
"mcp": {
"servers": {
"platform-eng-copilot": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "GITHUB_APP_ID",
"-e", "GITHUB_PRIVATE_KEY",
"-e", "GITHUB_INSTALLATION_ID",
"-e", "AZURE_SUBSCRIPTION_ID",
"-e", "AZURE_TENANT_ID",
"-e", "AZURE_CLIENT_ID",
"-e", "AZURE_CLIENT_SECRET",
"-e", "PE_CONFIG_REPO",
"-e", "DEVCENTER_NAME",
"-e", "DEVCENTER_PROJECT",
"-e", "DEVCENTER_CATALOG",
"platform-eng-copilot"
],
"env": {
"GITHUB_APP_ID": "<YOUR_GITHUB_APP_ID>",
"GITHUB_PRIVATE_KEY":"<YOUR_GITHUB_APP_PRIVATE_KEY_WITH_NO_BREAKLINES>",
"GITHUB_INSTALLATION_ID":"<YOUR_GITHUB_APP_INSTALLATION_ID>",
...
}
}
}
}
For development purposes, you can also run the MCP server directly with Node.js:
"mcp": {
"servers": {
"platform-eng-copilot": {
"command": "node",
"args": [
"<ABSOLUTE_PATH>/platform-eng-copilot/dist/server.js"
],
"env": {
"GITHUB_PAT": "<YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>",
...
}
}
}
}
Make sure to replace all values between "<>" brackets with your actual configuration values. Only configure one authentication method - either PAT or GitHub App credentials.
[!NOTE] Using this MCP Server with VSCode won't allow you to use the implemented MCP Prompts, as MCP Prompts are not yet supported on VSCode.
Use VSCode Reusable prompts with the prompt files made available in this repo under .github/prompts. Think about these as reusable workflows set up by your PE Admins which will guide the Agent through a complex task across several tools in your SDLC stack.
For example, attach the create-repo.prompt.md prompt file in .github/prompts to the context and send it to GitHub Copilot.
Value Proposition: Automate the creation of standardized, compliant repositories based on GitHub Repository templates.
Reusable Prompt: .github/prompts/create-repo.prompt.md
Workflow:
Value Proposition: Let the agent pick up the right ADE template for your app, provision the environment in Azure, generate the GitHub Actions CD workflow and deploy your app.
Reusable Prompt: .github/prompts/ade-deploy.prompt.md
Workflow:
This guide outlines an architecture for leveraging the Model Context Protocol (MCP) to create a powerful Platform Engineering experience through AI agents. By combining MCP's tools, prompts, and client-server architecture, we can create seamless, standardized workflows that automate complex platform engineering tasks while maintaining the human-in-the-loop element essential for critical decisions.
The architecture consists of three primary components:
flowchart TD
User([Developer])
subgraph "Development Interfaces"
VSCode[VS Code]
GitHub[GitHub.com]
end
User -->|Uses| VSCode
User -->|Uses| GitHub
User -.->|Selects Prompt| PE_MCP
VSCode -->|Natural Language| ClientLLM[GitHub Copilot Agent]
GitHub -->|Natural Language| ClientLLM
subgraph "MCP Ecosystem"
ClientLLM <-->|MCP Prompts/Tools| PE_MCP[Platform Engineering MCP Server]
ClientLLM <-->|MCP Tools| GitHub_MCP[GitHub MCP Server]
ClientLLM <-->|MCP Tools| Azure_MCP[Azure MCP Server]
end
PE_MCP -->|Reads| ConfigRepo[(Configuration Repository)]
subgraph "Orchestrated Resources"
GitHub_MCP --> GitHubResources[GitHub Repositories
GitHub Actions Workflows]
Azure_MCP --> AzureResources[
DevBox
AKS
App Services
Functions
CosmosDB
Azure SQL
Virtual Networks
Load Balancers
Azure Monitor]
end
style ClientLLM fill:#FF69B4,stroke:#fff,color:#fff
style PE_MCP fill:#4169E1,stroke:#fff,color:#fff
style GitHub_MCP fill:#2E8B57,stroke:#fff,color:#fff
style Azure_MCP fill:#4682B4,stroke:#fff,color:#fff
style ConfigRepo fill:#CD853F,stroke:#fff,color:#fff
style AzureResources fill:#4682B4,stroke:#fff,color:#fff
style GitHubResources fill:#2E8B57,stroke:#fff,color:#fff
style User fill:#DEB887,stroke:#fff,color:#333
style VSCode fill:#007ACC,stroke:#fff,color:#fff
style GitHub fill:#24292E,stroke:#fff,color:#fff
classDef default fill:#2F4F4F,stroke:#fff,color:#fff
This sequence diagram demonstrates how the Platform Engineering system leverages the Model Context Protocol (MCP) to create a structured interaction between LLMs and platform tooling. The workflow follows MCP's key architectural principles:
sequenceDiagram
User->>Client LLM: "Create a new Java project"
Client LLM->>PE MCP Server: Invokes "create-project" prompt
PE MCP Server->>Client LLM: Returns parameterized workflow guide
Client LLM->>User: Requests detailed project requirements
User->>Client LLM: Provides details (Java, Spring Boot, microservice, OAuth)
Client LLM->>PE MCP Server: list-templates tool call with filters
PE MCP Server->>Client LLM: Returns matching templates with detailed metadata
Client LLM->>Client LLM: Analyzes templates against requirements
Client LLM->>User: Recommends best template with explanation
User->>Client LLM: Confirms template choice
Client LLM->>GitHub MCP: create-repository tool call with chosen template
GitHub MCP->>Client LLM: Repository created response
Client LLM->>PE MCP Server: list-workflow-templates tool call
PE MCP Server->>Client LLM: Returns available CI/CD workflow templates
Client LLM->>Client LLM: Analyzes workflow templates against project needs
Client LLM->>User: Recommends workflow templates with explanation
User->>Client LLM: Confirms workflow choice
Client LLM->>GitHub MCP: setup-workflows tool call with chosen workflows
GitHub MCP->>Client LLM: Workflows configured
Client LLM->>User: Ask about test environment
User->>Client LLM: "Yes, provision test env"
Client LLM->>PE MCP Server: list-environment-templates tool call
PE MCP Server->>Client LLM: Returns matching environment templates
Client LLM->>User: Recommends environment template with explanation
User->>Client LLM: Confirms environment choice
Client LLM->>Azure MCP: provision-resources call with chosen template
Azure MCP->>Client LLM: Resources provisioned
Client LLM->>User: Comprehensive summary of actions taken
Prompts as Workflow Templates: The PE MCP Server defines standardized prompt templates that guide both the LLM and user through complex platform engineering tasks. These prompts surface as discoverable, interactive elements.
When a prompt is returned to the LLM, it includes structured guidance that helps the LLM:
Tools for Concrete Actions: Each action (creating repositories, configuring workflows, provisioning resources) is implemented as an MCP tool with well-defined parameters and validation, allowing the LLM to execute operations securely.
Client-Server Architecture: Following MCP's design, each service (PE, GitHub, Azure) runs as a separate server that exposes its capabilities through prompts and tools. The Client LLM acts as the coordinator, maintaining individual connections with each server.
Human-in-the-Loop Control: The workflow preserves MCP's human oversight model - all key decisions (template selection, workflow choices, environment provisioning) require explicit user confirmation before tools are invoked.
This approach ensures standardization while maintaining MCP's security principles and keeping humans in control of critical platform engineering decisions.
MCP Prompts are essential for providing structured guidance to both the user and the LLM:
Value in Platform Engineering:
Implementation Approach:
MCP Tools enable concrete actions and information retrieval:
The PE MCP Server reads from a configuration file named pe.yaml that defines your platform engineering sources and templates. This file is structured into two main sections:
github_workflow_orgs)This section defines the GitHub organizations from which to source workflow templates. Each organization entry includes:
github_workflow_orgs:
- name: "my-company" # Name of the organization
url: "https://github.com/my-company" # Organization's GitHub URL
description: "Main company organization containing standard CI/CD workflows"
The workflow templates must be stored in the .github/workflow-templates directory of each listed organization. This follows GitHub's standard for organization workflow templates.
github_repository_templates)This section defines repository templates that can be used as starting points for new projects. Each template includes comprehensive metadata to help the LLM make informed recommendations:
github_repository_templates:
- name: "java-springboot-microservice" # Template name
url: "https://github.com/my-company/java-springboot-template" # Template repository URL
description: "Spring Boot microservice with OAuth2 security and API documentation"
metadata:
language: java # Primary programming language
framework: springboot # Main framework used
architectureType: microservice # Type of application architecture
features: # Key features and capabilities
- oauth2
- swagger
- actuator
compliance: # Compliance standards met
- soc2
use-cases: # Recommended use cases
- "Backend services requiring authentication"
complexity: medium # Project complexity level
The metadata helps the AI agent understand:
This rich metadata enables the LLM to:
Run in your terminal:
claude mcp add platform-eng-copilot -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.