|
| 1 | +# Contributing to MCPcat 🎉 |
| 2 | + |
| 3 | +Thank you for your interest in contributing to MCPcat! We're excited to have you join our community of developers building analytics tools for MCP servers. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +1. **Fork the repository** on GitHub |
| 8 | +2. **Clone your fork** locally: |
| 9 | + ```bash |
| 10 | + git clone https://github.com/YOUR-USERNAME/mcpcat-typescript-sdk.git |
| 11 | + cd mcpcat-typescript-sdk |
| 12 | + ``` |
| 13 | +3. **Install dependencies** using pnpm: |
| 14 | + ```bash |
| 15 | + pnpm install |
| 16 | + ``` |
| 17 | +4. **Create a branch** for your feature or fix: |
| 18 | + ```bash |
| 19 | + git checkout -b feature/your-feature-name |
| 20 | + # or |
| 21 | + git checkout -b fix/your-bug-fix |
| 22 | + ``` |
| 23 | + |
| 24 | +## Development Process |
| 25 | + |
| 26 | +### Making Changes |
| 27 | + |
| 28 | +1. **Write your code** following our TypeScript standards |
| 29 | +2. **Add tests** for new features (required for feature additions) |
| 30 | +3. **Run the test suite** to ensure everything passes: |
| 31 | + ```bash |
| 32 | + pnpm test |
| 33 | + ``` |
| 34 | +4. **Check your code** meets our standards: |
| 35 | + ```bash |
| 36 | + pnpm lint # Run ESLint |
| 37 | + pnpm typecheck # Run TypeScript compiler checks |
| 38 | + ``` |
| 39 | + |
| 40 | +### Commit Conventions |
| 41 | + |
| 42 | +We follow [Conventional Commits](https://www.conventionalcommits.org/). Your commit messages should be structured as: |
| 43 | + |
| 44 | +``` |
| 45 | +<type>: <description> |
| 46 | +
|
| 47 | +[optional body] |
| 48 | +``` |
| 49 | + |
| 50 | +**Types:** |
| 51 | + |
| 52 | +- `feat`: New feature |
| 53 | +- `fix`: Bug fix |
| 54 | +- `docs`: Documentation changes |
| 55 | +- `test`: Adding or updating tests |
| 56 | +- `refactor`: Code change that neither fixes a bug nor adds a feature |
| 57 | +- `chore`: Changes to build process or auxiliary tools |
| 58 | + |
| 59 | +**Examples:** |
| 60 | + |
| 61 | +```bash |
| 62 | +git commit -m "feat: add telemetry exporters for observability" |
| 63 | +git commit -m "fix: handle edge case in session tracking" |
| 64 | +git commit -m "docs: update API documentation" |
| 65 | +``` |
| 66 | + |
| 67 | +## Pull Request Process |
| 68 | + |
| 69 | +1. **Push your changes** to your fork: |
| 70 | + |
| 71 | + ```bash |
| 72 | + git push origin feature/your-feature-name |
| 73 | + ``` |
| 74 | + |
| 75 | +2. **Create a Pull Request** from your fork to our `main` branch |
| 76 | + |
| 77 | +3. **Fill out the PR description** with: |
| 78 | + |
| 79 | + - What changes you've made |
| 80 | + - Why these changes are needed |
| 81 | + - Any relevant context or screenshots |
| 82 | + |
| 83 | +4. **Wait for review** - The MCPcat team will review your PR within 2 business days |
| 84 | + |
| 85 | +5. **Address feedback** if any changes are requested |
| 86 | + |
| 87 | +6. **Celebrate** 🎉 once your PR is merged! |
| 88 | + |
| 89 | +### No Issue Required |
| 90 | + |
| 91 | +You don't need to open an issue before submitting a PR. Feel free to submit pull requests directly with your improvements! |
| 92 | + |
| 93 | +## Good First Issues |
| 94 | + |
| 95 | +Looking for a place to start? Check out issues labeled [`good first issue`](https://github.com/MCPCat/mcpcat-typescript-sdk/labels/good%20first%20issue) - these are great for newcomers to the codebase. |
| 96 | + |
| 97 | +## Testing |
| 98 | + |
| 99 | +- New features **should include tests** to ensure reliability |
| 100 | +- Run tests locally with `pnpm test` |
| 101 | +- We use [Vitest](https://vitest.dev/) for our test suite |
| 102 | +- Test files should be placed next to the code they test with `.test.ts` extension |
| 103 | + |
| 104 | +## Code Quality |
| 105 | + |
| 106 | +Before submitting your PR, ensure your code passes all checks: |
| 107 | + |
| 108 | +```bash |
| 109 | +# Run all checks at once |
| 110 | +pnpm run prepublishOnly |
| 111 | + |
| 112 | +# Or run them individually |
| 113 | +pnpm run build # Build the project |
| 114 | +pnpm test # Run tests |
| 115 | +pnpm lint # Check code style |
| 116 | +pnpm typecheck # Check TypeScript types |
| 117 | +``` |
| 118 | + |
| 119 | +Our CI will run these same checks on your PR. |
| 120 | + |
| 121 | +## Dependencies |
| 122 | + |
| 123 | +While we don't restrict adding new dependencies, they are generally **discouraged** unless absolutely necessary. If you need to add a dependency: |
| 124 | + |
| 125 | +1. Consider if the functionality can be achieved with existing dependencies |
| 126 | +2. Check if the dependency is well-maintained and lightweight |
| 127 | +3. Ensure it's compatible with our MIT license |
| 128 | +4. Add it using pnpm: `pnpm add <package-name>` |
| 129 | + |
| 130 | +## Project Structure |
| 131 | + |
| 132 | +``` |
| 133 | +mcpcat-typescript-sdk/ |
| 134 | +├── src/ # Source code |
| 135 | +│ ├── tests/ # Test files |
| 136 | +│ └── index.ts # Main entry point |
| 137 | +├── dist/ # Built output (generated) |
| 138 | +└── docs/ # Documentation |
| 139 | +``` |
| 140 | + |
| 141 | +## Community |
| 142 | + |
| 143 | +- **Discord**: Join our [Discord server](https://discord.gg/n9qpyhzp2u) for discussions |
| 144 | +- **Documentation**: Visit [docs.mcpcat.io](https://docs.mcpcat.io) for detailed guides |
| 145 | +- **Issues**: Browse [open issues](https://github.com/MCPCat/mcpcat-typescript-sdk/issues) for areas needing help |
| 146 | + |
| 147 | +## Versioning |
| 148 | + |
| 149 | +The MCPcat team handles versioning and releases. Your contributions will be included in the next appropriate release based on semantic versioning principles. |
| 150 | + |
| 151 | +## Recognition |
| 152 | + |
| 153 | +All contributors are recognized in our repository. Your contributions help make MCPcat better for everyone building MCP servers! |
| 154 | + |
| 155 | +## Questions? |
| 156 | + |
| 157 | +If you have questions about contributing, feel free to: |
| 158 | + |
| 159 | +- Ask in our [Discord server](https://discord.gg/n9qpyhzp2u) |
| 160 | +- Open a [discussion](https://github.com/MCPCat/mcpcat-typescript-sdk/discussions) on GitHub |
| 161 | + |
| 162 | +Thank you for contributing to MCPcat! 🐱 |
0 commit comments