Thank you for your interest in contributing to NEAR MCP! This document provides guidelines and instructions for contributing to this project.
- Node.js (v16 or higher)
- Bun (v1.0.0 or higher) - preferred runtime
- Git
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/near-mcp.git cd near-mcp - Add the original repository as an upstream remote:
git remote add upstream https://github.com/nearai/near-mcp.git
- Install dependencies:
npm install # or bun install - Create a branch for your work:
git checkout -b feature/your-feature-name
- Make your changes in your feature branch
- To test you changes locally with the
claudecli, run: If you don't have theclaudecli installed, you can install it with:Then add thenpm install -g @anthropic-ai/claude-cli or bun add -g @anthropic-ai/claude-cli
near-mcptool to theclaudecli:This adds theclaude mcp add near-mcp bun run cli
near-mcptool to theclaudecli from your local build. - Run the TypeScript compiler to check for type errors:
npm run typecheck # or bun run typecheck - Format your code:
npm run format:fix # or bun run format:fix - Run linting:
npm run lint # or bun run lint - Fix any linting issues:
npm run lint:fix # or bun run lint:fix - Build the project:
npm run build # or bun run build
- Update the README.md if needed with details of changes to the interface
- Ensure all checks pass (linting, type checking, tests if applicable)
- Make sure your code follows the existing style guidelines
- Submit a pull request to the
mainbranch - The maintainers will review your PR as soon as possible
- Keep PRs small and focused on a single feature or bug fix
- Write clear commit messages that describe what you've changed
- Add or update tests as necessary
- Document new code based on the project's documentation standards
- Make sure your PR is up-to-date with the latest changes from
main
This project uses ESLint and Prettier to maintain code quality and consistency:
- Follow TypeScript best practices
- Use meaningful variable and function names
- Write comments for complex logic
- Use ES6+ features when appropriate
- Follow the existing patterns in the codebase
We follow conventional commit standards:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools
Example: feat: add account balance retrieval endpoint
If you'd like to request a feature or report a bug:
- First, check if the feature/bug has already been requested/reported in the issues
- If not, create a new issue
- Clearly describe the feature/bug
- For bugs, provide steps to reproduce, expected behavior, and actual behavior
- Add relevant tags
- When adding new features, please include tests
- Run existing tests to make sure your changes don't break existing functionality
- Consider edge cases in your implementation and tests
- Update documentation for any new features or changes to existing features
- Document public APIs with JSDoc comments
- Keep the README.md up-to-date
By contributing to this project, you agree that your contributions will be licensed under the project's license (MIT).
If you have any questions about contributing, please feel free to ask in our community channels or open an issue for clarification.
Thank you for contributing to NEAR MCP!