|
1 | 1 | # Contributing to MCP TypeScript SDK |
2 | 2 |
|
3 | | -We welcome contributions to the Model Context Protocol TypeScript SDK! This document outlines the process for contributing to the project. |
| 3 | +Welcome, and thanks for your interest in contributing! We're glad you're here. |
4 | 4 |
|
5 | | -## Getting Started |
| 5 | +This document outlines how to contribute effectively to the TypeScript SDK. |
| 6 | + |
| 7 | +## Issues |
| 8 | + |
| 9 | +### Discuss Before You Code |
| 10 | + |
| 11 | +**Please open an issue before starting work on new features or significant changes.** This gives us a chance to align on approach and save you time if we see potential issues. |
| 12 | + |
| 13 | +We'll close PRs for undiscussed features—not because we don't appreciate the effort, but because every merged feature becomes an ongoing maintenance burden for our small team of volunteer maintainers. Talking first helps us figure out together whether something belongs in the |
| 14 | +SDK. |
| 15 | + |
| 16 | +Straightforward bug fixes (a few lines of code with tests demonstrating the fix) can skip this step. For complex bugs that need significant changes, consider opening an issue first. |
| 17 | + |
| 18 | +### What Counts as "Significant"? |
| 19 | + |
| 20 | +- New public APIs or classes |
| 21 | +- Architectural changes or refactoring |
| 22 | +- Changes that touch multiple modules |
| 23 | +- Features that might require spec changes (these need a [SEP](https://github.com/modelcontextprotocol/modelcontextprotocol) first) |
| 24 | + |
| 25 | +### Writing Good Issues |
| 26 | + |
| 27 | +Help us help you: |
| 28 | + |
| 29 | +- Lead with what's broken or what you need |
| 30 | +- Include code we can run to see the problem |
| 31 | +- Keep it focused—a clear problem statement goes a long way |
| 32 | + |
| 33 | +We're a small team, so issues that include some upfront debugging help us move faster. Low-effort or obviously AI-generated issues will be closed. |
| 34 | + |
| 35 | +### Finding Issues to Work On |
| 36 | + |
| 37 | +| Label | For | Description | |
| 38 | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | --------------------------------------------- | |
| 39 | +| [`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 | |
| 40 | +| [`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 | |
| 41 | +| [`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 | |
| 42 | + |
| 43 | +Issues labeled `needs confirmation`, `needs repro`, or `needs design` are **not** ready for work—wait for maintainer input before starting. |
| 44 | + |
| 45 | +Before starting work, comment on the issue so we can assign it to you. This lets others know and avoids duplicate effort. |
| 46 | + |
| 47 | +## Pull Requests |
| 48 | + |
| 49 | +By the time you open a PR, the "what" and "why" should already be settled in an issue. This keeps PR reviews focused on implementation rather than revisiting whether we should do it at all. |
| 50 | + |
| 51 | +### Scope |
| 52 | + |
| 53 | +Small PRs get reviewed fast. Large PRs sit in the queue. |
| 54 | + |
| 55 | +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 or get clear alignment from a maintainer on your |
| 56 | +approach in an issue before submitting a large PR. |
| 57 | + |
| 58 | +### What Gets Rejected |
| 59 | + |
| 60 | +PRs may be rejected for: |
| 61 | + |
| 62 | +- **Lack of prior discussion** — Features or significant changes without an approved issue |
| 63 | +- **Scope creep** — Changes that go beyond what was discussed or add unrequested features |
| 64 | +- **Misalignment with SDK direction** — Even well-implemented features may be rejected if they don't fit the SDK's goals |
| 65 | +- **Insufficient quality** — Code that doesn't meet clarity, maintainability, or style standards |
| 66 | +- **Overengineering** — Unnecessary complexity or abstraction for simple problems |
| 67 | + |
| 68 | +### Submitting Your PR |
| 69 | + |
| 70 | +1. Follow the existing code style |
| 71 | +2. Include tests for new functionality |
| 72 | +3. Update documentation as needed |
| 73 | +4. Keep changes focused and atomic |
| 74 | +5. Provide a clear description of changes |
| 75 | + |
| 76 | +## Development |
| 77 | + |
| 78 | +### Getting Started |
6 | 79 |
|
7 | 80 | 1. Fork the repository |
8 | 81 | 2. Clone your fork: `git clone https://github.com/YOUR-USERNAME/typescript-sdk.git` |
9 | 82 | 3. Install dependencies: `npm install` |
10 | 83 | 4. Build the project: `npm run build` |
11 | 84 | 5. Run tests: `npm test` |
12 | 85 |
|
13 | | -## Development Process |
| 86 | +### Workflow |
14 | 87 |
|
15 | 88 | 1. Create a new branch for your changes |
16 | 89 | 2. Make your changes |
17 | 90 | 3. Run `npm run lint` to ensure code style compliance |
18 | 91 | 4. Run `npm test` to verify all tests pass |
19 | 92 | 5. Submit a pull request |
20 | 93 |
|
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 |
| 94 | +### Running Examples |
30 | 95 |
|
31 | 96 | - Start the server: `npm run server` |
32 | 97 | - Run the client: `npm run client` |
33 | 98 |
|
34 | | -## Code of Conduct |
| 99 | +## Policies |
| 100 | + |
| 101 | +### Code of Conduct |
35 | 102 |
|
36 | 103 | This project follows our [Code of Conduct](CODE_OF_CONDUCT.md). Please review it before contributing. |
37 | 104 |
|
38 | | -## Reporting Issues |
| 105 | +### Reporting Issues |
39 | 106 |
|
40 | 107 | - Use the [GitHub issue tracker](https://github.com/modelcontextprotocol/typescript-sdk/issues) |
41 | 108 | - Search existing issues before creating a new one |
42 | 109 | - Provide clear reproduction steps |
43 | 110 |
|
44 | | -## Security Issues |
| 111 | +### Security Issues |
45 | 112 |
|
46 | 113 | Please review our [Security Policy](SECURITY.md) for reporting security vulnerabilities. |
47 | 114 |
|
48 | | -## License |
| 115 | +### License |
49 | 116 |
|
50 | 117 | By contributing, you agree that your contributions will be licensed under the MIT License. |
0 commit comments