MCP Hub
Back to servers

megalinter

MCP server for running Ox Security MegaLinter via mega-linter-runner

Registry
Updated
Mar 5, 2026

Quick Install

npx -y @downatthebottomofthemolehole/megalinter-mcp-server

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.

CI Status Publish Status License: MIT Node Version

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_run to execute MegaLinter with configurable runtime and runner options.
  • megalinter_write_config to generate a minimal .mega-linter.yml file.
  • megalinter_list_flavors to 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): Show mega-linter-runner help.
  • 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): Sets VALIDATE_ALL_CODEBASE=false when true.
  • runnerVersion (string, optional): npm version for mega-linter-runner (for example latest).
  • 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 for APPLY_FIXES. Default: none.
  • showElapsedTime (boolean, optional): Value for SHOW_ELAPSED_TIME. Default: true.
  • flavorSuggestions (boolean, optional): Value for FLAVOR_SUGGESTIONS. Default: false.
  • disableLinters (string[], optional): Values for DISABLE_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-runner is executed via npx at runtime and can be pinned with the runnerVersion tool 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+PDeveloper: Reload Window) after changing MCP configuration.

Running

npm start

Development mode:

npm run dev

Debugging

Use .vscode/launch.json:

  • Debug MCP Server (runs npm run dev)
  • Debug MCP Server (Built) (runs dist/index.js after 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

CI/CD Integrations

Model Context Protocol

Community & Contributing

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.

Reviews

No reviews yet

Sign in to write a review