Thank you for your interest in contributing to the MCP TypeScript Server! We welcome contributions from the community and are pleased to have you join us.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/mcp-typescript.git cd mcp-typescript - Install dependencies:
npm install
- Create a branch for your feature:
git checkout -b feature/your-feature-name
- Node.js 16.0.0 or higher
- npm 7.0.0 or higher
- TypeScript knowledge
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Lint code
npm run lint
# Format code
npm run format# Build and link locally
npm run build
npm link
# Test with Claude Desktop by updating your config
# Then test the MCP server functionality- We use ESLint and Prettier for code formatting
- Run
npm run lint:fixbefore committing - Follow existing code patterns and conventions
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
We follow the Conventional Commits specification:
type(scope): description
feat(compiler): add incremental compilation support
fix(diagnostics): resolve formatting issue with colors
docs(readme): update installation instructions
test(typechecker): add tests for strict mode
Types:
feat: New featurefix: Bug fixdocs: Documentation changestest: Test changesrefactor: Code refactoringchore: Maintenance tasksstyle: Code style changes
- Create a feature branch from
main - Make your changes following our guidelines
- Add tests for new functionality
- Update documentation if needed
- Run tests and ensure they pass
- Submit a pull request with:
- Clear title and description
- Reference any related issues
- Screenshots/examples if applicable
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring
## Testing
- [ ] Tests pass locally
- [ ] Added/updated tests for changes
- [ ] Manual testing completed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes (or marked as such)When filing a bug report, please include:
## Bug Description
Clear description of the bug
## Steps to Reproduce
1. Step one
2. Step two
3. Step three
## Expected Behavior
What you expected to happen
## Actual Behavior
What actually happened
## Environment
- OS: [e.g., macOS 12.0]
- Node.js version: [e.g., 18.0.0]
- TypeScript version: [e.g., 5.3.0]
- MCP TypeScript version: [e.g., 1.0.0]
## Additional Context
Any additional information, logs, screenshots, etc.We welcome feature requests! Please include:
## Feature Description
Clear description of the proposed feature
## Use Case
Why is this feature needed? What problem does it solve?
## Proposed Solution
How should this feature work?
## Alternative Solutions
Other solutions you've considered
## Additional Context
Any additional information or examplestests/
├── unit/ # Unit tests for individual components
├── integration/ # Integration tests for complete flows
├── fixtures/ # Test data and sample TypeScript files
└── helpers/ # Test utilities and helpers
- Use Jest for testing
- Aim for >80% code coverage
- Test both success and error cases
- Use descriptive test names
- Group related tests with
describeblocks
describe('TypeScriptCompiler', () => {
describe('compileFile', () => {
it('should compile a simple TypeScript file', async () => {
const compiler = new TypeScriptCompiler();
const result = await compiler.compileFile({
filePath: './fixtures/simple.ts'
});
expect(result.success).toBe(true);
expect(result.output).toContain('function hello()');
});
it('should handle compilation errors gracefully', async () => {
const compiler = new TypeScriptCompiler();
const result = await compiler.compileFile({
filePath: './fixtures/error.ts'
});
expect(result.success).toBe(false);
expect(result.errors).toHaveLength(1);
expect(result.errors[0].code).toBe('TS2322');
});
});
});- Update the README for user-facing changes
- Add JSDoc comments to public APIs
- Include code examples in documentation
- Keep documentation up-to-date with code changes
/**
* Compiles a TypeScript file to JavaScript
* @param options - Compilation options
* @param options.filePath - Path to the TypeScript file
* @param options.outputDir - Output directory for compiled files
* @param options.sourceMap - Whether to generate source maps
* @returns Promise resolving to compilation result
* @throws {Error} When file is not found or compilation fails
* @example
* ```typescript
* const result = await compiler.compileFile({
* filePath: './src/app.ts',
* outputDir: './dist',
* sourceMap: true
* });
* ```
*/- Performance optimization - Incremental compilation improvements
- Error handling - Better error messages and recovery
- Test coverage - More comprehensive test suites
- Documentation - Examples and tutorials
- IDE integration - LSP support
- Caching improvements - Smart dependency caching
- Configuration validation - Better tsconfig validation
- Platform support - Windows-specific improvements
- Documentation improvements
- Error message enhancements
- Additional test cases
- Code style improvements
Look for issues labeled good first issue, help wanted, or documentation.
Contributors are recognized in:
- GitHub contributors graph
- CHANGELOG.md for significant contributions
- README.md acknowledgments section
- Release notes for major features
- GitHub Discussions - General questions and ideas
- GitHub Issues - Bug reports and feature requests
- Discord - Real-time chat (coming soon)
main- Stable, production-ready codedevelop- Integration branch for featuresfeature/*- Feature developmentbugfix/*- Bug fixesrelease/*- Release preparation
- Features merged to
develop developtested and stabilized- Release branch created from
develop - Final testing and bug fixes
- Merge to
mainand tag release - Publish to npm
Please report security vulnerabilities privately to the maintainers. See SECURITY.md for details.
By contributing to this project, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to MCP TypeScript Server! 🎉