Thank you for considering contributing to the eBay MCP Server! This guide will help you get started with development, understand our processes, and make meaningful contributions.
# Start development server (STDIO mode)npm run dev# Start development server (HTTP mode)npm run dev:http# Watch mode for TypeScript compilationnpm run watch# Run tests in watch modenpm run test:watch# Run tests with UI dashboardnpm run test:ui# Check code quality (typecheck + lint + format)npm run check# Format codenpm run format# Generate types from OpenAPI specsnpm run generate:types
// ✅ Good: Use types over interfacestype UserToken = { accessToken: string; refreshToken: string; expiresAt: number;};// ✅ Good: Use native enumsimport { MarketplaceId } from '@/types/ebay-enums.js';// ✅ Good: Include JSDoc comments for complex functions/** * Refresh the user access token using the refresh token * @returns Promise that resolves when token is refreshed * @throws Error if refresh token is expired or invalid */async refreshUserToken(): Promise<void> { // Implementation}// ✅ Good: Use path aliasesimport { EbayOAuthClient } from '@/auth/oauth.js';// ✅ Good: Include file extensions in importsimport { validateSKU } from '@/utils/validation.js';
Code Quality:
Use TypeScript strict mode - All code must compile with strict checks
Validate inputs with Zod schemas - All external inputs must be validated
Follow existing patterns - Maintain consistency with the codebase
Keep functions small and focused - Each function should do one thing well
feat(inventory): add support for inventory item groupsImplement getInventoryItemGroup and related operations:- Add getInventoryItemGroup method- Add createOrReplaceInventoryItemGroup method- Add deleteInventoryItemGroup method- Add Zod validation schemas- Add unit and integration testsCloses #123
# All tests passnpm test# Code is formattednpm run format# Linting passesnpm run lint# Type checking passesnpm run typecheck# Or run all checksnpm run check
## DescriptionBrief description of what this PR does## Type of Change- [ ] Bug fix (non-breaking change which fixes an issue)- [ ] New feature (non-breaking change which adds functionality)- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)- [ ] Documentation update## How Has This Been Tested?Describe the tests you ran to verify your changes## Checklist- [ ] My code follows the style guidelines of this project- [ ] I have performed a self-review of my own code- [ ] I have commented my code, particularly in hard-to-understand areas- [ ] I have made corresponding changes to the documentation- [ ] My changes generate no new warnings- [ ] I have added tests that prove my fix is effective or that my feature works- [ ] New and existing unit tests pass locally with my changes- [ ] Any dependent changes have been merged and published- [ ] I have updated CHANGELOG.md## Related IssuesCloses #(issue number)
# Check for outdated packagesnpm outdated# Update specific packagenpm update package-name# Update all packages (be careful)npm update# After updating, run testsnpm test
# Run tests with debuggernode --inspect-brk ./node_modules/vitest/vitest.mjs run# Run server in debug modenpm run dev -- --inspect# Enable debug loggingDEBUG=* npm run dev