CONTRIBUTING.md•7.5 kB
# Contributing to Advanced PocketBase MCP Server
Thank you for your interest in contributing to the Advanced PocketBase MCP Server! This project aims to provide the most comprehensive PocketBase integration for the Model Context Protocol, enabling full-stack SaaS development with PocketBase, Stripe, and email automation.
## 🚀 Project Vision
We're building the ultimate MCP server for modern web development, providing:
- Complete PocketBase database operations
- Comprehensive Stripe payment processing (40+ tools)
- Full email automation and templating
- Full-stack SaaS automation workflows
- Production-ready backend solutions
## 📋 Ways to Contribute
### 1. **Code Contributions**
- Add new MCP tools for existing services
- Integrate new services (AWS, Twilio, etc.)
- Improve existing functionality
- Fix bugs and optimize performance
- Enhance TypeScript types and documentation
### 2. **Documentation**
- Improve README and setup guides
- Add usage examples and tutorials
- Create video guides or blog posts
- Translate documentation
### 3. **Testing & Quality Assurance**
- Report bugs with detailed reproduction steps
- Test new features and provide feedback
- Create automated tests
- Performance testing and optimization
### 4. **Community Support**
- Answer questions in GitHub Discussions
- Help other users with setup and configuration
- Share use cases and success stories
- Create templates and boilerplates
## 🛠️ Development Setup
### Prerequisites
- Node.js 18+
- TypeScript knowledge
- PocketBase instance (for testing)
- Git
### Local Development
```bash
# Fork and clone the repository
git clone https://github.com/your-username/advanced-pocketbase-mcp-server.git
cd advanced-pocketbase-mcp-server
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Build the project
npm run build
# Run in development
npm run dev
```
### Project Structure
```
src/
├── index.ts # Main MCP server and tool registration
├── server.ts # Server configuration and startup
├── services/ # Service integrations
│ ├── email.ts # Email service (SMTP/SendGrid)
│ └── stripe.ts # Stripe payment processing
└── types/ # TypeScript type definitions
```
## 📝 Contribution Guidelines
### Code Style
- Use TypeScript with strict typing
- Follow existing code patterns and naming conventions
- MCP tools should be named: `service_action_description`
- Include comprehensive error handling
- Add JSDoc comments for public APIs
### Commit Messages
Follow [Conventional Commits](https://www.conventionalcommits.org/):
```
feat: add stripe subscription management tools
fix: resolve email template variable substitution
docs: update README with new Stripe features
test: add unit tests for email service
```
### Pull Request Process
1. **Fork** the repository
2. **Create** a feature branch: `git checkout -b feature/your-feature-name`
3. **Make** your changes with tests
4. **Update** documentation if needed
5. **Test** thoroughly with your changes
6. **Submit** a pull request with a clear description
### Pull Request Template
```markdown
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
- [ ] Service integration
## Testing
- [ ] Tested locally
- [ ] Added/updated tests
- [ ] Tested with real services (if applicable)
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] Breaking changes documented
```
## 🏗️ Adding New Services
We welcome integrations with new services! Here's how to add one:
### 1. Service Research
- Study the service API documentation
- Identify key features and use cases
- Check authentication requirements
- Understand rate limits and constraints
### 2. Implementation Structure
```typescript
// src/services/newservice.ts
export class NewService {
constructor(private config: NewServiceConfig) {}
async someAction(params: ActionParams): Promise<ActionResult> {
// Implementation
}
}
```
### 3. MCP Tool Registration
```typescript
// In src/index.ts
if (this.newService) {
this.server.tool(
'newservice_action_name',
{
// Zod schema for parameters
},
async (params) => {
// Tool implementation
}
);
}
```
### 4. Documentation
- Add service configuration to README
- Include usage examples
- Document all new MCP tools
- Add environment variable documentation
## 🧪 Testing
### Manual Testing
- Test with real service APIs (use test/sandbox modes)
- Verify error handling with invalid inputs
- Test edge cases and rate limiting
- Validate response formatting
### Automated Testing
```bash
# Run tests
npm test
# Run type checking
npm run type-check
# Build verification
npm run build
```
## 📚 Service Integration Priorities
**High Priority:**
- AWS Services (SES, S3, Lambda)
- Twilio (SMS, WhatsApp)
- SendGrid (enhanced features)
- Mailgun
- Discord/Slack webhooks
**Medium Priority:**
- Google Cloud services
- Firebase integration
- Analytics services
- Social media APIs
**Low Priority:**
- Specialized/niche services
- Services with complex setup requirements
## 🔧 Adding Stripe Features
Since we have comprehensive Stripe integration, consider:
- New Stripe API endpoints
- Enhanced webhook handling
- Better error responses
- Additional automation workflows
## 📖 Documentation Standards
### Code Documentation
```typescript
/**
* Creates a new email template in the system
* @param templateData - The template configuration
* @returns Promise resolving to the created template
* @throws {EmailServiceError} When template creation fails
*/
async createTemplate(templateData: TemplateData): Promise<Template> {
// Implementation
}
```
### README Updates
- Keep feature lists updated
- Add new configuration options
- Include working examples
- Update version numbers
## 🎯 Quality Standards
### Code Quality
- TypeScript strict mode compliance
- Comprehensive error handling
- Input validation with Zod schemas
- Consistent response formatting
- Performance considerations
### User Experience
- Clear, descriptive tool names
- Helpful error messages
- Comprehensive parameter documentation
- Working examples in documentation
## 🚨 Security Considerations
- Never commit API keys or secrets
- Validate all user inputs
- Use secure authentication methods
- Follow service-specific security best practices
- Audit dependencies regularly
## 🤝 Community
### Getting Help
- 💬 **GitHub Discussions** for questions and ideas
- 🐛 **GitHub Issues** for bugs and feature requests
- 📖 **Documentation** for setup and usage guides
### Code of Conduct
- Be respectful and inclusive
- Provide constructive feedback
- Help others learn and grow
- Focus on technical merit
- Maintain professional communication
## 🏆 Recognition
Contributors will be:
- Listed in the project README
- Mentioned in release notes
- Credited in documentation
- Invited to maintainer discussions
## 📞 Contact
- **Issues**: Use GitHub Issues
- **Discussions**: Use GitHub Discussions
- **Security**: Email security issues privately
---
**Thank you for contributing to making this the best MCP server for full-stack development!** 🚀
Every contribution, no matter how small, helps build better tools for the developer community.