Contributing to GitMCP
April 3, 2025 ยท View on GitHub
First of all, thank you for your interest in contributing to GitMCP! We appreciate the time and effort you're willing to invest in improving the project. This document provides guidelines and information to make the contribution process as smooth as possible.
Table of Contents
Getting Started
- Fork the repository and clone it to your local machine.
- Set up the development environment.
- Explore the codebase, run tests, and verify that everything works as expected.
Local Development
Prerequisites
Before you start working on GitMCP, make sure you have the following installed:
Setting Up Your Development Environment
-
Clone your forked repository:
git clone https://github.com/your-username/git-mcp.git cd git-mcp -
Install dependencies:
pnpm install -
Set up environment variables:
- Create a
.env.localfile in the root directory - Add any necessary environment variables (ask project maintainers if you need access to specific API keys)
- Create a
Running the Project Locally
To start the development server:
pnpm vercel dev
This will start the Next.js development server, typically at http://localhost:3000.
For running with the MCP Inspector (useful for debugging MCP endpoints):
pnpm run inspector
Testing
To run tests:
pnpm test
GitMCP uses Vitest as the testing framework. When adding new features, please include appropriate tests.
Code Formatting
GitMCP uses Prettier for code formatting and lint-staged to ensure code is properly formatted before committing. Pre-commit hooks are set up with Husky to run these checks automatically.
To manually format your code:
pnpm prettier --write .
Development Workflow
- Create a new branch for your feature/bugfix
- Make your changes
- Add tests for your changes when applicable
- Run the tests to ensure they pass
- Commit your changes following the commit message guidelines
- Push your branch and open a pull request
Project Structure
api/: Contains the server-side code and MCP implementationtools/: MCP tools implementationutils/: Utility functions for the API
app/: Next.js app directory with React componentspages/: Additional Next.js pagespublic/: Static assetsshared/: Shared utilities used across the codebase
How to Contribute
Reporting Bugs
If you encounter a bug or issue while using GitMCP, please open a new issue on the GitHub Issues page. Provide a clear and concise description of the problem, steps to reproduce it, and any relevant error messages or logs.
Suggesting Enhancements
We welcome ideas for improvements and new features. To suggest an enhancement, open a new issue on the GitHub Issues page. Describe the enhancement in detail, explain the use case, and outline the benefits it would bring to the project.
Submitting Pull Requests
- Create a new branch for your feature or bugfix. Use a descriptive name like
feature/your-feature-nameorfix/your-bugfix-name. - Make your changes, following the Style Guidelines below.
- Test your changes and ensure that they don't introduce new issues or break existing functionality.
- Commit your changes, following the commit message guidelines.
- Push your branch to your fork on GitHub.
- Open a new pull request against the
mainbranch of the Wolverine repository. Include a clear and concise description of your changes, referencing any related issues.
Style Guidelines
Code Style
GitMCP uses ESLint as its code style guide. Please ensure that your code follows these guidelines.
Commit Messages
Write clear and concise commit messages that briefly describe the changes made in each commit. Use the imperative mood and start with a capitalized verb, e.g., "Add new feature" or "Fix bug in function".
Additional Resources
Thank you once again for your interest in contributing to GitMCP. We look forward to collaborating with you and creating an even better project together!