Add ChartJS MCP server for BlazorExpress chart integration#35
Open
gvreddy04 wants to merge 1 commit into
Open
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new test project and core library for the
BlazorExpress.ChartJS.MCPpackage, 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
BlazorExpress.ChartJS.MCPproject with MCP server implementation, including all necessary project metadata and package references inBlazorExpress.ChartJS.MCP.csproj.BlazorExpress.ChartJS.MCP.Testsproject targeting .NET 10, referencing xUnit and the main MCP project, and enabling nullable/implicit usings.Usings.cs.Core Functionality
ChartCatalogin 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
ChartCatalogTeststo verify that all supported chart types are correctly listed and that schema metadata for each chart type is accurate and complete.ChartExampleGeneratorTeststo ensure code generation for all chart types includes the correct Razor components, options, datasets, and required scripts/plugins.ProjectIntegrationServiceTeststo validate integration workflows: previewing changes, applying them to a Blazor WebAssembly project, and handling stale preview plans. Includes aTemporaryWorkspacehelper for isolated test environments.