Skip to content

Commit c8b1c9a

Browse files
docs: add contribution guidelines for issues and PRs
1 parent 384311b commit c8b1c9a

File tree

1 file changed

+76
-15
lines changed

1 file changed

+76
-15
lines changed

CONTRIBUTING.md

Lines changed: 76 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,110 @@
22

33
We welcome contributions to the Model Context Protocol TypeScript SDK! This document outlines the process for contributing to the project.
44

5-
## Getting Started
5+
## Issues
6+
7+
### Issue First, Code Second
8+
9+
**Open an issue before starting work on new features or significant changes.** This means having an actual discussion and getting alignment—not just opening an issue moments before submitting a PR.
10+
11+
We will close pull requests for features that weren't previously discussed, regardless of the effort invested. Code is cheap to produce but expensive to maintain, and every merged feature creates long-term maintenance burden.
12+
13+
Bug fixes for straightforward bugs can skip this step. For complex bugs requiring significant changes, consider opening an issue first to discuss the approach.
14+
15+
### What Counts as "Significant"?
16+
17+
- New public APIs or classes
18+
- Architectural changes or refactoring
19+
- Changes that touch multiple modules
20+
- Features that might require spec changes (these need a [SEP](https://github.com/modelcontextprotocol/modelcontextprotocol) first)
21+
22+
### Writing Good Issues
23+
24+
Good issues are clear and concise:
25+
26+
- State the problem directly
27+
- Include a minimal reproducible example when applicable
28+
- Skip unnecessary background—get to the point
29+
30+
Issues that transfer burden to maintainers without effort to validate the problem will be closed. LLM-generated issues that are clearly low-effort will be closed immediately.
31+
32+
### Finding Issues to Work On
33+
34+
| Label | For | Description |
35+
|-------|-----|-------------|
36+
| [`good first issue`](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) | Newcomers | Can tackle without deep codebase knowledge |
37+
| [`help wanted`](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) | Experienced contributors | Maintainers probably won't get to this |
38+
| [`ready for work`](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22ready+for+work%22) | Maintainers | Triaged and ready for a maintainer to pick up |
39+
40+
Issues labeled `needs confirmation`, `needs repro`, or `needs design` are **not** ready for work—wait for maintainer input before starting.
41+
42+
## Pull Requests
43+
44+
PRs are not the place to iterate on ideas; that's what issues are for. Only open a PR for work that's already been discussed and aligned.
45+
46+
### Scope
47+
48+
Keep PRs focused and small. A PR that changes 50 lines across 3 files can be reviewed in minutes. A PR that changes 500 lines across 20 files requires hours of careful analysis, creates review bottlenecks, and often hides issues.
49+
50+
If your change is large, break it into smaller, incremental PRs.
51+
52+
### What Gets Rejected
53+
54+
PRs may be rejected for:
55+
56+
- **Lack of prior discussion** — Features or significant changes without an approved issue
57+
- **Scope creep** — Changes that go beyond what was discussed or add unrequested features
58+
- **Misalignment with SDK direction** — Even well-implemented features may be rejected if they don't fit the SDK's goals
59+
- **Insufficient quality** — Code that doesn't meet clarity, maintainability, or style standards
60+
- **Overengineering** — Unnecessary complexity or abstraction for simple problems
61+
62+
### Submitting Your PR
63+
64+
1. Follow the existing code style
65+
2. Include tests for new functionality
66+
3. Update documentation as needed
67+
4. Keep changes focused and atomic
68+
5. Provide a clear description of changes
69+
70+
## Development
71+
72+
### Getting Started
673

774
1. Fork the repository
875
2. Clone your fork: `git clone https://github.com/YOUR-USERNAME/typescript-sdk.git`
976
3. Install dependencies: `npm install`
1077
4. Build the project: `npm run build`
1178
5. Run tests: `npm test`
1279

13-
## Development Process
80+
### Workflow
1481

1582
1. Create a new branch for your changes
1683
2. Make your changes
1784
3. Run `npm run lint` to ensure code style compliance
1885
4. Run `npm test` to verify all tests pass
1986
5. Submit a pull request
2087

21-
## Pull Request Guidelines
22-
23-
- Follow the existing code style
24-
- Include tests for new functionality
25-
- Update documentation as needed
26-
- Keep changes focused and atomic
27-
- Provide a clear description of changes
28-
29-
## Running Examples
88+
### Running Examples
3089

3190
- Start the server: `npm run server`
3291
- Run the client: `npm run client`
3392

34-
## Code of Conduct
93+
## Policies
94+
95+
### Code of Conduct
3596

3697
This project follows our [Code of Conduct](CODE_OF_CONDUCT.md). Please review it before contributing.
3798

38-
## Reporting Issues
99+
### Reporting Issues
39100

40101
- Use the [GitHub issue tracker](https://github.com/modelcontextprotocol/typescript-sdk/issues)
41102
- Search existing issues before creating a new one
42103
- Provide clear reproduction steps
43104

44-
## Security Issues
105+
### Security Issues
45106

46107
Please review our [Security Policy](SECURITY.md) for reporting security vulnerabilities.
47108

48-
## License
109+
### License
49110

50111
By contributing, you agree that your contributions will be licensed under the MIT License.

0 commit comments

Comments
 (0)