| .ai-chats | ||
| .claude | ||
| .taskmaster | ||
| docs | ||
| README.md | ||
| RESUME.md | ||
Power Platform MCP Server
The single source of truth for Power Platform development guidance, exposed via Model Context Protocol (MCP).
🎯 Purpose
This repository serves as a canonical knowledge base for Power Platform development. It provides accurate, curated information about:
- Power Fx - Formulas, functions, patterns, and common pitfalls
- Naming Conventions - Variables, collections, controls, screens, flows
- YAML/Power Code Structure - Canvas app YAML, solution XML patterns
- Component Patterns - Reusable gallery patterns, form templates, navigation
- Data Patterns - Dataverse, SharePoint, SQL best practices
- Error Handling - Standard patterns for try/catch, error display
- Performance Guidelines - Delegation, caching, concurrent calls
- Accessibility - Screen reader patterns, tab order, inclusive design
🔑 Core Intent
This MCP server exists to solve a critical problem: AI assistants and tools generating Power Platform code often produce incorrect or suboptimal output because they lack access to authoritative, up-to-date guidance.
The Solution
- Single Source of Truth - All Power Platform best practices, patterns, and code templates live here
- MCP Protocol Exposure - AI assistants query this server for accurate information before generating code
- Centralized Correction - When faulty output is discovered, we fix it here once, and all consumers benefit
flowchart LR
subgraph Consumers["🤖 AI Consumers"]
CC[Claude Code]
CU[Cursor]
OT[Other AI Tools]
end
subgraph MCP["⚡ Power Platform MCP Server"]
S[MCP Protocol]
T[Tools & Resources]
end
subgraph KB["📚 Knowledge Base"]
BP[Best Practices]
CP[Code Patterns]
NR[Naming Rules]
YS[YAML Structure]
end
subgraph Output["✅ Output"]
AC[Accurate Code Generation]
end
CC --> S
CU --> S
OT --> S
S --> T
T --> KB
KB --> AC
style MCP fill:#e1f5fe
style KB fill:#f3e5f5
style Output fill:#c8e6c9
Correction Feedback Loop
When incorrect code is generated:
- Identify the error in the generated output
- Trace it back to the knowledge base entry
- Correct the source information in this repository
- Verify future generations produce correct output
This ensures continuous improvement and prevents the same mistakes from recurring.
🏗️ Architecture
MCP Server (Primary)
The core of this repository is an MCP server that exposes Power Platform knowledge through standardized tools and resources:
- Tools - Query best practices, validate code patterns, get naming suggestions
- Resources - Access structured knowledge documents, code templates, examples
- Prompts - Pre-built prompts for common Power Platform tasks
Web UI (Documentation)
A companion web interface provides:
- Usage Guide - How to connect and use this MCP server
- Knowledge Browser - Explore the knowledge base visually
- Contribution Guide - How to submit corrections and improvements
- Change Log - Track corrections and their reasons
📚 Tech Stack
This project follows the tech stack defined in docs/tech-stack.md:
| Component | Technology | Purpose |
|---|---|---|
| MCP Server | Python + FastAPI | Core MCP protocol implementation |
| Knowledge Store | PostgreSQL + pgvector | Structured knowledge with vector search |
| Web UI | SvelteKit 5 | Documentation and knowledge browser |
| Styling | Tailwind CSS + shadcn-svelte | Consistent, accessible UI |
🚀 Getting Started
Prerequisites
- Python 3.12+
- Node.js 22+ or Bun 1.1+
- PostgreSQL 16+
Installation
# Clone the repository
git clone ssh://git@git.superpowerlabs.app:2222/darren/power-platform-mcp.git
cd power-platform-mcp
# Install MCP server dependencies
cd server
uv sync
# Install web UI dependencies
cd ../web
bun install
Running the MCP Server
cd server
uv run python -m power_platform_mcp
Running the Web UI
cd web
bun dev
Connecting to the MCP Server
Add to your Claude Code or MCP client configuration:
{
"mcpServers": {
"power-platform": {
"command": "uv",
"args": ["run", "python", "-m", "power_platform_mcp"],
"cwd": "/path/to/power-platform-mcp/server"
}
}
}
📁 Repository Structure
power-platform-mcp/
├── server/ # MCP Server (Python)
│ ├── src/
│ │ └── power_platform_mcp/
│ │ ├── __init__.py
│ │ ├── __main__.py # Entry point
│ │ ├── server.py # MCP server implementation
│ │ ├── tools/ # MCP tools
│ │ ├── resources/ # MCP resources
│ │ └── knowledge/ # Knowledge base loaders
│ ├── pyproject.toml
│ └── tests/
├── web/ # Web UI (SvelteKit)
│ ├── src/
│ │ ├── routes/
│ │ └── lib/
│ ├── package.json
│ └── svelte.config.js
├── knowledge/ # Knowledge Base (Markdown/YAML)
│ ├── power-fx/
│ │ ├── functions/
│ │ ├── patterns/
│ │ └── pitfalls/
│ ├── naming/
│ │ ├── variables.md
│ │ ├── collections.md
│ │ └── controls.md
│ ├── yaml/
│ │ ├── canvas-apps/
│ │ └── solutions/
│ ├── patterns/
│ │ ├── galleries/
│ │ ├── forms/
│ │ └── navigation/
│ └── data/
│ ├── dataverse/
│ ├── sharepoint/
│ └── sql/
├── docs/
│ ├── product/
│ │ ├── PRD.md # Product Requirements
│ │ └── INTENT.md # Core Intent (immutable)
│ └── tech-stack.md # Technology decisions
├── .taskmaster/ # Task management
├── .ai-chats/ # AI conversation logs
├── CLAUDE.md # AI development context
└── README.md # This file
🤝 Contributing
Reporting Incorrect Output
If you encounter incorrect code generation that traces back to this knowledge base:
- Open an issue describing the incorrect output
- Include the expected correct output
- Reference the knowledge base entry if known
Adding Knowledge
- Create a branch:
git checkout -b knowledge/topic-name - Add or update files in the
knowledge/directory - Follow the existing format and structure
- Submit a PR with clear description of the addition
📄 License
[TBD]
Maintained by: Superpower Labs Primary Git: git.superpowerlabs.app