Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Coding Standards
- Testing
- Submitting Changes
- Project Structure
We are committed to providing a welcoming and inspiring community for all. Please be respectful and constructive in your interactions.
- Use welcoming and inclusive language
- Be respectful of differing viewpoints
- Accept constructive criticism gracefully
- Focus on what is best for the community
- Show empathy towards others
- Node.js 18.0.0 or higher
- npm or yarn
- Git
- A Respond.io account for testing
- Basic understanding of TypeScript and MCP protocol
- Check the Issues page
- Look for issues tagged with
good first issueorhelp wanted - Comment on the issue to let others know you're working on it
- If you have a new feature idea, open an issue first to discuss it
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/respond-io/mcp-server.git
cd mcp-server
# Add upstream remote
git remote add upstream https://github.com/respond-io/mcp-server.gitnpm installcp .env.example .env
# Edit .env and add your test API keynpm run buildnpm run devgit checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fixBranch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test additions or modifications
- Write clean, readable code
- Follow the existing code style
- Add comments for complex logic
- Update documentation as needed
# Type check
npm run type-check
# Lint
npm run lint
# Format
npm run format
# Build
npm run buildgit add .
git commit -m "feat: add new feature"Commit message format:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Test changeschore:- Build process or auxiliary tool changes
-
Use TypeScript strict mode
- All code must pass strict type checking
- Avoid
anytypes when possible - Use proper type annotations
-
Follow naming conventions
camelCasefor variables and functionsPascalCasefor classes and typesUPPER_SNAKE_CASEfor constants- Prefix interfaces with
Iif needed for clarity
-
Use the
Toolinterface for creating new tools- All tools should implement the
Toolinterface to ensure consistency.
- All tools should implement the
-
Write self-documenting code
- Use descriptive variable and function names
- Add JSDoc comments for public APIs
- Keep functions small and focused
We use ESLint and Prettier for code formatting:
# Check linting
npm run lint
# Auto-fix linting issues
npm run lint:fix
# Format code
npm run format/**
* Validates a contact identifier
* @param identifier - Contact identifier string
* @returns Validation result with errors if any
*/
export function validateIdentifier(identifier: string): ValidationResult {
const errors: string[] = [];
if (!identifier) {
errors.push("Identifier is required");
return { valid: false, errors };
}
const isValid =
REGEX_PATTERNS.IDENTIFIER_ID.test(identifier) ||
REGEX_PATTERNS.IDENTIFIER_EMAIL.test(identifier) ||
REGEX_PATTERNS.IDENTIFIER_PHONE.test(identifier);
if (!isValid) {
errors.push(ERROR_MESSAGES.INVALID_IDENTIFIER);
}
return { valid: errors.length === 0, errors };
}- Build the project:
npm run build - Configure Claude Desktop with your local build
- Test all modified functionality
- Verify error handling works correctly
Before submitting:
- All TypeScript compiles without errors
- ESLint passes without warnings
- Code is properly formatted with Prettier
- All new functions have proper type annotations
- Error handling is implemented
- Documentation is updated
# Fetch latest changes from upstream
git fetch upstream
git rebase upstream/maingit push origin feature/your-feature-name- Go to your fork on GitHub
- Click "New Pull Request"
- Select your branch
- Fill out the PR template:
## Description
Brief description of what this PR does
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
How was this tested?
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] No new warnings generated- Respond to all review comments
- Make requested changes
- Push updates to your branch (PR will update automatically)
mcp-server/
├── src/
│ ├── index.ts # Main server entry point
│ ├── types.ts # Type definitions
│ ├── constants.ts # Constants and enums
│ ├── utils/ # Utility functions
│ ├── middlewares/ # Express middlewares
│ └── tools/ # Tool definitions
├── dist/ # Compiled JavaScript
├── .env.example # Environment template
├── .eslintrc.json # ESLint configuration
├── .prettierrc.json # Prettier configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Project dependencies
└── README.md # Project documentation
When adding a new tool:
- Define the tool in
index.ts:
{
name: "your_tool_name",
description: "Clear description of what it does",
inputSchema: {
type: "object",
properties: {
// Define parameters
},
required: ["param1"]
}
}- Add types in
types.ts:
export interface YourToolArgs {
param1: string;
param2?: number;
}- Add validation in
validators.ts:
export function validateYourToolArgs(args: YourToolArgs): ValidationResult {
// Validation logic
}- Implement the handler:
const executeYourTool = async (name: string, args: YourToolArgs) => {
// Implementation
};- Update documentation in README.md as needed
Update documentation when:
- Adding new features or tools
- Changing existing behavior
- Fixing bugs that affect usage
- Adding configuration options
- README.md – Overview, features, tool list, and usage examples
- SETUP_GUIDE.md – Detailed setup instructions
- CONTRIBUTING.md – This file
- Code comments – For complex logic
If you need help:
- Check existing documentation
- Search closed issues
- Ask in discussions
- Open a new issue with the
questionlabel
Contributors will be recognized in:
- README.md contributors section
- Release notes
- GitHub contributors page
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT License).
Thank you for contributing to Respond.io MCP Server! 🎉