MegaLinter MCP Server
Note: This is a community-maintained MCP server. It is not an official Model Context Protocol server, but it is sanctioned by Ox Security as a complement to their official MegaLinter tools.
A Model Context Protocol (MCP) server for running Ox Security MegaLinter through mega-linter-runner. Works with any CI/CD platform (GitHub Actions, GitLab CI, Azure DevOps, CircleCI, Jenkins) or locally.
Overview
This server provides three MCP tools:
megalinter_runto execute MegaLinter with configurable runtime and runner options.megalinter_write_configto generate a minimal.mega-linter.ymlfile.megalinter_list_flavorsto return common MegaLinter flavors.
Platform Compatibility
This MCP server is platform-agnostic and works universally:
- ✅ Locally — Run MegaLinter from your IDE or command line
- ✅ GitHub Actions — Integrate with workflows
- ✅ GitLab CI/CD — Use in GitLab pipelines
- ✅ Azure DevOps — Run in Azure Pipelines
- ✅ CircleCI, Jenkins, Bitbucket Pipelines — Any CI/CD platform with Docker support
- ✅ AI Agents & Copilot — Automated code quality checks via MCP
The only requirement is Docker (or a compatible container runtime like Colima).
Tools
megalinter_run
Runs mega-linter-runner via npx.
Inputs:
workingDirectory(string, optional): Command working directory. Defaults to current process directory.path(string, optional): Directory path to lint.flavor(string, optional): MegaLinter flavor. Default:all.release(string, optional): MegaLinter image tag. Default:v9.image(string, optional): Full Docker image override.env(string, optional): Environment variable string passed to--env.fix(boolean, optional): Apply auto-fixes.help(boolean, optional): Showmega-linter-runnerhelp.install(boolean, optional): Generate MegaLinter starter config.containerName(string, optional): Docker container name override.removeContainer(boolean, optional): Remove container after run.configFile(string, optional): Path to.mega-linter.yml.reportsPath(string, optional): Reports directory. Default:megalinter-reports.disableLinters(string, optional): Comma-separated list of linters to disable.lintChangedFilesOnly(boolean, optional): SetsVALIDATE_ALL_CODEBASE=falsewhen true.runnerVersion(string, optional): npm version formega-linter-runner(for examplelatest).timeoutSeconds(number, optional): Timeout in seconds. Default:3600.extraArgs(string[], optional): Additional CLI arguments.
megalinter_write_config
Writes a minimal MegaLinter configuration.
Inputs:
targetPath(string, optional): Output file path. Default:.mega-linter.yml.applyFixes(string, optional): Value forAPPLY_FIXES. Default:none.showElapsedTime(boolean, optional): Value forSHOW_ELAPSED_TIME. Default:true.flavorSuggestions(boolean, optional): Value forFLAVOR_SUGGESTIONS. Default:false.disableLinters(string[], optional): Values forDISABLE_LINTERS.
megalinter_list_flavors
Returns the built-in list of common flavors (all, javascript, python, terraform, and others).
Dependencies
System Dependencies
- Node.js
>=24.0.0 - npm (bundled with Node.js)
- Docker Engine or Docker Desktop (must be running for
megalinter_run) - Optional local container runtime wrapper such as Colima
npm Dependencies
Runtime:
@modelcontextprotocol/sdk(MCP server SDK)
Development:
typescript(build/compile)tsx(development runner)@types/node(Node.js typings)
Runtime note:
mega-linter-runneris executed vianpxat runtime and can be pinned with therunnerVersiontool input.
Installation
npm install
npm run build
Configuration
Usage with VS Code
This workspace is preconfigured in .vscode/mcp.json:
{
"servers": {
"megalinter-ox-security": {
"type": "stdio",
"command": "node",
"args": ["./dist/index.js"]
}
}
}
Reload VS Code (Cmd+Shift+P → Developer: Reload Window) after changing MCP configuration.
Running
npm start
Development mode:
npm run dev
Debugging
Use .vscode/launch.json:
Debug MCP Server(runsnpm run dev)Debug MCP Server (Built)(runsdist/index.jsafter build)
Set breakpoints in src/index.ts, then press F5.
Testing
See docs/TESTING.md for Copilot Chat scenarios, manual JSON-RPC checks, and troubleshooting guidance.
Quick validation prompt in Copilot Chat:
@megalinter-ox-security list available flavors
Related Projects
Official MegaLinter Resources
- MegaLinter website — Comprehensive documentation and configuration guide
- MegaLinter repository — Source code and issue tracking
- mega-linter-runner — npm package used by this server
CI/CD Integrations
- MegaLinter Azure DevOps Extension — ADO task by the same author (also sanctioned by Ox Security)
- GitHub Actions: Use MegaLinter's official GitHub Action
- GitLab CI/CD: See MegaLinter GitLab integration docs
- Jenkins, CircleCI, and others: Run MegaLinter via Docker in any CI/CD pipeline
Model Context Protocol
Community & Contributing
- 🤝 Contributing Guide — Start here to contribute code, report bugs, or request features
- 📜 Code of Conduct — Expected community behaviour
- 🔒 Security Policy — Report vulnerabilities responsibly
- 🧪 Testing Guide — Manual testing and validation procedures
- ⚙️ Maintainer Guide — Release, CI/CD, and dependency update operations
Attribution & License
Maintained by Carl Dawson under the Down At The Bottom Of The Mole Hole organization.
Licensed under the MIT License. MegaLinter is managed by Ox Security.