Add all required MokoStandards documentation files. Refactor inline sqlfilters strings to use buildSqlFilter() and searchFilter() helpers for safe query construction with proper escaping. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4.9 KiB
Contributing to dolibarr-api-mcp
We appreciate your interest in contributing to this project! This document provides guidelines for contributing.
Table of Contents
- Code of Conduct
- Getting Started
- How to Contribute
- Development Workflow
- Commit Messages
- Pull Request Process
Code of Conduct
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to hello@mokoconsulting.tech.
Getting Started
- Fork the repository
- Clone your fork locally
- Install dependencies:
npm install - Build:
npm run build - Create a new branch for your work
How to Contribute
Reporting Bugs
- Use the Gitea issue tracker
- Describe the bug clearly with steps to reproduce
- Include the Dolibarr version you're connecting to
- Include relevant logs or error messages
Adding New Tools
If you want to add support for a Dolibarr API endpoint not yet covered:
- Check the Dolibarr API Explorer for endpoint details
- Add the tool registration in
src/index.tsfollowing the existing patterns - Update
docs/API.mdwith the new tool's parameter table - Update
README.mdtool listing - Update
CHANGELOG.md
Contributing Code
- Pick an issue or create one
- Fork the repository and create a branch
- Make your changes following the project conventions
- Submit a pull request
Development Workflow
- Ensure your fork is up to date with the main repository
- Create a feature branch from
main - Make your changes
- Test against a Dolibarr instance (use
npm run setupto configure a dev connection) - Build with
npm run buildto catch TypeScript errors - Commit your changes with clear messages
- Push to your fork
- Create a pull request
Commit Messages
Follow the conventional commit format:
<type>(<scope>): <subject>
<body>
<footer>
Types: feat, fix, docs, style, refactor, test, chore, ci, build, perf, revert
Example:
feat(tools): add shipment management tools
Add dolibarr_shipments_list, dolibarr_shipment_get, and
dolibarr_shipment_validate tools for the /shipments API endpoint.
Pull Request Process
- Update documentation for any new tools
- Follow the project's coding style and conventions
- Ensure
npm run buildsucceeds without errors - Update the CHANGELOG.md with your changes
- Request review from maintainers
- Address any feedback promptly
- Once approved, your PR will be merged
Style Guidelines
- Use tabs for indentation
- All source files must include the Moko Consulting copyright header
- Use
snake_casefor local variables (matching Dolibarr API field names) - Use Zod for all tool parameter validation
- Follow the
formatResponse()pattern for consistent error handling
Infrastructure Standards
All repositories in the MokoConsulting org follow these conventions:
Release Tags
Every repo maintains 5 standard release channel tags:
development- Active development buildsalpha- Early internal testingbeta- Broader testing / client UATrelease-candidate- Final QA before productionstable- Production release
Branch Protection
mainis protected; onlyjmillercan push directly- All other contributors must use pull requests
- PRs are automatically reviewed by Claude Code
CI/CD
- Gitea Actions runs all CI workflows
- Workflows live in
.gitea/workflows/
Secrets
All repos have GA_TOKEN and GH_TOKEN as Actions secrets for API access.
Questions?
If you have questions about contributing, feel free to open an issue or contact the maintainers at hello@mokoconsulting.tech.
Revision History
| Date | Version | Author | Notes |
|---|---|---|---|
| 2026-05-07 | 0.0.1 | jmiller | Initial contributing guidelines |