Contributing
Thank you for your interest in contributing to the AT Protocol MCP Server!
This document provides guidelines and information for contributors. For detailed contribution guidelines, see CONTRIBUTING.md in the repository root.
Quick Start
1. Fork and Clone
bash
# Fork the repository on GitHub
# Then clone your fork
git clone https://github.com/YOUR_USERNAME/atproto-mcp.git
cd atproto-mcp
2. Install Dependencies
bash
# Using pnpm (recommended)
pnpm install
# Or using npm
npm install
3. Create a Branch
bash
git checkout -b feature/your-feature-name
4. Make Changes
- Follow the coding standards
- Write tests for new features
- Update documentation
5. Test Your Changes
bash
# Run tests
pnpm test
# Run linter
pnpm run lint
# Check types
pnpm run type-check
# Format code
pnpm run format
6. Commit and Push
bash
# Commit with conventional commit message
git commit -m "feat: add new feature"
# Push to your fork
git push origin feature/your-feature-name
7. Create Pull Request
- Go to GitHub and create a pull request
- Fill out the pull request template
- Wait for review and address feedback
Development Workflow
Branch Strategy
main
- Production-ready codedevelop
- Integration branch for featuresfeature/*
- New featuresfix/*
- Bug fixesdocs/*
- Documentation updates
Commit Messages
We use Conventional Commits:
feat: add new AT Protocol tool
fix: resolve authentication issue
docs: update API documentation
style: format code with prettier
refactor: simplify error handling
test: add tests for search tool
chore: update dependencies
What to Contribute
Good First Issues
Look for issues labeled good first issue
:
- Documentation improvements
- Test coverage
- Bug fixes
- Code examples
Feature Requests
Before implementing a new feature:
- Check existing issues and discussions
- Create a feature request issue
- Discuss the approach
- Get approval from maintainers
- Implement and submit PR
Bug Reports
When reporting bugs:
- Use the bug report template
- Provide clear reproduction steps
- Include environment information
- Add relevant logs (sanitize credentials!)
- Describe expected vs actual behavior
Code Standards
TypeScript
- Use strict TypeScript configuration
- Provide explicit return types
- Use proper error handling
- Follow existing patterns
Testing
- Write unit tests for all new functions
- Write integration tests for tools
- Aim for >80% code coverage
- Use descriptive test names
Documentation
- Update README for new features
- Add JSDoc comments for public APIs
- Include code examples
- Update API reference
Testing
Running Tests
bash
# All tests
pnpm test
# Watch mode
pnpm test --watch
# Coverage
pnpm run test:coverage
# UI mode
pnpm run test:ui
Writing Tests
typescript
describe('createPost tool', () => {
it('should create a post successfully', async () => {
// Arrange
const mockAgent = createMockAtpAgent();
const tool = new CreatePostTool(mockAgent);
// Act
const result = await tool.execute({ text: 'Hello!' });
// Assert
expect(result.success).toBe(true);
expect(result.data.uri).toBeDefined();
});
});
Documentation
Types of Documentation
- Code Documentation - JSDoc comments
- User Documentation - Guides and tutorials
- API Documentation - Tool and resource reference
- Examples - Working code examples
Documentation Site
The documentation site uses VitePress:
bash
# Start dev server
pnpm run docs:dev
# Build documentation
pnpm run docs:build
# Preview build
pnpm run docs:preview
Code Review
For Contributors
- Ensure all tests pass
- Follow coding standards
- Write clear commit messages
- Respond to feedback promptly
- Keep PRs focused and small
For Reviewers
- Review for correctness and style
- Test changes locally
- Provide constructive feedback
- Approve when ready
Community
Code of Conduct
- Be respectful and inclusive
- Help others learn and grow
- Share knowledge and best practices
- Follow our Code of Conduct
Communication
- Issues: Bug reports and feature requests
- Discussions: Questions and ideas
- Pull Requests: Code contributions
- Email: Security issues only
Resources
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to the AT Protocol MCP Server! 🎉