Thank you for your interest in contributing to the Model Context Protocol (MCP) C# SDK! This guide provides everything you need to know to contribute effectively.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/modelcontextprotocol/csharp-sdk/llms.txt
Use this file to discover all available pages before exploring further.
One of the easiest ways to contribute is to participate in discussions on GitHub issues. You can also contribute by submitting pull requests with code changes.
Code of Conduct
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.Bugs and Feature Requests
Before reporting a new issue:- Search for existing issues to see if one already exists
- Upvote (👍) existing issues that affect you
- Add a comment with your unique scenarios and requirements
- Open a new issue if you can’t find an existing one
Open an Issue
Report bugs or request features on GitHub
Prerequisites
Before you begin, ensure you have the following installed:Required Tools
- .NET SDK 10.0 or later - Required to build and test the project
- Download from dotnet.microsoft.com/download
- Verify installation:
dotnet --version
The dev container configuration in this repository includes all the necessary tools and SDKs to get started quickly.
Building the Project
From the root directory of the repository, run:Running Tests
Run All Tests
From the root directory, run:Tests requiring Docker
Tests requiring Docker
Some tests require Docker to be installed and running locally. If Docker is not available, those tests will be skipped.
Tests requiring external credentials
Tests requiring external credentials
Some tests require credentials for external services. When these are not available, those tests will be skipped.Use the following environment variables to provide credentials:
AI:OpenAI:ApiKey- OpenAI API Key
Run Tests for a Specific Project
Building the Documentation
This project uses DocFX to generate its conceptual and reference documentation. To view the documentation locally, run the following command from the root directory:http://localhost:8080.
Submitting Pull Requests
We are always happy to see PRs from community members both for bug fixes as well as new features. Here are a few simple rules to follow when you prepare to contribute to our codebase:Finding an Issue to Work On
Issues that are good candidates for first-time contributors are marked with thegood first issue label. Those do not require too much familiarity with the framework and are more novice-friendly.
If you want to contribute a change that is not covered by an existing issue, first open an issue with a description of the change you would like to make and the problem it solves so it can be discussed before a pull request is submitted.
Before Writing Code
For all but the smallest changes, it’s a good idea to create a design document or at least a high-level description of your approach and share it in the issue for feedback before you start coding. This helps ensure that your approach aligns with the project’s goals and avoids wasted effort.Before Submitting the Pull Request
Before submitting a pull request, make sure that it checks the following requirements:Code Style
The code follows the repository’s style guidelines
Tests
Tests are included for new features or bug fixes
Passing Tests
All existing and new tests pass locally
Error Handling
Appropriate error handling has been added
Documentation
Documentation has been updated as needed
During Pull Request Review
A project maintainer will review your pull request and provide feedback.Be prepared to make changes based on feedback. The review process helps maintain code quality and ensures consistency across the project.
Development Workflow
1. Fork and clone the repository
1. Fork and clone the repository
Fork the repository on GitHub and clone your fork locally.
2. Create a branch
2. Create a branch
Create a new branch for your changes.
3. Make your changes
3. Make your changes
Make your changes, following the project’s coding standards and guidelines.
4. Test your changes
4. Test your changes
Run the full test suite to ensure your changes don’t break existing functionality.
5. Commit and push
5. Commit and push
Commit your changes with a clear, descriptive commit message.
6. Open a pull request
6. Open a pull request
Open a pull request on GitHub from your branch to the main repository.
License
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.Next Steps
View Issues
Find an issue to work on
Discussions
Join the conversation
Roadmap
See what’s planned for future releases
Versioning
Understand the versioning policy