- Home
- /
- Documentation
- /
- DMBDocumentationViewer
- /
- Getting Started
Getting Started — DocumentationViewer
Host generated API documentation in an ASP.NET Core website.
1. Install the NuGet Package
The viewer expects data produced by DocumentationBuilder. Install DMBDocumentationViewer in the website that hosts the documentation — not the generator project.
dotnet add package DMBDocumentationViewer2. Configure Services
Load the viewer after PageBuilder and BootstrapBuilder. The viewer also registers MCP tools from its assembly for agent-assisted documentation workflows.
using DMBPageBuilder;
using DMBBootstrapBuilder;
using DMBDocumentationViewer;
PageBuilderConfiguration.LoadCommonConfig(builder);
BootstrapBuilderConfiguration.LoadCommonConfig(builder);
DocumentationViewerConfiguration.LoadCommonConfig(builder);3. Map the MCP Endpoint
Call UseApp after building the application so the viewer can map its MCP endpoint and documentation routes.
WebApplication app = builder.Build();
DocumentationViewerConfiguration.UseApp(app);4. Register Generated Navigation
Register the generated sidebar provider after the documentation generation step has written it into the website. Then open the documentation home to verify the integration.
using DocumentationBuilders.Documentation;
DocumentationSidebarProvider.Register();Key Configuration
Curious how it works under the hood?
Understand how DocumentationViewer routes requests and renders pages at runtime.
Architecture