Thank you for your interest in contributing! This guide will help you set up your development environment and test your changes locally before pushing to GitHub.
- Node.js 18 or higher
-
Clone the repository
git clone https://github.com/zcube/penpot-mcp-server.git cd penpot-mcp-server -
Install dependencies
npm install
-
Build the project
npm run build
-
Run in development mode
npm run dev
# Set environment variables
export PENPOT_API_URL="https://design.penpot.app"
export PENPOT_ACCESS_TOKEN="your-token-here"
# Run tests
npm testSee TESTING.md for more details on setting up test environment.
The repository is fork-friendly. CI/CD workflows will run on your fork, but deployment steps (Docker push, NPM publish) are disabled by default to prevent accidents.
To enable integration tests against a Penpot server in your fork:
-
Create the
penpot-testenvironment in your fork:- Go to your fork's Settings → Environments
- Click "New environment"
- Name it exactly:
penpot-test
-
Add Penpot secrets to the environment:
PENPOT_API_URL: Your Penpot server URL (e.g.,https://design.penpot.app)PENPOT_ACCESS_TOKEN: Your Penpot access token
Without this environment, integration tests will skip gracefully and the workflow will pass.
To push Docker images from your fork:
- Go to Settings → Secrets and variables → Actions
- Add repository secret:
- Name:
DOCKER_PUSH_ENABLED - Value:
true
- Name:
This enables pushing to your fork's GitHub Container Registry.
Before pushing your changes to GitHub, test them locally to catch issues early:
# Build the project
npm run build
# Run tests (requires Penpot credentials)
export PENPOT_API_URL="https://design.penpot.app"
export PENPOT_ACCESS_TOKEN="your-token"
npm testMake sure you have set the required environment variables:
export PENPOT_API_URL="https://design.penpot.app"
export PENPOT_ACCESS_TOKEN="your-token"See TESTING.md for how to get your access token.
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Test locally: Run build and tests (see above)
- Commit your changes:
git commit -am 'Add my feature' - Push to your fork:
git push origin feature/my-feature - Create a Pull Request
- Follow existing TypeScript conventions
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
- Keep functions small and focused
- Write tests for new features
Follow conventional commits format:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test changesrefactor:Code refactoringchore:Maintenance tasks
Example:
feat: Add support for component variants
- Implement component variant creation
- Add tests for variant operations
- Update documentation
- Open an issue for bugs or feature requests
- Join discussions for questions
- Check existing issues before creating new ones
Thank you for contributing! 🎉