Thank you for your interest in contributing to ContextMCP! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- Project Structure
- Making Changes
- Submitting Changes
- Coding Standards
- Testing
- Documentation
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/context-mcp.git cd context-mcp - Add the upstream remote:
git remote add upstream https://github.com/dodopayments/context-mcp.git
- Node.js 18 or higher
- npm or yarn
- Git
# Install all dependencies
npm install
# Build all packages
npm run build:cli# Run website locally
npm run dev:website
# Watch CLI for changes
npm run dev:cli
# Type checking
npm run typecheck
# Linting
npm run lint
# Format code
npm run format
# Check formatting
npm run format:checkcontext-mcp/
├── packages/
│ ├── cli/ # CLI scaffolding tool (npm package)
│ ├── template/ # Project template (scaffolded to users)
│ └── website/ # Documentation website
└── deployments/
└── dodopayments/ # Example deployment configuration
packages/cli: ThecontextmcpCLI tool for scaffolding new projectspackages/template: Template files that get copied when users runnpx contextmcp initpackages/website: Next.js documentation site
Create a new branch for your changes:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix
# or
git checkout -b docs/your-docs-updateWe follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting, etc.)refactor:Code refactoringtest:Adding or updating testschore:Maintenance tasks
Example:
feat: add support for custom chunk sizes in markdown parser
- Ensure tests pass (if applicable)
- Run type checking:
npm run typecheck - Run linting:
npm run lint - Format code:
npm run format - Update documentation if needed
-
Update your fork:
git fetch upstream git checkout main git merge upstream/main
-
Push your branch:
git push origin your-branch-name
-
Create a Pull Request on GitHub:
- Use a clear, descriptive title
- Fill out the pull request template
- Reference any related issues
- Add screenshots or examples if applicable
-
Respond to feedback: Be open to suggestions and make requested changes
- Keep PRs focused and reasonably sized
- One feature or fix per PR
- Ensure all CI checks pass
- Request review from maintainers when ready
- Use TypeScript for all code
- Prefer
interfaceovertypefor object shapes - Avoid
any- use proper types orunknown - Use meaningful variable and function names
- Follow existing code patterns
- Use functional programming patterns where appropriate
- Keep functions small and focused
- Add comments for complex logic
- Group related functionality together
- Export from index files when appropriate
- Keep file sizes reasonable
When adding new features or fixing bugs:
- Test your changes locally
- Test edge cases
- Ensure backward compatibility when possible
- Update tests if applicable
- Add JSDoc comments for public APIs
- Document complex algorithms or business logic
- Keep comments up-to-date with code changes
- Update README.md if adding new features
- Update website docs in
packages/website/content/docs/ - Add examples for new features
If you have questions or need help:
- Open an issue for discussion
- Check existing issues and discussions
- Review the documentation at contextmcp.ai/docs
Contributors will be recognized in:
- Release notes
- Project documentation
- GitHub contributors list
Thank you for contributing to ContextMCP! 🎉