Thank you for your interest in contributing to the Teamwork MCP Server! 🎉 We welcome contributions of all kinds, including bug fixes, new features, documentation improvements, and examples. This document outlines the process for contributing to the project and helps ensure a smooth collaboration.
- Code of Conduct
- Development Guidelines
- Testing
- Code Style
- Submitting Changes
- Reporting Issues
- Getting Help
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and constructive in all interactions.
Before you begin, ensure you have the following installed:
- Go 1.26 or later - You can check your version with:
go version
- Git - For version control
- A code editor - We recommend VS Code with the Go extension
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/mcp.git cd mcp -
Add the upstream remote to keep your fork in sync:
git remote add upstream https://github.com/teamwork/mcp.git
-
Install dependencies:
go mod tidy
-
Verify the setup by running tests:
TWAPI_SERVER=https://yourdomain.teamwork.com/ TWAPI_TOKEN=your_api_token go test -v ./...
The project is organized as follows:
mcp/
├── cmd/ # Command-line applications
│ ├── mcp-http/ # HTTP server for MCP protocol
│ ├── mcp-http-cli/ # HTTP client CLI tool
│ └── mcp-stdio/ # STDIO server for MCP protocol
├── internal/ # Internal packages
│ ├── auth/ # Authentication and authorization
│ ├── config/ # Configuration management
│ ├── helpers/ # Utility functions
│ ├── request/ # HTTP request utilities
│ ├── toolsets/ # MCP toolset management
│ └── twprojects/ # Teamwork Projects MCP tools
├── examples/ # Usage examples
│ ├── nodejs-langchain/ # Node.js LangChain integration
│ └── python-langchain/ # Python LangChain integration
├── chart/ # Kubernetes Helm chart
├── go.mod # Go module definition
├── go.sum # Go module checksums
├── Makefile # Build automation
└── Dockerfile # Container image definition
-
Create a feature branch from the main branch:
git checkout main git pull upstream main git checkout -b feature/your-feature-name
-
Make your changes following our coding standards
-
Add tests for any new functionality
-
Run tests to ensure everything works:
TWAPI_SERVER=https://yourdomain.teamwork.com/ TWAPI_TOKEN=your_api_token go test -v ./... -
Run linting to check code quality (we use
golangci-lint):golangci-lint -c .golangci.yml run ./...
-
Commit your changes with a descriptive message:
git add . git commit -m "Feature: Add new authentication method"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a pull request on GitHub
Regularly sync your fork with the upstream repository:
git checkout main
git pull upstream main
git push origin mainWe maintain high test coverage to ensure reliability. When contributing:
# Run all tests
TWAPI_SERVER=https://yourdomain.teamwork.com/ TWAPI_TOKEN=your_api_token go test -v ./...
# Run tests with coverage
TWAPI_SERVER=https://yourdomain.teamwork.com/ TWAPI_TOKEN=your_api_token go test -v -cover ./...
# Run tests for a specific package
TWAPI_SERVER=https://yourdomain.teamwork.com/ TWAPI_TOKEN=your_api_token go test -v ./internal/twprojects
# Run a specific test
TWAPI_SERVER=https://yourdomain.teamwork.com/ TWAPI_TOKEN=your_api_token go test -v -run TestSpecificFunction ./internal/twprojects- Unit tests should be placed alongside the code they test (e.g.,
project_test.goforproject.go) - Example tests demonstrate usage and are located in
*_example_test.gofiles
We follow Go best practices and conventions:
- Use
go fmtfor consistent formatting - Use
go vetto catch common mistakes - Consider using
golangci-lintfor additional checks
- Packages: lowercase, single word when possible
- Functions: CamelCase, exported functions start with uppercase
- Variables: camelCase for local variables, CamelCase for exported
- Constants: CamelCase or UPPER_CASE for package-level constants
- All exported functions, types, and constants must have doc comments
- Doc comments should start with the name of the item being documented
- Use complete sentences and proper grammar
- Return errors rather than panicking
- Wrap errors with context using
fmt.Errorfor similar - Use meaningful error messages
-
Title: Use a descriptive title following conventional commits format:
Feature:for new featuresFix:for bug fixesDocs:for documentation changesTest:for test additions/changesRefactor:for code refactoringEnhancement:for improvementsChore:for maintenance tasks
-
Description: Include:
- What changes were made and why
- Any breaking changes
- Related issue numbers (if applicable)
- Screenshots or examples (if relevant)
-
Checklist: Ensure your PR:
- Passes all tests
- Includes tests for new functionality
- Updates documentation if needed
- Follows the project's coding standards
- Has a clear, descriptive title and description
- All PRs require at least one review from a maintainer
- Be responsive to feedback and questions
- Make requested changes promptly
- Keep discussions constructive and professional
When reporting bugs, please include:
- Go version:
go versionoutput - MCP Server version: Version or commit hash being used
- Operating system: e.g., macOS 15.1, Ubuntu 22.04
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Reproduction steps: Minimal code to reproduce the issue
- Error messages: Full error output if applicable
When requesting features:
- Use case: Describe the problem you're trying to solve
- Proposed solution: How you think it should work
- Alternatives: Other solutions you've considered
- API compatibility: Consider impact on existing users
If you need help or have questions:
- GitHub Discussions: Ask questions and discuss ideas
- GitHub Issues: Report bugs or request features
- Documentation: Check the API documentation and examples
Contributors will be recognized in our changelog. Thank you for helping make this project better! 🙏