{"id":34599239,"url":"https://github.com/niradler/code-feedback","last_synced_at":"2026-01-20T16:53:38.644Z","repository":{"id":301643807,"uuid":"1009905690","full_name":"niradler/code-feedback","owner":"niradler","description":"A powerful, open-source Model Context Protocol (MCP) server for automated, multi-language code feedback, validation, and project analysis. Designed for developers, teams, and LLM-powered workflows to ensure code quality, correctness, and maintainability across diverse languages and build systems.","archived":false,"fork":false,"pushed_at":"2025-07-07T22:30:34.000Z","size":4236,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-14T10:51:21.958Z","etag":null,"topics":["deevloper-experience","llm","mcp","mcp-server"],"latest_commit_sha":null,"homepage":"https://github.com/niradler/code-feedback","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niradler.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-06-27T23:47:05.000Z","updated_at":"2025-07-07T22:30:37.000Z","dependencies_parsed_at":"2025-06-28T00:37:00.391Z","dependency_job_id":null,"html_url":"https://github.com/niradler/code-feedback","commit_stats":null,"previous_names":["niradler/code-feedback"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/niradler/code-feedback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niradler%2Fcode-feedback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niradler%2Fcode-feedback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niradler%2Fcode-feedback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niradler%2Fcode-feedback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niradler","download_url":"https://codeload.github.com/niradler/code-feedback/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niradler%2Fcode-feedback/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28002250,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["deevloper-experience","llm","mcp","mcp-server"],"created_at":"2025-12-24T12:07:51.067Z","updated_at":"2025-12-24T12:08:10.703Z","avatar_url":"https://github.com/niradler.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code Feedback MCP Server\n\nA powerful, open-source Model Context Protocol (MCP) server for automated, multi-language code feedback, validation, and project analysis. Designed for developers, teams, and LLM-powered workflows to ensure code quality, correctness, and maintainability across diverse languages and build systems.\n\n---\n\n## Why Code Feedback MCP?\n\nModern codebases are polyglot and complex. Automated, language-agnostic feedback is essential for:\n\n- **Catching errors early** (before code review or CI)\n- **Standardizing quality** across languages and teams\n- **Empowering LLMs and tools** to validate, lint, build, and analyze code safely\n- **Reducing manual review time** and improving developer confidence\n\n**Code Feedback MCP** provides a secure, extensible, and LLM-friendly API for code validation, linting, building, and analysis—out of the box.\n\n---\n\n## Key Features\n\n- Multi-language file validation (TypeScript, JavaScript, Python, Go)\n- Project-level build/test integration (npm, Make)\n- Dependency management for npm projects\n- Git command execution\n- Secure, path-restricted file and command access\n- Structured, machine-readable JSON responses\n- Advanced prompt system for code review, analysis, and more\n- Cross-platform: Windows, macOS, Linux\n\n![code_feedback](examples/code_feedback.gif)\n\n---\n\n## How It Works\n\nThe MCP server exposes a set of tools and prompts via a simple API. You can:\n\n- Validate and lint code files\n- Build and test projects\n- Manage dependencies\n- Run git commands\n- Request advanced code review, analysis, and suggestions via prompts\n\nAll actions are path-restricted for security and return structured results for easy integration with LLMs, editors, or CI systems.\n\n---\n\n## Installation\n\n**Requirements:**\n\n- Node.js 18+\n- Language-specific tools (TypeScript, Python, Go, etc.) installed and in your PATH\n- Project-level configs (e.g., `tsconfig.json`, `Makefile`, `package.json`) as needed\n\n**Install dependencies and build:**\n\n```bash\nnpm install\nnpm run build\n```\n\n---\n\n## Configuration\n\nConfigure allowed paths and server settings in `mcp-config.json` or `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"code-feedback\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"code-feedback\"],\n      \"env\": {\n        \"MCP_ALLOWED_PATHS\": \"C:/tests\"\n      }\n    }\n  }\n}\n```\n\n- `MCP_ALLOWED_PATHS` restricts file/command access for security.\n\n---\n\n## Usage\n\n### Start the Server\n\n```bash\nnpm start\n```\n\nOr with the MCP Inspector:\n\n```bash\nnpx @modelcontextprotocol/inspector ./dist/start-server.js\n```\n\n### Example: Validate a TypeScript File\n\nSend a request to the server (via HTTP, CLI, or SDK):\n\n```json\n{\n  \"tool\": \"validate_typescript_file\",\n  \"args\": { \"filePath\": \"./examples/example-good.ts\" }\n}\n```\n\n**Response:**\n\n```json\n{\n  \"success\": true,\n  \"errors\": [],\n  \"warnings\": [],\n  \"output\": \"...TypeScript compiler output...\"\n}\n```\n\n### Example: Run an npm Script\n\n```json\n{\n  \"tool\": \"run_npm_script\",\n  \"args\": { \"projectPath\": \"./examples\", \"scriptName\": \"test\" }\n}\n```\n\n### Example: Use a Prompt for Code Review\n\n```json\n{\n  \"prompt\": \"code-review\",\n  \"args\": { \"filePath\": \"./examples/example-good.js\", \"focus\": \"performance\" }\n}\n```\n\n**Response:**\n\n```json\n{\n  \"feedback\": \"...comprehensive review, suggestions, and best practices...\"\n}\n```\n\n---\n\n## Available Tools\n\n- `validate_typescript_file`: Validate and compile a TypeScript file, checking for syntax and type errors.\n- `validate_javascript_file`: Validate JavaScript file syntax using Node.js.\n- `validate_python_file`: Validate Python file with syntax checking and optional linting (pylint, flake8, black, mypy).\n- `validate_go_file`: Validate Go source file with compilation and formatting checks, and optionally run Go tests.\n- `run_make_command`: Run Make commands (e.g., make, make build, make test).\n- `list_make_commands`: List available make targets/commands from a Makefile.\n- `run_npm_script`: Run any npm script defined in package.json (e.g., test, lint, build).\n- `list_npm_scripts`: List all available npm scripts in a project.\n- `install_npm_deps`: Install npm dependencies (packages) in a project.\n- `uninstall_npm_deps`: Uninstall npm dependencies from a project.\n- `check_npm_dependency`: Check if a specific npm dependency is installed in a project.\n- `run_git_command`: Run git commands (status, diff, log, branch, checkout, commit, add, push, pull, merge, reset, or custom).\n- `uv_init`: Initialize a new Python project using uv.\n- `uv_add`: Add Python dependencies to a project using uv.\n- `uv_run`: Run a command in the uv environment.\n- `uv_lock`: Lock Python dependencies using uv.\n- `uv_sync`: Sync Python dependencies using uv.\n- `uv_venv`: Manage the uv virtual environment.\n- `http`: Make HTTP requests (GET, POST, etc.) to localhost or local IPs and return the response.\n- `docker`: Run Docker commands (build, run, stop, rm, rmi, inspect, ps) in a project directory.\n- `editor`: Edit, create, delete, or read text files with robust line/content-based edits, returning git-style diffs.\n- `filesystem`: Secure, batch multi-file/folder CRUD and query operations (delete, create, move, copy, read, stat, search, directory tree, glob support, etc.).\n- `find`: Powerful file and text search using ripgrep (regex, globs, context lines, structured output, etc.).\n\nAll tools accept file/project paths and relevant options. Responses are structured as:\n\n```json\n{\n  \"success\": true/false,\n  \"errors\": [\"error messages\"],\n  \"warnings\": [\"warning messages\"],\n  \"output\": \"command output\",\n  \"details\": { \"command\": \"...\", \"exitCode\": 0, \"duration\": 1234 }\n}\n```\n\n### Usage Examples\n\n**uv: Initialize a Python project**\n\n```json\n{\n  \"tool\": \"uv_init\",\n  \"args\": { \"projectPath\": \"./my-python-app\", \"projectName\": \"my-python-app\" }\n}\n```\n\n**http: Make a local HTTP GET request**\n\n```json\n{\n  \"tool\": \"http\",\n  \"args\": { \"url\": \"http://localhost:8000/health\" }\n}\n```\n\n**docker: List running containers**\n\n```json\n{\n  \"tool\": \"docker\",\n  \"args\": { \"command\": \"ps\" }\n}\n```\n\n**editor: Replace text in a file**\n\n```json\n{\n  \"tool\": \"editor\",\n  \"args\": {\n    \"action\": \"edit\",\n    \"file_path\": \"./README.md\",\n    \"edits\": [{ \"mode\": \"content\", \"oldText\": \"foo\", \"newText\": \"bar\" }]\n  }\n}\n```\n\n**filesystem: List directory tree**\n\n```json\n{\n  \"tool\": \"filesystem\",\n  \"args\": {\n    \"ops\": [{ \"type\": \"directoryTree\", \"path\": \".\", \"maxDepth\": 2 }]\n  }\n}\n```\n\n**find: Search for TODO comments in JS files**\n\n```json\n{\n  \"tool\": \"find\",\n  \"args\": { \"pattern\": \"TODO\", \"glob\": \"*.js\" }\n}\n```\n\n---\n\n## Prompt System\n\nRequest advanced code review, analysis, and guidance using prompts:\n\n- **code-review**: Comprehensive code review with feedback and suggestions\n- **code-analysis**: Analyze code structure, complexity, and potential issues\n- **refactor-suggestions**: Refactoring suggestions for improved code quality\n- **bug-detection**: Detect potential bugs and issues\n- **documentation-review**: Review and suggest improvements for code documentation\n- **test-coverage-analysis**: Analyze test coverage and suggest missing test cases\n- **security-audit**: Security audit and vulnerability identification\n- **performance-analysis**: Performance analysis and optimization suggestions\n- **coding-task-with-mcp**: Guide for completing a coding task using MCP tools and best practices\n- **find-imports**: Find all files that import a specific package\n- **commit-changes**: Show git diff and commit all staged changes with a generated message\n- **install-and-audit**: Install a new npm dependency and check for vulnerabilities\n- **format-python-directory**: Format all Python files in a directory using Black\n- **build-and-test**: Build and test the project using Make or npm\n- **list-docker-containers**: List all running Docker containers\n- **validate-typescript-file**: Validate a TypeScript file for syntax and type errors\n\nEach prompt returns actionable, structured feedback for your code.\n\n---\n\n## When to Use Code Feedback MCP\n\n- After generating or editing code (especially LLM-generated code)\n- Before code review or CI to catch issues early\n- To automate code quality checks in multi-language projects\n- For continuous feedback in editor integrations or bots\n- To standardize code review and analysis across teams\n\n---\n\n## Best Practices\n\n- Always validate code with MCP tools after editing or generating code\n- Use build and test tools to ensure your code works as expected\n- Use prompts for in-depth review, analysis, and improvement suggestions\n- Manage dependencies proactively to keep your project clean and up to date\n- Reuse existing code and abstractions where possible\n- Write modular, generic code to maximize reusability\n- Avoid code duplication and hardcoding\n- Document the integration and usage of MCP clearly\n- Test thoroughly using MCP tools and prompts\n\n---\n\n## Contributing\n\nWe welcome contributions! To add a new tool or prompt:\n\n- Fork the repo and create a feature branch\n- Add your tool in `src/tools/` or prompt in `src/prompts/`\n- Write tests in `tests/`\n- Run `npm run lint` and `npm run test`\n- Open a pull request with a clear description\n\n---\n\n## Troubleshooting \u0026 FAQ\n\n- Ensure all required tools are installed and in your PATH\n- Use `npm run test` to verify your setup\n- For permission issues, check script/file permissions and environment\n- If you see \"Path not allowed\", update `MCP_ALLOWED_PATHS` in your config\n- For more help, see the code and examples in the repo\n\n---\n\n## License\n\n[MIT](LICENSE)\n\n---\n\n## Example\n\n**User**:\n\nvalidate the code in D:\\Projects\\tests\\code-feedback-mcp\\package.json that it is compile, tests passing, and git status is clean, use code feedback tools\n\n**AI**:\n\nI'll help you validate the code in your project directory. Let me start by checking what's available and then run through the validation steps.Great! I can access your project directory. Let me first examine the project structure and then run the validation checks.Now let me check the available npm scripts and run the validation steps:Let me start by checking the git status:I can see there are uncommitted changes to package.json. Now let me run the build process to check if the code compiles:Great! The build succeeded. Now let me run the tests:Excellent! All tests are passing. Now let me run the linter to check code quality:Perfect! The linting passed with no issues. Now let me check the current git status again to see the changes:Let me check what changes were made to package.json:## Validation Summary\n\nHere are the results of validating your code-feedback-mcp project:\n\n### ✅ **Compilation Status: SUCCESS**\n\n- TypeScript compilation completed successfully\n- The build process ran without errors\n- Post-build version bump executed correctly (version updated from 0.0.5 to 0.0.7)\n\n### ✅ **Test Status: ALL PASSING**\n\n- **19 tests passed** across 6 test files\n- Test files covered: Go, Python, JavaScript, TypeScript, NPM, and Make tools\n- Total test duration: 805ms\n- No test failures or errors\n\n### ✅ **Code Quality: CLEAN**\n\n- ESLint ran successfully with no issues\n- All TypeScript files passed linting with `--quiet` flag\n- No code quality warnings or errors\n\n### ⚠️ **Git Status: NOT CLEAN**\n\n- There is **1 uncommitted change**: `package.json`\n- The change is a version bump from 0.0.5 to 0.0.7 (automated by the post-build script)\n- This appears to be an expected change from the build process\n\n### Recommendations:\n\n1. **Commit the version change**: The package.json version bump is from your build process and should be committed\n2. **Consider git workflow**: You might want to commit this change to have a clean working directory\n\nIf you'd like me to help commit this change or investigate any other aspects of the codebase, just let me know!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniradler%2Fcode-feedback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniradler%2Fcode-feedback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniradler%2Fcode-feedback/lists"}