Skip to content

Add ChartJS MCP server for BlazorExpress chart integration#35

Open
gvreddy04 wants to merge 1 commit into
mainfrom
features/mcp-server
Open

Add ChartJS MCP server for BlazorExpress chart integration#35
gvreddy04 wants to merge 1 commit into
mainfrom
features/mcp-server

Conversation

@gvreddy04

@gvreddy04 gvreddy04 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a new test project and core library for the BlazorExpress.ChartJS.MCP package, which provides a Model Context Protocol (MCP) server for generating and integrating ChartJS charts in Blazor applications. The changes include the initial project setup, implementation of a chart catalog and schema, and comprehensive unit tests to ensure correct chart generation and project integration.

Key changes:

New Project and Test Infrastructure

  • Added BlazorExpress.ChartJS.MCP project with MCP server implementation, including all necessary project metadata and package references in BlazorExpress.ChartJS.MCP.csproj.
  • Introduced BlazorExpress.ChartJS.MCP.Tests project targeting .NET 10, referencing xUnit and the main MCP project, and enabling nullable/implicit usings.
  • Provided global usings for test readability and maintainability in Usings.cs.

Core Functionality

  • Implemented ChartCatalog in the main MCP library, which provides chart definitions, schema metadata, and utility methods for retrieving supported chart types and their properties. This includes normalization, metadata extraction, and support for various ChartJS chart types.

Unit Tests

  • Added ChartCatalogTests to verify that all supported chart types are correctly listed and that schema metadata for each chart type is accurate and complete.
  • Added ChartExampleGeneratorTests to ensure code generation for all chart types includes the correct Razor components, options, datasets, and required scripts/plugins.
  • Added ProjectIntegrationServiceTests to validate integration workflows: previewing changes, applying them to a Blazor WebAssembly project, and handling stale preview plans. Includes a TemporaryWorkspace helper for isolated test environments.

…harts

- Implement ChartCatalog for managing chart definitions and schemas.
- Create ChartExampleGenerator for generating Razor examples of charts.
- Develop ChartJsMcpTools for MCP server tools including chart type listing and example generation.
- Introduce Json utility for serialization and deserialization.
- Define models for chart generation requests, datasets, and integration plans.
- Implement ProjectIntegrationService for managing project integration and edits.
- Add README.md for installation and usage instructions.
- Set up Program.cs for hosting the MCP server.
@gvreddy04 gvreddy04 self-assigned this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant