|
2 | 2 |
|
3 | 3 | We welcome contributions to the Model Context Protocol TypeScript SDK! This document outlines the process for contributing to the project. |
4 | 4 |
|
5 | | -## Getting Started |
| 5 | +## Issues |
| 6 | + |
| 7 | +### Discuss Before You Code |
| 8 | + |
| 9 | +**Open an issue before starting work on new features or significant changes.** We mean a real conversation where we align on approach—not an issue opened five minutes before your PR. |
| 10 | + |
| 11 | +We'll close PRs for undiscussed features regardless of effort invested. Every merged feature becomes ongoing maintenance, so we're selective about what we take on. |
| 12 | + |
| 13 | +Straightforward bug fixes can skip this step. For complex bugs that need significant changes, open an issue first. |
| 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 | +Help us help you: |
| 25 | + |
| 26 | +- Lead with what's broken or what you need |
| 27 | +- Include code we can run to see the problem |
| 28 | +- Keep it short—if it takes a paragraph to explain, it might be too vague |
| 29 | + |
| 30 | +We'll close issues that expect maintainers to do the debugging for you. Obviously AI-generated issues with walls of text and no real content will be closed on sight. |
| 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 | +By the time you open a PR, the "what" and "why" should already be settled in an issue. PRs are for reviewing implementation, not debating whether we should do it. |
| 45 | + |
| 46 | +### Scope |
| 47 | + |
| 48 | +Small PRs get reviewed fast. Large PRs sit in the queue. |
| 49 | + |
| 50 | +We can review a few dozen lines in a few minutes. But a PR touching hundreds of lines across many files takes real effort to verify—and things inevitably slip through. If your change is big, break it into a stack of smaller 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 |
6 | 73 |
|
7 | 74 | 1. Fork the repository |
8 | 75 | 2. Clone your fork: `git clone https://github.com/YOUR-USERNAME/typescript-sdk.git` |
9 | 76 | 3. Install dependencies: `npm install` |
10 | 77 | 4. Build the project: `npm run build` |
11 | 78 | 5. Run tests: `npm test` |
12 | 79 |
|
13 | | -## Development Process |
| 80 | +### Workflow |
14 | 81 |
|
15 | 82 | 1. Create a new branch for your changes |
16 | 83 | 2. Make your changes |
17 | 84 | 3. Run `npm run lint` to ensure code style compliance |
18 | 85 | 4. Run `npm test` to verify all tests pass |
19 | 86 | 5. Submit a pull request |
20 | 87 |
|
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 |
30 | 89 |
|
31 | 90 | - Start the server: `npm run server` |
32 | 91 | - Run the client: `npm run client` |
33 | 92 |
|
34 | | -## Code of Conduct |
| 93 | +## Policies |
| 94 | + |
| 95 | +### Code of Conduct |
35 | 96 |
|
36 | 97 | This project follows our [Code of Conduct](CODE_OF_CONDUCT.md). Please review it before contributing. |
37 | 98 |
|
38 | | -## Reporting Issues |
| 99 | +### Reporting Issues |
39 | 100 |
|
40 | 101 | - Use the [GitHub issue tracker](https://github.com/modelcontextprotocol/typescript-sdk/issues) |
41 | 102 | - Search existing issues before creating a new one |
42 | 103 | - Provide clear reproduction steps |
43 | 104 |
|
44 | | -## Security Issues |
| 105 | +### Security Issues |
45 | 106 |
|
46 | 107 | Please review our [Security Policy](SECURITY.md) for reporting security vulnerabilities. |
47 | 108 |
|
48 | | -## License |
| 109 | +### License |
49 | 110 |
|
50 | 111 | By contributing, you agree that your contributions will be licensed under the MIT License. |
0 commit comments