MCP Integration
Connect PowerLibs to Claude, GitHub Copilot, VS Code, Cursor, or any MCP client and generate Power Apps components directly in chat. Ask for what you need in natural language and get ready-to-paste YAML.
What is MCP?
MCP (Model Context Protocol) lets AI tools connect to external services. When you connect PowerLibs via MCP, your AI assistant can:
- Browse all available components
- See component settings and options
- Generate custom YAML code based on your requests
- Look up PowerFX functions with syntax and examples
- Build forms from column definitions
Instead of copying from the website, you can just ask: "Create a blue navigation bar with 5 items" and get ready-to-paste YAML.
PowerLibs MCP is available to all users with a free PowerLibs account. Sign up at powerlibs.com to get started.
Free vs Pro
MCP access works in two tiers depending on your subscription:
| Free Account | Ultra Subscription | |
|---|---|---|
| Components | 13 free components | All 100+ components |
| PowerFX Reference | Full access | Full access |
| Form Builder | Ultra only | Full access |
| Search & Browse | All components visible | All components visible |
| YAML Generation | Free components only | All components |
Free users can see all components when browsing, but YAML generation is limited to the 13 free components. Upgrade to Ultra to unlock everything.
Connect with Claude
1. Get MCP URL
Your PowerLibs MCP endpoint is:
https://www.powerlibs.com/api/mcp
2. Add to Claude
In Claude.ai settings:
- Go to Settings → Integrations or MCP Servers
- Click Add MCP Server
- Enter the URL:
https://www.powerlibs.com/api/mcp - Click Connect
3. Authorize
Claude will redirect you to PowerLibs to:
- Log in (if not already)
- Authorize Claude to access your account
- You'll be redirected back to Claude
4. Start Using
You can now ask Claude to generate Power Apps components!
Connect with VS Code / GitHub Copilot / Cursor
For MCP clients that ask for a static Bearer token (like GitHub Copilot in VS Code, Cursor, or Windsurf), you need an API key.
1. Generate an API Key
Go to powerlibs.com/mcp/api-key and click Generate API Key. Copy the key — it's only shown once. Any logged-in user can create API keys.
2. Add to your MCP config
VS Code / GitHub Copilot — create or edit .vscode/mcp.json in your project:
{
"servers": {
"powerlibs": {
"type": "http",
"url": "https://www.powerlibs.com/api/mcp",
"headers": {
"Authorization": "Bearer pl_your_key_here"
}
}
}
}
Cursor — create or edit .cursor/mcp.json in your project:
{
"mcpServers": {
"powerlibs": {
"type": "http",
"url": "https://www.powerlibs.com/api/mcp",
"headers": {
"Authorization": "Bearer pl_your_key_here"
}
}
}
}
VS Code uses "servers" while Cursor uses "mcpServers" — using the wrong key will give you an error.
3. Done
Your MCP client now has access to PowerLibs tools. Ask it to generate components!
If you need a new key, go back to powerlibs.com/mcp/api-key and click "Regenerate". The old key stops working immediately.
Available Tools
When connected, your AI assistant has access to these tools:
list_components
Browse all 100+ available components, optionally filtered by category.
get_component_details
Get detailed information about a specific component including its available settings and default configuration.
generate_yaml
Generate Power Apps YAML code with custom settings. The generated YAML can be copied directly into Power Apps Studio.
search_components
Find components by keyword. Searches component names, descriptions, and categories.
list_powerfx_functions
List all available PowerFX functions grouped by category (Data, Logic, Math, Text, Navigation, etc.).
get_powerfx_function_details
Get full details for a specific PowerFX function including syntax, examples, and description.
search_powerfx_functions
Search PowerFX functions by keyword.
generate_form_from_columns
Build a complete Power Apps form from column definitions (e.g. from a CSV or data source). Returns form YAML and an optional Patch formula for saving.
Example Prompts
Basic Component Generation
"Generate a gradient button with green colors and the text 'Submit Form'"
Browsing Components
"What navigation components are available in PowerLibs?"
Custom Configuration
"Create a responsive app shell with 4 nav items: Home, Dashboard, Settings, Profile. Use a dark blue sidebar."
Finding Components
"Search for components that have loading states"
Getting Details
"Show me the available settings for the Toast component"
PowerFX Help
"How does the Patch function work in Power Apps?"
Form from Data
"Build a form with fields: FirstName (text), StartDate (date), Department (dropdown)"
Tips for Better Results
Be Specific About Colors
Instead of: "Make it blue" Try: "Use #3B82F6 for the background color"
Mention Power Apps Context
Claude knows PowerLibs generates Power Apps YAML, but reminding it helps:
"Generate a Power Apps modal dialog with..."
Ask for Multiple Options
"Show me 3 different button styles I could use for a submit action"
Request Explanations
"Generate a tab bar and explain what each property does"
Claude can generate multiple components in one conversation. Ask it to create a navigation bar, then a modal, then some buttons - all with matching colors.
Limitations
Component Coverage
Most components are available via MCP, but some specialized tools (Form Builder, Logo Generator) are website-only.
No Preview
MCP generates code but can't show visual previews. For previews, use the website.
Authentication
- Claude: Your session expires after some time. If Claude can't connect, re-authorize in Claude settings.
- VS Code / Copilot / Cursor: API keys expire after 1 year. Generate a new one at powerlibs.com/mcp/api-key.
Troubleshooting
"Authorization failed"
- Make sure you have a PowerLibs account
- Try disconnecting and reconnecting in Claude settings
- For API keys, verify the key hasn't been revoked
"This component requires PowerLibs Pro"
- You're on the free tier trying to generate YAML for a Pro component
- Upgrade to Ultra at powerlibs.com/pricing to unlock all components
- Use
list_componentsto see which components are free
"Tool not available"
- The MCP server might be temporarily down
- Try refreshing Claude
- Check if other MCP tools work
Generated code looks wrong
- MCP generates valid YAML but Claude might truncate long outputs
- Ask Claude to regenerate or output in smaller chunks
Can't find a component
- Component names in MCP might differ slightly from the website
- Use
search_componentswith keywords instead of exact names
MCP-generated code uses default settings unless you specify otherwise. Always review the output before pasting into Power Apps.
Why Use MCP?
Speed
Ask for what you want in natural language. No clicking through menus.
Customization
Describe exactly what you need: "A button like the gradient one but with rounded corners and this hex color..."
Iteration
"Make it bigger" / "Change the text to..." / "Add another item" - iterate quickly in conversation.
Learning
Ask Claude to explain what each part of the YAML does. Great for learning Power Apps.
