Skip to main content
Glama
CONTRIBUTING.mdโ€ข5.23 kB
# Contributing to MCP ASCII Charts Thank you for your interest in contributing to MCP ASCII Charts! This document provides guidelines and information for contributors. ## ๐Ÿš€ Getting Started ### Prerequisites - Node.js 18.x or higher - npm 9.x or higher - Git ### Setup Development Environment 1. Fork the repository on GitHub 2. Clone your fork locally: ```bash git clone https://github.com/YOUR_USERNAME/mcp-ascii-charts.git cd mcp-ascii-charts ``` 3. Install dependencies: ```bash npm install ``` 4. Create a new branch for your feature: ```bash git checkout -b feature/your-feature-name ``` ## ๐Ÿ› ๏ธ Development Workflow ### Running the Project ```bash # Development mode with auto-reload npm run dev # Build the project npm run build # Run tests npm run test # Run linting npm run lint:all # Type checking npm run typecheck ``` ### Project Structure ``` src/ โ”œโ”€โ”€ charts/ # Chart generation modules โ”œโ”€โ”€ types/ # TypeScript type definitions โ”œโ”€โ”€ utils/ # Utility functions โ”œโ”€โ”€ __tests__/ # Test files โ””โ”€โ”€ index.ts # Main MCP server entry point ``` ## ๐Ÿ“ Coding Standards ### TypeScript Guidelines - Use strict TypeScript configuration - Prefer interfaces over types for object shapes - Use meaningful variable and function names - Add JSDoc comments for public APIs ### Code Style - Follow the existing ESLint configuration - Use 2 spaces for indentation - Maximum line length: 120 characters - Use trailing commas in multiline structures ### Testing - Write tests for all new functionality - Maintain or improve test coverage - Use descriptive test names - Test both success and error cases Example test structure: ```typescript describe('Chart Generation', () => { test('should create line chart with valid data', () => { // Test implementation }); test('should throw error for invalid data', () => { // Error testing }); }); ``` ## ๐ŸŽฏ Adding New Chart Types When adding a new chart type: 1. Create a new file in `src/charts/` 2. Implement the chart generation function 3. Add TypeScript types to `src/types/` 4. Register the tool in `src/index.ts` 5. Add comprehensive tests 6. Update documentation and examples ### Chart Function Template ```typescript import { ChartData, ChartResult } from '../types/index.js'; export function createNewChart(data: ChartData): ChartResult { // Validate input if (data.data.length === 0) { throw new Error('Data array cannot be empty'); } // Generate chart const chart = generateAsciiChart(data); return { chart, title: data.title, dimensions: { width: data.width || 60, height: data.height || 15 } }; } ``` ## ๐Ÿงช Testing Guidelines ### Test Categories 1. **Unit Tests**: Test individual functions 2. **Integration Tests**: Test chart generation end-to-end 3. **Validation Tests**: Test input validation ### Running Tests ```bash # Run all tests npm test # Run tests in watch mode npm test -- --watch # Run tests with coverage npm test -- --coverage ``` ## ๐Ÿ“š Documentation ### README Updates When adding features, update: - Feature list - Usage examples - API documentation - Installation instructions ### Code Documentation - Add JSDoc comments for all public functions - Include parameter descriptions and return types - Provide usage examples in comments ## ๐Ÿ” Pull Request Process 1. **Create Feature Branch**: Use descriptive branch names ```bash git checkout -b feature/add-pie-charts git checkout -b fix/histogram-overflow git checkout -b docs/update-examples ``` 2. **Make Changes**: Follow coding standards and test thoroughly 3. **Commit Messages**: Use conventional commit format ```bash feat: add pie chart support fix: resolve histogram overflow issue docs: update API examples test: add scatter plot test cases ``` 4. **Test Everything**: ```bash npm run test npm run lint:all npm run build ``` 5. **Submit PR**: Include description, testing notes, and examples ### PR Requirements - [ ] All tests pass - [ ] Code follows style guidelines - [ ] Documentation updated - [ ] Breaking changes documented - [ ] Examples provided for new features ## ๐Ÿ› Bug Reports When reporting bugs: 1. Use the bug report template 2. Provide minimal reproduction case 3. Include environment details 4. Add relevant logs (sanitized) ## ๐Ÿ’ก Feature Requests For new features: 1. Use the feature request template 2. Describe the use case clearly 3. Provide mockups or examples 4. Consider implementation complexity ## ๐Ÿšฆ Release Process Releases follow semantic versioning: - **Patch** (1.0.1): Bug fixes - **Minor** (1.1.0): New features, backward compatible - **Major** (2.0.0): Breaking changes ## ๐Ÿ“ž Getting Help - Open an issue for questions - Check existing issues and PRs - Review the documentation ## ๐Ÿ“„ License By contributing, you agree that your contributions will be licensed under the MIT License. ## ๐Ÿ™ Recognition Contributors will be recognized in: - CHANGELOG.md - GitHub contributors list - Special mentions for significant contributions Thank you for contributing to MCP ASCII Charts! ๐ŸŽ‰

Latest Blog Posts

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/gianlucamazza/mcp-ascii-charts'

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