-
Notifications
You must be signed in to change notification settings - Fork 0
Fixed MCP Server implementation #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
… and MCP Server - Updated README.md to streamline installation steps and clarify configuration for GitHub Copilot and Claude Desktop. - Removed the GitHub Copilot Integration guide from docs/COPILOT.md and consolidated relevant information into README.md. - Enhanced server.json management instructions in DEVELOPMENT.md to ensure synchronization with MCP Server changes. - Revised installation guide in INSTALLATION.md to focus on CLI tool installation and provide clear system requirements. - Updated NuGet trusted publishing documentation in NUGET_TRUSTED_PUBLISHING.md to reflect repository name changes and added API key method. - Adjusted versioning in project files for ExcelMcp CLI and Core to 1.0.0. - Modified MCP Server configuration in server.json to align with new schema and package structure. - Cleaned up unnecessary sections in MCP Server README.md and improved clarity on command usage.
Dependency ReviewThe following issues were found:
License Issuestests/ExcelMcp.Core.Tests/ExcelMcp.Core.Tests.csproj
OpenSSF Scorecard
Scanned Files
|
…mplete with Comprehensive Test Coverage (#5) * Checkpoint from VS Code for coding agent session * Initial commit: Add XML documentation and update to .NET 9.0 Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Refactor Core FileCommands to return Result objects, remove Spectre.Console dependency Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Create Core.Tests project and reorganize tests by layer (Core vs CLI) Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Add comprehensive refactoring summary documentation Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Final summary: FileCommands refactoring complete with proof of concept Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Refactor SetupCommands: Core returns VbaTrustResult, CLI formats output Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Refactor CellCommands: Core returns CellValueResult/OperationResult, CLI formats Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Refactor ParameterCommands: Core returns ParameterListResult/ParameterValueResult, CLI formats Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Add refactoring status documentation - 67% complete (4/6 commands done) Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Refactor SheetCommands Core: returns WorksheetListResult/WorksheetDataResult/OperationResult Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Complete SheetCommands: CLI wrapper and test updates - builds successfully Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Update IScriptCommands interface and add final status documentation - 83% complete Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Refactor ScriptCommands Core: returns ScriptListResult/OperationResult, zero Spectre.Console Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Refactor PowerQueryCommands Core: returns Result objects, zero Spectre.Console - 100% Core complete! Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Create CLI wrappers for ScriptCommands and PowerQueryCommands - formatting Core results Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Complete refactoring: Update MCP Server, remove Spectre.Console from Core - 100% Done! Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Add comprehensive test coverage documentation and status analysis Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Add 15 unit tests for Result types - all passing without Excel Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Add 14 unit tests for MCP Server JSON serialization - 46 total unit tests passing Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Move integration tests to Core.Tests - proper layer organization (48 Core, 8 CLI, 30 MCP) Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> * Add missing Core integration tests: PowerQuery, Sheet, Script, IntegrationWorkflows (30+ tests) Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> --------- Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
- Implemented ExcelTools class for comprehensive Excel file operations including creation, validation, and existence checks. - Introduced ExcelPowerQuery for managing Power Query M code and data connections. - Developed ExcelWorksheet for CRUD operations on worksheets and cell ranges. - Created ExcelParameter for managing named ranges as parameters. - Added ExcelCell for individual cell operations including getting and setting values and formulas. - Implemented ExcelVba for managing and executing VBA scripts in macro-enabled Excel files. - Established ExcelToolsBase as a common base class for shared functionality across all Excel tools. - Enhanced error handling and standardized JSON responses across all tools.
…tionality - Implemented integration tests for Excel file and worksheet operations in ExcelMcpServerTests. - Added round trip tests for Power Query and VBA workflows in McpServerRoundTripTests. - Created unit tests for JSON serialization of result objects in ResultSerializationTests. - Ensured comprehensive coverage of success and error scenarios across all tests. - Included cleanup logic to manage temporary files created during tests.
- Updated ExcelVbaTool and ExcelWorksheetTool to include data annotations for parameter validation, ensuring required fields and valid file extensions. - Refactored action handling in both tools to improve clarity and maintainability. - Added comprehensive unit tests for various CLI commands, focusing on argument validation and error exit codes. - Introduced integration tests for ParameterCommands, CellCommands, PowerQueryCommands, ScriptCommands, and SheetCommands to verify CLI-specific behavior and error handling. - Ensured all tests validate expected exit codes for missing or invalid arguments, enhancing overall robustness of the CLI.
…ency, add detailed error message tests, and enhance directory handling in Excel file operations - Changed parameter names from `filePath` to `excelPath` in multiple test cases for clarity. - Introduced `DetailedErrorMessageTests` to verify enhanced error messages for various Excel operations. - Added `ExcelFileDirectoryTests` to ensure file creation in non-existent directories works as expected. - Created `ExcelFileMcpErrorReproTests` to reproduce specific MCP error scenarios. - Implemented `ExcelFileToolErrorTests` to diagnose issues with the excel_file tool. - Added `McpParameterBindingTests` to test parameter binding in the MCP framework. - Developed `PowerQueryComErrorTests` to diagnose COM errors in Power Query operations.
- Standardized test class naming conventions by adding layer prefixes (Cli, Core, Mcp) to avoid duplicate names across projects. - Implemented a new trait standardization for all tests, ensuring complete trait coverage for better filtering and organization. - Added a new method to disable VBA project access trust in SetupCommands. - Introduced WithVbaTrustManagement method in ScriptCommands to manage VBA trust automatically during operations. - Updated existing tests to reflect new naming conventions and added missing traits for MCP Server tests. - Removed obsolete ScriptCommandsTests class to streamline test suite. - Revised documentation to reflect changes in test organization and filtering best practices.
- Directly use the built executable for faster startup instead of `dotnet run`. - Implement fallback to DLL execution if the executable is not found. - Enhance JSON response handling for various calls to ensure robustness against non-JSON responses. - Update data verification steps to focus on protocol correctness rather than exact content. - Improve logging for better clarity on test steps and outcomes. - Clean up file handling to ensure proper resource management.
…ows (#6) * Initial plan * Fix build actions: Update .NET version from 10 to 9 across all workflows and global.json Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sbroenne <3026464+sbroenne@users.noreply.github.com>
24 tasks
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.
Uh oh!
There was an error while loading. Please reload this page.