{"id":28752358,"url":"https://github.com/ivangrynenko/devstandards_mcp","last_synced_at":"2025-10-16T22:10:09.504Z","repository":{"id":296124202,"uuid":"990036000","full_name":"ivangrynenko/devstandards_mcp","owner":"ivangrynenko","description":"Provides MCP server with software-related standards, allowing to query by category, programming language","archived":false,"fork":false,"pushed_at":"2025-06-15T11:18:00.000Z","size":76,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-15T11:48:14.648Z","etag":null,"topics":["coding-standards","drupal","drupal-best-practices","javascript-coding-standards","mcp-server","owasp-top-10","python-coding-standards"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivangrynenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-25T11:20:07.000Z","updated_at":"2025-06-02T09:24:23.000Z","dependencies_parsed_at":"2025-05-29T04:20:59.629Z","dependency_job_id":"4fe723ef-3043-46cf-a947-5831cbc46d56","html_url":"https://github.com/ivangrynenko/devstandards_mcp","commit_stats":null,"previous_names":["ivangrynenko/devstandards_mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ivangrynenko/devstandards_mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangrynenko%2Fdevstandards_mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangrynenko%2Fdevstandards_mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangrynenko%2Fdevstandards_mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangrynenko%2Fdevstandards_mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivangrynenko","download_url":"https://codeload.github.com/ivangrynenko/devstandards_mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangrynenko%2Fdevstandards_mcp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263833411,"owners_count":23517371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coding-standards","drupal","drupal-best-practices","javascript-coding-standards","mcp-server","owasp-top-10","python-coding-standards"],"created_at":"2025-06-17T00:00:40.588Z","updated_at":"2025-10-16T22:10:04.471Z","avatar_url":"https://github.com/ivangrynenko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevStandards MCP Server\n\nA Model Context Protocol (MCP) server that provides AI agents with access to development best practices, security guidelines, and coding standards across multiple programming languages and frameworks.\n\n## Features\n\n- **Plugin Architecture**: Extensible system for adding new languages and frameworks\n- **In-Memory Storage**: Fast in-memory data store for instant querying\n- **Dynamic CSV Loading**: Automatically loads all CSV files from plugin data directories\n- **284+ Coding Standards**: Comprehensive coverage of security, accessibility, performance, and best practices\n- **MCP Tools**: Four tools for querying standards:\n  - `get_standards`: Filter by category, subcategory, and severity\n  - `search_standards`: Full-text search across all standards\n  - `get_categories`: List all available categories\n  - `get_standard_by_id`: Get details for a specific standard\n\n## Included Standards\n\nThe server currently includes 284+ coding standards across these categories:\n\n### Drupal Standards (263 standards)\n- **Coding Standards** (130+ standards): PHP standards, PSR-4 compliance, naming conventions, code organization, documentation\n- **Security** (70 standards): SQL injection, XSS, CSRF, access control, file uploads, authentication, input validation\n- **Best Practices** (16 standards): Field API, dependency injection, configuration management, entity handling\n- **Frontend** (11 standards): Theme development, responsive design, CSS/JS aggregation, Twig templates\n- **Accessibility** (8 standards): WCAG compliance, ARIA attributes, semantic HTML, keyboard navigation\n- **Testing** (7 standards): PHPUnit, Behat, functional testing, test coverage, mocking\n- **Documentation** (7 standards): Code comments, README files, API documentation, DocBlocks\n- **API** (6 standards): REST, JSON:API, GraphQL best practices, HTTP methods\n- **Build** (6 standards): Build processes, optimization, asset management\n- **DevOps** (6 standards): CI/CD, deployment, environment management, GitHub Actions\n- **Database** (5 standards): Schema design, migrations, query optimization, Database API\n- **Integration** (5 standards): Third-party integrations, external services, APIs\n- **Git** (4 standards): Git workflows, commit messages, branching strategies\n- **JavaScript** (3 standards): Drupal behaviors, modern JS patterns, optimization\n- **Configuration** (1 standard): Configuration management\n- **Forms** (1 standard): Form API and handling\n- **Hooks** (1 standard): Hook implementations\n- **Twig** (1 standard): Template best practices\n\n### OWASP Standards (20 standards)\n- **OWASP Top 10 2021**: Critical security vulnerabilities including broken access control, cryptographic failures, injection attacks, insecure design, security misconfiguration, vulnerable components, identification failures, software integrity failures, logging failures, and server-side request forgery\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/devstandards-mcp.git\ncd devstandards-mcp\n```\n\n2. Create and activate a virtual environment:\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n\n3. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n4. Copy the environment configuration:\n```bash\ncp .env.example .env\n```\n\n## Running the Server\n\n### Standalone Executable\n\n```bash\n./devstandards-server\n```\n\n### Via Python Module\n\n```bash\nsource venv/bin/activate\npython -m src.server\n```\n\n### Testing\n\nRun the test suite:\n```bash\npython -m pytest tests/ -v\n```\n\n## Project Structure\n\n```\ndevstandards-mcp/\n├── src/\n│   ├── server.py          # MCP server implementation\n│   ├── config.py          # Configuration management\n│   ├── plugins/           # Plugin system\n│   │   ├── base.py        # Base plugin class\n│   │   ├── manager.py     # Plugin manager\n│   │   └── drupal.py      # Drupal standards plugin\n│   └── data/              # Data storage layer\n│       ├── database.py    # Compatibility wrapper\n│       └── memory_store.py # In-memory data store\n├── data/                  # Standards data files\n│   ├── drupal/\n│   │   └── drupal_standards.csv\n│   └── owasp/\n│       ├── owasp_top10_2021.csv\n│       └── OWASP_RESOURCES.md\n├── tests/                 # Test suite\n├── requirements.txt       # Python dependencies\n└── README.md             # This file\n```\n\n## Adding New Standards\n\n### 1. Add to Existing Plugin\n\nCreate or edit any CSV file in the plugin's data directory (`data/{plugin_name}/*.csv`). The plugin will automatically load all CSV files:\n\n```csv\nid,category,subcategory,title,description,severity,examples,references,tags,rationale,fix_guidance\nNEW001,drupal_security,new_issue,New Security Issue,Description here,high,\"{\"\"good\"\": \"\"example\"\", \"\"bad\"\": \"\"example\"\"}\",\"[\"\"https://example.com\"\"]\",security|new,Why this matters,How to fix it\n```\n\n**Note**: The Drupal plugin dynamically loads all CSV files from `data/drupal/`, so you can organize standards into multiple files (e.g., `security_standards.csv`, `performance_standards.csv`, etc.)\n\n### 2. Create a New Plugin\n\n1. Create a new plugin file in `src/plugins/`:\n```python\nfrom .base import StandardsPlugin, Standard\n\nclass MyPlugin(StandardsPlugin):\n    @property\n    def name(self) -\u003e str:\n        return \"myplugin\"\n    \n    # ... implement required methods\n```\n\n2. Create data directory and CSV file:\n```bash\nmkdir data/myplugin\n# Add your CSV file with standards\n```\n\n## MCP Client Configuration\n\n### Claude Desktop\n\nAdd this to your Claude Desktop configuration file (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"devstandards\": {\n      \"command\": \"/path/to/devstandards-mcp/devstandards-server\"\n    }\n  }\n}\n```\n\nAfter adding the configuration, restart Claude Desktop.\n\n### VSCode with Continue.dev\n\n[Continue.dev](https://continue.dev) is an AI coding assistant for VSCode that supports MCP servers.\n\n1. Install the Continue extension in VSCode\n2. Open Continue's configuration (`~/.continue/config.json`)\n3. Add the MCP server configuration:\n\n```json\n{\n  \"models\": [...],\n  \"mcpServers\": {\n    \"devstandards\": {\n      \"command\": \"/path/to/devstandards-mcp/devstandards-server\"\n    }\n  }\n}\n```\n\n### Cursor Editor\n\nCursor supports MCP servers through its AI configuration:\n\n1. Open Cursor Settings (Cmd+, on macOS)\n2. Navigate to \"AI\" → \"Model Context Protocol\"\n3. Add server configuration:\n\n```json\n{\n  \"devstandards\": {\n    \"command\": \"/path/to/devstandards-mcp/devstandards-server\",\n    \"description\": \"Drupal coding standards and best practices\"\n  }\n}\n```\n\n### Zed Editor\n\nFor Zed editor with AI assistant features:\n\n1. Open Zed settings (`~/.config/zed/settings.json`)\n2. Add to the assistant configuration:\n\n```json\n{\n  \"assistant\": {\n    \"mcp_servers\": {\n      \"devstandards\": {\n        \"command\": \"/path/to/devstandards-mcp/devstandards-server\"\n      }\n    }\n  }\n}\n```\n\n### Generic MCP Client Configuration\n\nFor any MCP-compatible client, use these settings:\n\n- **Command**: `/path/to/devstandards-mcp/devstandards-server`\n- **Protocol**: stdio (standard input/output)\n- **Transport**: JSON-RPC over stdio\n- **Initialization**: No special parameters required\n\n### Using with Python Scripts\n\nYou can also use the MCP server programmatically:\n\n```python\nimport subprocess\nimport json\n\n# Start the server\nproc = subprocess.Popen(\n    [\"/path/to/devstandards-mcp/devstandards-server\"],\n    stdin=subprocess.PIPE,\n    stdout=subprocess.PIPE,\n    text=True\n)\n\n# Send a request\nrequest = {\n    \"jsonrpc\": \"2.0\",\n    \"method\": \"tools/call\",\n    \"params\": {\n        \"name\": \"get_standards\",\n        \"arguments\": {\n            \"category\": \"drupal_security\",\n            \"severity\": \"critical\"\n        }\n    },\n    \"id\": 1\n}\n\nproc.stdin.write(json.dumps(request) + \"\\n\")\nproc.stdin.flush()\n\n# Read response\nresponse = json.loads(proc.stdout.readline())\nprint(response)\n```\n\n### Troubleshooting\n\nIf you encounter issues:\n\n1. **Check logs**: Most MCP clients provide debug logs\n2. **Test manually**: Run `echo '{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"1.0\"}},\"id\":1}' | ./devstandards-server`\n3. **Verify paths**: Ensure the executable path is correct and the file is executable (`chmod +x devstandards-server`)\n4. **Python environment**: The server uses its own virtual environment, no need to activate it\n\n## Available MCP Tools\n\nOnce connected, the following tools are available to AI assistants:\n\n### 1. get_standards\nQuery coding standards with filters:\n- **category**: Filter by category (e.g., \"drupal_security\", \"drupal_performance\")\n- **subcategory**: Filter by subcategory (e.g., \"sql_injection\", \"xss\")\n- **severity**: Filter by severity level (\"critical\", \"high\", \"medium\", \"low\", \"info\")\n- **limit**: Maximum number of results (default: 50)\n\nExample query: \"Show me all critical security standards for Drupal\"\n\n### 2. search_standards\nFull-text search across all standards:\n- **query**: Search text (required)\n- **categories**: List of categories to search within (optional)\n- **tags**: List of tags to filter by (optional)\n- **limit**: Maximum number of results (default: 50)\n\nExample query: \"Search for standards about SQL injection\"\n\n### 3. get_categories\nList all available categories with descriptions and counts.\n\nExample query: \"What categories of standards are available?\"\n\n### 4. get_standard_by_id\nGet detailed information about a specific standard:\n- **standard_id**: The unique identifier (e.g., \"DS001\", \"SEC001\")\n\nExample query: \"Show me details for standard DS001\"\n\n## Example Prompts for AI Assistants\n\nWhen using an MCP client with this server, you can ask:\n\n- \"What are the critical security standards I should follow for Drupal?\"\n- \"Show me best practices for Drupal forms\"\n- \"Search for standards about caching and performance\"\n- \"How should I handle user input to prevent XSS attacks?\"\n- \"What's the proper way to use Drupal's Database API?\"\n- \"List all accessibility standards\"\n- \"Show me examples of good vs bad code for SQL queries\"\n- \"What are the OWASP Top 10 2021 vulnerabilities and how to prevent them?\"\n- \"Show me critical security standards across all categories\"\n- \"Search for standards about broken access control\"\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Add your changes\n4. Write tests\n5. Submit a pull request\n\n## License\n\nMIT License - see LICENSE file for details","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivangrynenko%2Fdevstandards_mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivangrynenko%2Fdevstandards_mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivangrynenko%2Fdevstandards_mcp/lists"}