Thank you for your interest in contributing to the Nasdaq Data Link MCP Server! This document provides guidelines for contributing to the project.
- Python 3.13+
- uv package manager
- Git
-
Clone the repository
git clone https://github.com/stefanoamorelli/nasdaq-data-link-mcp.git cd nasdaq-data-link-mcp -
Set up development environment
uv init mcp uv add "mcp[cli]" uv add --group test "pytest>=7.0" "pytest-mock" "pytest-cov"
-
Configure environment variables
cp .env.example .env # Add your Nasdaq Data Link API key to .env -
Install the server in development mode
uv run mcp install nasdaq_data_link_mcp_os/server.py --env-file .env --name "Nasdaq Data Link MCP Server" --with nasdaq-data-link --with pycountry
- Follow PEP 8 guidelines
- Use meaningful variable names and clear function signatures
- Add docstrings to all public functions and classes
- Keep functions focused and single-purpose
- Write tests for all new functionality
- Run tests before submitting changes:
uv run pytest tests/
- Aim for good test coverage of critical functionality
- Use mocking for external API calls in tests
- All tests must pass in CI before merge
- Run linting and formatting:
uv run ruff check nasdaq_data_link_mcp_os/ tests/ uv run ruff format nasdaq_data_link_mcp_os/ tests/
- Run type checking:
uv run mypy nasdaq_data_link_mcp_os/
- Update README.md if adding new features
- Update relevant documentation in
docs/directory - Include usage examples for new tools
- Update the paper.md if changes affect the research description
When filing a bug report, please include:
- Clear description of the issue
- Steps to reproduce the problem
- Expected vs actual behavior
- Python version and environment details
- Relevant error messages or logs
For new features, please:
- Describe the use case and motivation
- Explain how it fits with existing functionality
- Consider backward compatibility
- Provide examples of the desired behavior
-
Create the tool module in the appropriate resource directory:
nasdaq_data_link_mcp_os/resources/[category]/[tool_name].py -
Follow the existing pattern:
- Import required dependencies
- Define tool function with proper type hints
- Add comprehensive error handling
- Include docstring with usage examples
-
Register the tool in
server.py:@server.list_tools() async def list_tools() -> list[Tool]: return [ # ... existing tools Tool( name="your_new_tool", description="Clear description of what the tool does", inputSchema={ "type": "object", "properties": { # Define parameters } } ) ]
-
Add tests in
tests/test_tools.pyor create new test file
- Maintain backward compatibility
- Update documentation and examples
- Add tests for new functionality
- Consider edge cases and error handling
-
Fork the repository and create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes following the guidelines above
-
Test thoroughly:
uv run pytest tests/
-
Update documentation as needed
-
Commit with clear messages:
git commit -m "Add feature: description of what was added" -
Push to your fork and create a pull request:
git push origin feature/your-feature-name
-
Describe your changes in the pull request:
- What was changed and why
- How to test the changes
- Any breaking changes or special considerations
All contributions will be reviewed for:
- Code quality and adherence to project standards
- Test coverage and functionality
- Documentation completeness
- Backward compatibility
- Security considerations
- Be respectful and constructive in discussions
- Help others learn and grow
- Focus on the technical merits of contributions
- Acknowledge the work of others
- Check existing issues for similar problems
- Ask questions in GitHub Discussions
- Reach out to maintainers if needed
By contributing to this project, you agree that your contributions will be licensed under the same MIT License that covers the project.
Contributors will be acknowledged in:
- GitHub contributor list
- Release notes for significant contributions
- README.md for major features
Thank you for helping make financial data more accessible through conversational AI!