-
Notifications
You must be signed in to change notification settings - Fork 460
Open
Labels
community:contributionIssue will/can be addressed by community contributionIssue will/can be addressed by community contribution
Description
Feature Request: MCP Server for Fluent UI Blazor Documentation
Summary
Add an MCP (Model Context Protocol) server that provides AI assistants (GitHub Copilot, Claude, etc.) with access to Fluent UI Blazor component documentation, enabling them to generate accurate, up-to-date code.
What is MCP?
Model Context Protocol is an open protocol that enables seamless integration between LLM applications and external data sources. Instead of relying solely on training data, AI assistants can query real-time documentation.
Proposed Implementation
Package
- Name:
Microsoft.FluentUI.AspNetCore.Components.McpServer - Type: .NET Global Tool (
PackAsTool=true,PackageType=McpServer) - Command:
fluentui-mcp
MCP Primitives
Tools (11 total) - Model-controlled
| Tool | Description |
|---|---|
ListComponents |
Lists all available components with names and descriptions |
GetComponentDetails |
Gets detailed documentation including parameters, events, methods |
SearchComponents |
Searches components by name or description |
ListCategories |
Lists all component categories |
GetEnumValues |
Gets enum type information with all possible values |
GetComponentEnums |
Lists enums used by a specific component |
ListEnums |
Lists all enum types in the library |
GetComponentExample |
Gets usage examples for a component |
GetGuide |
Gets documentation guides (installation, migration, styles, etc.) |
SearchGuides |
Searches documentation guides |
ListGuides |
Lists all available guides |
Resources (8 total) - User-selected context
| URI | Description |
|---|---|
fluentui://components |
Complete list of all components |
fluentui://categories |
List of component categories |
fluentui://enums |
All enum types |
fluentui://guides |
Available documentation guides |
fluentui://component/{name} |
Specific component documentation |
fluentui://category/{name} |
Components in a category |
fluentui://enum/{name} |
Specific enum details |
fluentui://guide/{key} |
Specific guide content |
Prompts (11 total) - Pre-defined templates
| Prompt | Description |
|---|---|
create_component |
Generate component code with configuration |
explain_component |
Get detailed component explanation |
compare_components |
Compare multiple components |
create_form |
Generate form with validation |
create_datagrid |
Generate DataGrid with features |
create_dialog |
Generate dialog/modal component |
create_drawer |
Generate drawer/panel component |
migrate_to_v5 |
Migration guidance from v4 to v5 |
setup_project |
Project setup instructions |
configure_theming |
Theming and styles guidance |
configure_localization |
Localization implementation |
Architecture
┌─────────────────────────────────────────────────────────┐
│ AI Assistant │
│ (Copilot, Claude, etc.) │
└─────────────────────────────────────────────────────────┘
│
│ MCP Protocol (stdio)
│
┌─────────────────────────────────────────────────────────┐
│ FluentUI MCP Server │
├─────────────────────────────────────────────────────────┤
│ Tools │ Resources │ Prompts │
├─────────────────────────────────────────────────────────┤
│ FluentUIDocumentationService │
│ (Reflection + XML Docs) │
└─────────────────────────────────────────────────────────┘
│
┌─────────────────────────────────────────────────────────┐
│ Microsoft.FluentUI.AspNetCore.Components │
└─────────────────────────────────────────────────────────┘
Configuration Example
VS Code / GitHub Copilot (.vscode/mcp.json):
{
"servers": {
"fluentui-blazor": {
"command": "fluentui-mcp",
"args": []
}
}
}Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"fluentui-blazor": {
"command": "fluentui-mcp",
"args": []
}
}
}Benefits
- Accurate code generation: AI gets real-time access to current API documentation
- Up-to-date information: No reliance on potentially outdated training data
- Rich context: Parameters, events, methods, enums, and examples
- Migration support: Built-in v4→v5 migration guidance
- Improved developer experience: Better AI assistance for Fluent UI Blazor projects
Technical Details
- Target Framework: .NET 9.0
- Dependencies:
ModelContextProtocolSDKLoxSmoke.DocXmlfor XML documentation parsingMicrosoft.Extensions.Hosting
- Documentation source: Reflection on component assembly + XML documentation file
Implementation Status
I have a working prototype available in my fork that includes:
- Complete MCP server implementation
- All 11 tools, 8 resources, and 11 prompts
- Documentation page for the Demo site
- NuGet package configuration
Would love to contribute this as a PR if there's interest!
Related Links
diegotormes
Metadata
Metadata
Assignees
Labels
community:contributionIssue will/can be addressed by community contributionIssue will/can be addressed by community contribution