Thank you for your interest in contributing to LeadMagic MCP Server! This guide will help you get started with contributing to our project.
- Getting Started
- Development Setup
- Contributing Process
- Code Standards
- Testing Guidelines
- Documentation
- Issue Guidelines
- Pull Request Process
- Release Process
- Community
- 🐛 Bug Reports: Help us identify and fix issues
- 💡 Feature Requests: Suggest new features and improvements
- 📝 Documentation: Improve our docs, examples, and guides
- 🧪 Testing: Help test new features and bug fixes
- 💻 Code: Implement new features or fix bugs
- 🎨 Design: Improve UX/UI of our tools and documentation
- 🌐 Translation: Help translate documentation
- 💬 Community: Help others in discussions and issues
Look for issues labeled:
good first issue- Perfect for newcomershelp wanted- We need community helpdocumentation- Documentation improvementsbug- Bug fixes
- 📦 Node.js: 18.0.0 or higher
- 🔑 LeadMagic API Key: Get one from leadmagic.io
- 🐙 Git: For version control
- 📝 Code Editor: VS Code, Cursor, or your preferred editor
# 1. Fork and clone the repository
git clone https://github.com/LeadMagic/leadmagic-mcp.git
cd leadmagic-mcp
# 2. Install dependencies
npm install
# 3. Create environment file
cp .env.example .env
# Edit .env and add your LEADMAGIC_API_KEY
# 4. Build the project
npm run build
# 5. Run validation
npm run validate
# 6. Test the server
npm run dev# 🏗️ Build project
npm run build
# 🔍 Type checking
npm run type-check
# 🎨 Linting
npm run lint
npm run lint:fix
# 🎨 Code formatting
npm run format
npm run format:check
# 🧪 Testing
npm test
npm run test:watch
npm run test:coverage
# ✅ Full validation
npm run validate
# 🔍 MCP Inspector (for testing)
npm run inspectorClick the "Fork" button on GitHub and clone your fork:
git clone https://github.com/LeadMagic/leadmagic-mcp.git
cd leadmagic-mcp
git remote add upstream https://github.com/LeadMagic/leadmagic-mcp.git# Create and switch to a new branch
git checkout -b feature/your-feature-name
# Or for bug fixes
git checkout -b fix/issue-description- Write clear, focused commits
- Follow our code standards
- Add/update tests as needed
- Update documentation
# Run full validation
npm run validate
# Test manually with MCP inspector
npm run inspector
# Test with real MCP clients (Claude, Cursor, etc.)# Push your branch
git push origin feature/your-feature-name
# Create PR on GitHub// ✅ Good
interface EmailRequest {
email: string;
validate_syntax?: boolean;
}
// ❌ Avoid
interface emailrequest {
email: any;
validateSyntax: boolean;
}src/
├── types.ts # Type definitions and Zod schemas
├── client.ts # API client implementation
├── server.ts # MCP server with tools
└── index.ts # Entry point
- 📝 Use TypeScript: All code must be typed
- ✅ Validate inputs: Use Zod schemas for validation
- 🛡️ Handle errors: Comprehensive error handling
- 📖 Document code: Clear comments for complex logic
- 🧪 Write tests: Cover new functionality
- 🎨 Follow conventions: Use existing patterns
- ✅ Use
snake_casefor API field names (LeadMagic convention) - ✅ Use
camelCasefor TypeScript variables/functions - ✅ Use
constoverletwhere possible - ✅ Prefer explicit types over
any - ✅ Use meaningful variable names
- ❌ No console.log in production code
- ❌ No unused variables or imports
- Unit Tests: Test individual functions and methods
- Integration Tests: Test API client with LeadMagic
- MCP Tests: Test MCP server functionality
- Manual Tests: Test with real MCP clients
// Example test structure
describe('EmailValidator', () => {
it('should validate correct email format', async () => {
const result = await client.validateEmail({
email: 'test@example.com'
});
expect(result.email_status).toBe('valid');
});
});# Run tests
npm test
# Watch mode for development
npm run test:watch
# Coverage report
npm run test:coverage
# Test specific file
npm test -- email.test.ts- Clear and concise: Easy to understand
- Examples included: Show real usage
- Up to date: Keep in sync with code changes
- Comprehensive: Cover all features
- README.md: Main documentation
- CHANGELOG.md: Version history
- Code comments: Inline documentation
- Issue templates: Contribution guides
- Examples: Usage demonstrations
- Updated README for new features
- Added code comments for complex logic
- Updated CHANGELOG for significant changes
- Included usage examples
- Checked for typos and grammar
Before creating an issue:
- 🔍 Search existing issues
- 📚 Check documentation
- 🧪 Test with latest version
Include:
- 📋 Environment details (OS, Node.js, MCP client)
- 🔄 Steps to reproduce
- 📱 Expected vs actual behavior
- 📋 Error messages/logs
- 🔧 Configuration details (remove API keys!)
Include:
- 🎯 Use case and benefits
- 📝 Detailed description
- 🔧 Implementation ideas (optional)
- 📊 Priority and timeline
Before submitting:
- 🧪 All tests pass
- 📚 Documentation updated
- 🎨 Code follows style guidelines
- ✅ No linting errors
- 🔧 Builds successfully
- 🧹 No debugging code left
Include:
- 📋 Clear description of changes
- 🔗 Related issue numbers
- 🧪 Testing details
- 💥 Breaking changes (if any)
- 📸 Screenshots (if applicable)
- 🤖 Automated checks must pass
- 👥 Code review by maintainers
- ✅ Approval required before merge
- 🔄 Squash and merge preferred
We follow Semantic Versioning:
- Major (1.0.0): Breaking changes
- Minor (1.1.0): New features (backward compatible)
- Patch (1.0.1): Bug fixes
- Update version in
package.json - Update
CHANGELOG.md - Create git tag:
git tag v1.0.0 - Push tag:
git push origin v1.0.0 - GitHub Actions will handle the rest
- 🐙 GitHub Issues: Bug reports, feature requests
- 💬 Discord: Community chat and support
- 📧 Email: support@leadmagic.io
- 🐦 Twitter: @LeadMagic (updates and announcements)
We follow a positive and inclusive approach:
- ✅ Be respectful and constructive
- ✅ Welcome newcomers and questions
- ✅ Focus on technical merit
- ❌ No harassment or discrimination
- ❌ No spam or off-topic content
Contributors are recognized through:
- 📝 CHANGELOG mentions
- 🏆 GitHub contributors list
- 💬 Community shoutouts
- 🎁 LeadMagic swag (for significant contributions)
Need help getting started?
- 📚 Read our documentation
- 💬 Join our Discord community
- 📧 Email us: support@leadmagic.io
- 🐙 Open a GitHub discussion
🎉 Thank you for contributing to LeadMagic MCP Server!
Your contributions help make B2B data enrichment more accessible to developers and AI tools worldwide. 🚀