How to contribute to Windows MCP Server development
Thank you for your interest in contributing to the Windows MCP Server! This document provides guidelines and instructions for contributing.
This project adheres to the Contributor Covenant. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
git clone https://github.com/sbroenne/mcp-windows.git
cd mcp-windows
dotnet restore
dotnet build
dotnet test
Use descriptive branch names following this pattern:
<type>/<short-description>
Examples:
feature/keyboard-macro-supportfix/window-activation-timeoutdocs/update-readmetest/add-integration-testsTypes:
feature/ - New featuresfix/ - Bug fixesdocs/ - Documentation updatestest/ - Test additionsrefactor/ - Code refactoringperf/ - Performance improvementsFollow conventional commits format:
<type>(<scope>): <subject>
<body>
<footer>
Examples:
feat(keyboard): add macro recording support
Implement ability to record and replay keyboard sequences.
Fixes #123
fix(window): resolve activation timeout on slow systems
Increase default timeout and add exponential backoff retry logic.
Types:
feat: - New featurefix: - Bug fixdocs: - Documentationtest: - Test-relatedrefactor: - Code refactoringperf: - Performance improvementchore: - Maintenance tasksmainPull Request Guidelines:
Fixes #123)# All tests
dotnet test
# Specific category
dotnet test --filter "Category=Unit"
dotnet test --filter "Category=Integration"
# Specific test class
dotnet test --filter "FullyQualifiedName~MouseInputServiceTests"
# With code coverage
dotnet test /p:CollectCoverage=true /p:CoverageFormat=opencover
tests/Sbroenne.WindowsMcp.Tests/Unit/tests/Sbroenne.WindowsMcp.Tests/Integration/public void MethodName_WithCondition_ReturnsExpected()[Trait("Category", "Integration")]Example:
[Fact]
public void Click_WithValidCoordinates_SendsClickInput()
{
// Arrange
var service = new MouseInputService();
// Act
var result = service.Click(100, 200);
// Assert
Assert.True(result.Success);
}
LLM integration tests verify that AI agents can correctly use the MCP tools with real AI models. These tests are critical because:
These tests use pytest-aitest and require:
AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_API_KEY)LLM tests run automatically during every release via GitHub Actions with Azure OIDC authentication. A 100% pass rate is required before release. See .github/RELEASE_SETUP.md for Azure and GitHub configuration details.
# Run all LLM tests
cd tests/Sbroenne.WindowsMcp.LLM.Tests
uv run pytest -v
# Run specific test
uv run pytest test_notepad_ui.py -v
# Run integration tests
uv run pytest integration/ -v
| Test File | Description | Tests | Models |
|---|---|---|---|
window-management-test.yaml |
Find, activate, move, resize windows | 8 | GPT-4.1, GPT-5.2 |
notepad-ui-test.yaml |
Notepad UI automation (click, type, read) | 10 | GPT-4.1, GPT-5.2 |
paint-ui-test.yaml |
Paint ribbon UI and canvas drawing | 16 | GPT-4.1, GPT-5.2 |
file-dialog-test.yaml |
Save As dialog handling | 6 | GPT-4.1, GPT-5.2 |
screenshot-test.yaml |
Screenshot capture with annotations | 6 | GPT-4.1, GPT-5.2 |
keyboard-mouse-test.yaml |
Keyboard and mouse control | 8 | GPT-4.1, GPT-5.2 |
real-world-workflows-test.yaml |
Multi-step workflow automation | 8 | GPT-4.1, GPT-5.2 |
tests/Sbroenne.WindowsMcp.LLM.Tests/Scenarios/app tool to launch applications LLMs know (not custom paths)tool_called, no_hallucinated_tools, and output_regexSee tests/Sbroenne.WindowsMcp.LLM.Tests/README.md for complete documentation.
var for obvious types, explicit types for clarity#nullable enable)The repository includes .editorconfig for consistent formatting. Most editors will apply these settings automatically.
Before submitting a PR, ensure:
dotnet test)mainUpdate README.md when:
Example:
/// <summary>
/// Sends a mouse click at the specified coordinates.
/// </summary>
/// <param name="x">X coordinate in screen space</param>
/// <param name="y">Y coordinate in screen space</param>
/// <returns>Result indicating success or failure</returns>
public ClickResult Click(int x, int y)
{
// Implementation
}
vscode-extension/
├── src/
│ └── extension.ts # Main extension entry point
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
└── bin/ # Compiled MCP server binaries
cd vscode-extension
# Install dependencies
npm install
# Build TypeScript
npm run compile
# Package VSIX
npm run package
# Run in development mode
npm run watch
Releases are triggered by git tags following semantic versioning:
mcp-v<major>.<minor>.<patch> (e.g., mcp-v1.2.0)vscode-v<major>.<minor>.<patch> (e.g., vscode-v1.2.0)Release workflows automatically:
Before creating a release tag:
mainInclude:
dotnet --version)Include:
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing! 🚀