We love your input! We want to make contributing to MCPHub.nvim as easy and transparent as possible.
- Neovim >= 0.8.0
- Node.js >= 18.0.0 (for mcp-hub)
- Basic knowledge of Lua
- Understanding of asynchronous programming
- Familiarity with Neovim plugin development
-
Fork the repo and create your branch from
main
-
Install development dependencies:
# Install mcp-hub globally npm install -g mcp-hub # Install plenary.nvim (required for development) git clone https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
-
Make your changes
-
Test your changes:
- Ensure all existing tests pass
- Add new tests for new functionality
- Test with different Neovim versions if possible
-
Update documentation if needed
-
Create a pull request
Please follow these style guidelines for Lua code:
- Use 2 spaces for indentation
- Use snake_case for function and variable names
- Use PascalCase for module names
- Document functions using LuaDoc comments
- Keep lines under 80 characters when possible
- Use local variables unless global scope is needed
- Add type annotations in comments when helpful
Example:
--- Starts the MCP Hub server
---@param opts table Configuration options
---@return boolean success
local function start_server(opts)
local config = opts or {}
-- Implementation
end
- Update README.md for user-facing changes
- Add docstrings to new functions
- Update vim docs in doc/mcphub.txt if applicable
- Include examples for new features
- Document any breaking changes
- Add tests for new features in
tests/
- Run tests with:
require('plenary.test_harness').test_directory('tests')
- Test both synchronous and asynchronous code paths
- Include error cases in tests
- Create feature branch
- Implement the feature
- Add tests
- Update documentation
- Submit pull request
- Create bug fix branch
- Add test case that reproduces the bug
- Fix the bug
- Verify all tests pass
- Submit pull request
- Update relevant .md files
- Update vim help docs if needed
- Include examples
- Submit pull request
- Update the README.md with details of changes if needed
- Update the CHANGELOG.md with notes under "Unreleased" section
- Update vim help documentation if needed
- The PR will be merged once you have the sign-off of maintainers
- Follow our Code of Conduct
- Be respectful of different viewpoints
- Accept constructive criticism
- Focus on what is best for the community
By contributing, you agree that your contributions will be licensed under the MIT License.