Skip to main content
Glama

Polymarket MCP Server

CONTRIBUTING.mdโ€ข8.05 kB
# Contributing to Polymarket MCP Server Thank you for your interest in contributing to the Polymarket MCP Server! ๐ŸŽ‰ We welcome contributions from the community and are grateful for any help you can provide. --- ## ๐ŸŒŸ How to Contribute There are many ways you can contribute to this project: - ๐Ÿ› **Report Bugs** - Found a bug? Let us know! - โœจ **Suggest Features** - Have an idea? We'd love to hear it! - ๐Ÿ“– **Improve Documentation** - Help make our docs better - ๐Ÿ’ป **Submit Code** - Fix bugs or add features - ๐Ÿงช **Add Tests** - Improve test coverage - ๐Ÿ’ฌ **Help Others** - Answer questions in Discussions - ๐ŸŒ **Translations** - Help translate documentation --- ## ๐Ÿš€ Getting Started ### Development Setup 1. **Fork the repository** ```bash # Click "Fork" button on GitHub ``` 2. **Clone your fork** ```bash git clone https://github.com/YOUR_USERNAME/polymarket-mcp-server.git cd polymarket-mcp-server ``` 3. **Create virtual environment** ```bash python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate ``` 4. **Install with dev dependencies** ```bash pip install -e ".[dev]" ``` 5. **Create a branch** ```bash git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix ``` --- ## ๐Ÿ“ Code Standards ### Python Code Style We follow PEP 8 with some modifications: - **Line length**: 100 characters (not 79) - **Imports**: Group by standard library, third-party, local - **Type hints**: Use type hints for all function signatures - **Docstrings**: Google-style docstrings for all public functions ```python def example_function(param1: str, param2: int) -> dict: """ Brief description of what the function does. Args: param1: Description of param1 param2: Description of param2 Returns: Description of return value Raises: ValueError: When something goes wrong """ pass ``` ### Code Quality Tools Before submitting, run: ```bash # Format code black src/ # Lint ruff check src/ # Type checking (optional but recommended) mypy src/ ``` ### Commit Messages Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification: ``` feat: add new market filtering tool fix: resolve rate limiting issue in trading module docs: update installation instructions test: add tests for portfolio analysis refactor: improve orderbook parsing logic ``` --- ## ๐Ÿงช Testing ### Run Tests ```bash # Run all tests pytest # Run specific test file pytest tests/test_trading_tools.py -v # Run with coverage pytest --cov=polymarket_mcp --cov-report=html # Run only fast tests (skip integration tests) pytest -m "not slow" ``` ### Writing Tests - **All tests must use real Polymarket APIs** (NO MOCKS per project policy) - Use `pytest` framework - Place tests in `/tests/` directory - Name test files `test_*.py` - Each new feature should include corresponding tests Example test structure: ```python import pytest from polymarket_mcp.tools import your_module async def test_your_feature(): """Test description""" result = await your_module.your_function() assert result is not None assert result['key'] == 'expected_value' ``` --- ## ๐Ÿ”€ Pull Request Process ### Before Submitting 1. โœ… **Tests pass** - `pytest` 2. โœ… **Code is formatted** - `black src/` 3. โœ… **No linting errors** - `ruff check src/` 4. โœ… **Documentation updated** - If you changed functionality 5. โœ… **Commits are clean** - Squash if needed ### Submitting 1. **Push your branch** ```bash git push origin feature/your-feature-name ``` 2. **Open Pull Request** - Go to GitHub repository - Click "New Pull Request" - Select your branch - Fill out the PR template 3. **Describe your changes** - What does this PR do? - Why is this change needed? - How was it tested? - Any breaking changes? 4. **Wait for review** - Maintainers will review your PR - Address any feedback - Once approved, it will be merged! ### PR Title Format ``` feat: add XYZ feature fix: resolve ABC bug docs: improve XYZ documentation test: add tests for ABC refactor: improve XYZ implementation ``` --- ## ๐Ÿ› Reporting Bugs ### Before Reporting 1. **Check existing issues** - Maybe it's already reported 2. **Try latest version** - Bug might be fixed already 3. **Reproduce the bug** - Make sure it's consistent ### Bug Report Template When creating a bug report, include: - **Description**: Clear description of the bug - **Steps to Reproduce**: Numbered steps to reproduce - **Expected Behavior**: What should happen - **Actual Behavior**: What actually happens - **Environment**: - Python version - OS (macOS/Windows/Linux) - Claude Desktop version - MCP server version - **Error Messages**: Full error messages or stack traces - **Screenshots**: If applicable --- ## โœจ Suggesting Features ### Feature Request Template When requesting a feature, include: - **Problem**: What problem does this solve? - **Proposed Solution**: How would you solve it? - **Alternatives**: Other solutions you've considered - **Use Cases**: How would you use this feature? - **Priority**: How important is this to you? --- ## ๐Ÿ“š Documentation ### Improving Documentation Documentation improvements are always welcome! - Fix typos or grammar - Add examples - Clarify confusing sections - Add missing information - Translate to other languages ### Documentation Files - `README.md` - Main project documentation - `SETUP_GUIDE.md` - Installation and setup - `TOOLS_REFERENCE.md` - API reference - `TRADING_ARCHITECTURE.md` - System architecture - Code docstrings - Inline documentation --- ## ๐Ÿค Code of Conduct ### Our Pledge We are committed to providing a welcoming and inspiring community for all. ### Expected Behavior - โœ… Be respectful and inclusive - โœ… Be collaborative - โœ… Be constructive in criticism - โœ… Focus on what is best for the community - โœ… Show empathy towards others ### Unacceptable Behavior - โŒ Harassment or discrimination - โŒ Trolling or insulting comments - โŒ Personal or political attacks - โŒ Publishing private information - โŒ Other unprofessional conduct --- ## ๐Ÿ’ฌ Getting Help Need help contributing? - ๐Ÿ’ฌ **[GitHub Discussions](https://github.com/caiovicentino/polymarket-mcp-server/discussions)** - Ask questions - ๐Ÿ“ฑ **[Telegram Communities](#)** - Chat with community members - ๐Ÿ“ง **Email**: Contact project maintainers --- ## ๐ŸŽฏ Priority Areas We're especially interested in contributions in these areas: ### High Priority - ๐Ÿ› Bug fixes - ๐Ÿงช Test coverage improvements - ๐Ÿ“– Documentation improvements - ๐Ÿ”’ Security enhancements ### Medium Priority - โœจ New analysis tools - ๐Ÿ“Š Performance improvements - ๐ŸŽจ Code refactoring - ๐ŸŒ Internationalization ### Nice to Have - ๐ŸŽฅ Video tutorials - ๐Ÿ“ฑ Mobile support - ๐Ÿ–ผ๏ธ UI dashboard - ๐Ÿค– Additional AI features --- ## ๐Ÿ† Recognition Contributors will be: - Listed in the project's contributors list - Mentioned in release notes (for significant contributions) - Credited in documentation they improve - Recognized in our community channels --- ## ๐Ÿ“œ License By contributing, you agree that your contributions will be licensed under the MIT License. --- ## ๐Ÿ™ Thank You! Your contributions make this project better for everyone. We appreciate your time and effort! **Special thanks to our community partners:** - ๐ŸŒพ Yield Hacker - ๐Ÿ’ฐ Renda Cripto - ๐Ÿ—๏ธ Cultura Builder Together, we're building the future of AI-powered prediction market trading! ๐Ÿš€ --- ## ๐Ÿ“ž Contact - **Project Maintainer**: [Caio Vicentino](https://github.com/caiovicentino) - **Issues**: [GitHub Issues](https://github.com/caiovicentino/polymarket-mcp-server/issues) - **Discussions**: [GitHub Discussions](https://github.com/caiovicentino/polymarket-mcp-server/discussions) --- <div align="center"> **Happy Contributing! ๐ŸŽ‰** </div>

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caiovicentino/polymarket-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server