About Components.mcp.blazor
Components.mcp.blazor is an MCP server published by SimonLiebers-Dev in the Developer Tools category: a Model Context Protocol (MCP) server that reflects Blazor/Razor assemblies to expose live component metadata and developer tools for AI-assisted code generation and analysis. It has been installed 0 times through Conduid.
The repository has 11 stars and 2 forks, with the last commit 10 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx components-mcp-blazorThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Components.mcp.blazor
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
🧩 Components.MCP.Blazor
A Model Context Protocol (MCP) server that exposes Blazor component metadata for AI-assisted development.
It enables ChatGPT, Claude, and other MCP-capable tools to inspect your actual Blazor components — no guessing, no static docs.
🚀 Overview
Components.MCP.Blazor provides a Model Context Protocol (MCP) interface that lets AI agents and development tools dynamically discover your real Blazor components.
It reflects all types inheriting from ComponentBase in your assemblies and exposes them as structured MCP tools.
Why this matters
| Without MCP | With Components.MCP.Blazor |
|---|---|
| AI assistants hallucinate Razor parameters | AI reads your actual component metadata |
| Static component docs go out of sync | Metadata is live and updated automatically |
| You manually describe your UI components | AI tools introspect them directly via MCP |
This project bridges AI and Blazor — giving large language models the same understanding of your components that your IDE has.
🧰 Available MCP Tools
🔹 components.list
Description: Lists all discoverable Blazor components and their namespaces.
Request Example
{
"method": "tools/call",
"params": {
"name": "components.list"
}
}
Response Example
{
"content": [
{
"type": "text",
"text": [
{
"name": "NavMenu",
"namespace": "MyApp.Components.Shared"
},
{
"name": "UserCard",
"namespace": "MyApp.Components.UI"
}
]
}
]
}
Use case:
AI agents can query this tool to discover available components, then suggest or autogenerate Razor markup that references them correctly.
🔹 component.details
Description: Returns full metadata for a specific Blazor component by namespace and name.
Request Example
{
"method": "tools/call",
"params": {
"name": "component.details",
"arguments": {
"componentNamespace": "MyApp.Components.UI",
"componentName": "UserCard"
}
}
}
Response Example
{
"content": [
{
"type": "text",
"text": {
"name": "UserCard",
"namespace": "MyApp.Components.UI",
"assembly": "MyApp.Components",
"parameters": [
{
"name": "User",
"type": "UserModel",
"isRequired": true,
"captureUnmatchedValues": false
}
],
"cascadingParameters": [],
"injectedDependencies": [
{
"name": "Logger",
"type": "ILogger<UserCard>",
"isRequired": false,
"captureUnmatchedValues": false
}
]
}
}
]
}
Use case:
This allows AI tools to understand the actual parameters and injected services for any component, enabling:
- Accurate Razor code generation
- Intelligent documentation
- Semantic search and completion
⚙️ How It Works
- Scans assemblies for all types inheriting from
ComponentBase - Collects
[Parameter],[CascadingParameter], and[Inject]property info - Exposes metadata through standardized MCP tools
- AI agents or IDEs can query these tools live via HTTP (JSON-RPC)
⚙️ Setup
1. Configure inspected assemblies in Program.cs
using Components.MCP.Blazor.Introspection;
using Components.MCP.Blazor.Tools;
using ModelContextProtocol.Server;
using Microsoft.AspNetCore.Components;
var builder = WebApplication.CreateBuilder(args);
// Configure which assemblies to scan
var discoveryOptions = new ComponentDiscoveryOptions();
discoveryOptions.Assemblies.Add(typeof(DynamicHeadContent).Assembly);
builder.Services.AddSingleton(discoveryOptions);
builder.Services.AddSingleton<ComponentMetadataProvider>();
builder.Services
.AddMcpServer()
.AddBuiltInHandlers()
.WithHttpTransport()
.WithTools<ComponentTool>();
var app = builder.Build();
await app.RunAsync();
2. Run the MCP server
dotnet run
🧱 Roadmap
- Add
components.searchtool for name-based filtering - Add
resources/readfor raw source inspection - Provide parameter documentation from XML comments
📄 License
MIT © 2025 Simon Liebers
README mirrored from the source repository 4 months ago. The original is authoritative.