Thank you for your interest in contributing! This document provides guidelines and instructions for contributing.
- Python 3.10 or higher
- A GoodData account with API access
-
Clone the repository:
git clone https://github.com/aalexmrt/gooddata-mcp-server.git cd gooddata-mcp-server -
Create and activate a virtual environment:
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install in development mode with dev dependencies:
pip install -e ".[dev,mcp]" -
Set up your environment:
cp .env.example .env # Edit .env with your GoodData credentials
This project uses Ruff for linting and formatting.
# Check for issues
ruff check .
# Auto-fix issues
ruff check --fix .
# Format code
ruff format .- Keep functions focused and single-purpose
- Add docstrings to all public functions
- Use type hints for function parameters and return values
- Follow the existing code patterns in the project
-
Create a branch from
main:git checkout -b feature/your-feature-name
-
Make your changes with clear, focused commits
-
Push your branch and open a Pull Request
Write clear, concise commit messages:
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
- Keep the first line under 72 characters
Examples:
Add workspace filtering to list_insights toolFix error handling in export_dashboard_pdfUpdate README with new installation instructions
- Title: Use a clear, descriptive title
- Description: Explain what changes you made and why
- Testing: Describe how you tested your changes
- Breaking changes: Note any breaking changes
- Code follows the project style guidelines
- Self-reviewed the code
- Added/updated docstrings for new/changed functions
- Tested changes locally with a real GoodData instance
- Updated README if adding new features
When reporting issues, please include:
- Description: Clear description of the problem
- Steps to reproduce: How to trigger the issue
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Environment: Python version, OS, GoodData SDK version
When adding new tools to the MCP server:
- Add the function in
src/gooddata_cli/mcp_server.py - Use the
@mcp.tool()decorator - Include a comprehensive docstring (this becomes the tool description)
- Keep operations read-only (this is a design principle of this project)
- Handle errors gracefully and return meaningful error messages
- Update the README's tool table
Example:
@mcp.tool()
def my_new_tool(workspace_id: str | None = None) -> str:
"""Short description of what the tool does.
Longer description with details about the tool's behavior.
Args:
workspace_id: The workspace ID. Uses GOODDATA_WORKSPACE env var if not provided.
Returns:
JSON string with the results.
"""
sdk = _get_sdk()
ws_id = _get_workspace_id(workspace_id)
# Implementation
result = {"key": "value"}
return json.dumps(result, indent=2)If you have questions, feel free to open an issue with the "question" label.
Thank you for contributing!