vba-lint-mcp
An MCP server providing VBA code inspections, linting, and parse tree analysis -- 65 inspections ported from Rubberduck VBA.
Potencia tu agente
Instalación del publicador. No es un endpoint de PlugMCP.
Host a copy with our keys and logs.
Aún no hay una versión empaquetada en el registro. Sigue el README del repositorio.
¿URL remota o un comando en tu máquina? En qué se diferencian las dos instalaciones
Ejecutar en PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirDel publicador
vba-lint-mcp exposes VBA static analysis capabilities through the Model Context Protocol, enabling AI assistants (Claude Code, etc.) and MCP-compatible tools to perform code quality checks on VBA source files.
The inspection logic is derived from the Rubberduck VBA project -- an open-source VBIDE add-in providing code inspections, refactoring, navigation, and unit testing for VBA developers. This project translates Rubberduck's proven C# inspection patterns to TypeScript and makes them accessible via MCP.
Who is this for?
git clone [email protected]:devinmlowe/vba-lint-mcp.git
cd vba-lint-mcp
npm install
npm run generate-parser # Requires Java 17+ (JRE)
npm run build
Add to your MCP settings (.claude/settings.json or project settings):
{
"mcpServers": {
"vba-lint": {
"command": "node",
"args": ["/path/to/vba-lint-mcp/dist/server.js"],
"env": {
"VBA_LINT_LOG_LEVEL": "warn"
}
}
}
}
Once configured, Claude Code can inspect VBA code directly:
> Inspect this VBA code for issues:
>
> Sub Example()
> Dim x
> Let y = 10
> If True Then
> End If
> End Sub
The server will return diagnostics for missing Option Explicit, implicit variant type, obsolete Let keyword, and the empty If block.
vba/inspectRun inspections on a VBA code string.
Example output:
{
"results": [
{
"inspection": "EmptyIfBlock",
"description": "If block is empty and should either contain code or be removed.",
"severity": "warning",
"category": "CodeQuality",
"tier": "A",
"location": { "startLine": 3, "startColumn": 4, "endLine": 4, "endColumn": 10 },
"quickFix": { "description": "Remove the empty If block" },
"suppressed": false
}
],
"errors": [],
"skippedInspections": [],
"parseErrors": [],
"engineVersion": "0.1.0"
}
vba/inspect-workspaceScan a directory tree for VBA files (.bas, .cls, .frm) and return aggregated results.
In summary mode (default), returns counts by file and inspection. In detailed mode, returns full result objects for each finding.
vba/list-inspectionsList all available inspections with metadata.
vba/parseParse VBA source code and return the AST.
Useful for understanding code structure. The depth parameter limits serialization size for large modules.
65 inspections across 2 tiers and 8 categories.
These inspections analyze the ANTLR4 parse tree directly and require no symbol resolution. They run on both inline code (vba/inspect) and workspace scans.
These inspections require symbol resolution (declaration collection + reference resolution). They run on both inline code and workspace scans, with workspace scans providing cross-module resolution.
The hostLibraries parameter controls which host-specific inspections run. Default is ["excel"]. Excel-specific inspections (ImplicitActiveSheetReference, etc.) only run when "excel" is included.
.vbalintignoreFor workspace scanning, create a .vbalintignore file with glob patterns to exclude files:
# Ignore generated code
generated/**
*.generated.bas
# Ignore test fixtures
test/**
The following features are designed but not yet implemented:
.vbalintrc.json (planned)Project-level configuration file for customizing severity overrides and default host libraries:
{
"hostLibraries": ["excel"],
"severity": {
"EmptyIfBlock": "error",
"StepNotSpecified": "off"
}
}
@Ignore Annotation Suppression (planned)Inline suppression of specific inspections using VBA comment annotations:
'@Ignore EmptyIfBlock
If condition Then
End If
'@Ignore EmptyIfBlock, ObsoleteLetStatement
docker build -t vba-lint-mcp .
docker compose build
docker compose run --rm vba-lint
The MCP server uses stdio transport (stdin/stdout JSON-RPC), so it must be run interactively (docker compose run), not detached (docker compose up).
Edit docker-compose.yml to mount your VBA project directory:
services:
vba-lint:
build: .
stdin_open: true
volumes:
- ./my-vba-project:/data:ro
Then use the vba/inspect-workspace tool with path: "/data".
The runtime image uses node:22-alpine with a non-root user. Source files are included for GPL-3.0 compliance.
npm install
npm run generate-parser # Requires Java 17+
npm run build
npm test # All tests
npm run test:watch # Watch mode
npx vitest run <path> # Specific test
See CONTRIBUTING.md for a step-by-step guide to adding new inspections.
src/
server.ts # MCP server entry point
inspections/
base.ts # Inspection contracts
registry.ts # Master registration
runner.ts # Tiered execution engine
parse-tree/ # Tier A inspections (by category)
declaration/ # Tier B inspections
parser/ # ANTLR4 parser facade
symbols/ # Symbol resolution (Tier B)
annotations/ # @Ignore annotation parsing
grammar/
VBALexer.g4 # ANTLR4 lexer grammar (from Rubberduck)
VBAParser.g4 # ANTLR4 parser grammar (from Rubberduck)
#If, #Const, #Else) is not preprocessed. All branches are parsed as active code, which may produce false positives in modules using conditional compilation.This project is a derivative work of Rubberduck VBA. The VBA grammar and inspection logic are translated from Rubberduck's C# codebase.
Copyright (C) Rubberduck Contributors -- Licensed under GPL-3.0.
See ATTRIBUTION.md for the complete attribution, derived works table, and contributor acknowledgment.
This project is licensed under the GNU General Public License v3.0. See LICENSE for the full text.
In accordance with GPL-3.0:
MCP server providing VBA code inspections, linting, and parse tree analysis. Inspired by and derived from the Rubberduck VBA project.
Herramientas
Aún no hay lista de herramientas. Los servidores remotos la reciben tras la primera comprobación de estado.
Preguntas frecuentes
Copia en esta página la configuración stdio para Cursor, Claude Desktop, Claude Code o VS Code. Usa la instalación del publicador, no un proxy de PlugMCP.
Este registro no indica ninguna variable de entorno obligatoria.
Vba Lint se ejecuta localmente por stdio.
Última comprobación: 2026-10-28. MCP server providing VBA code inspections, linting, and parse tree analysis. Inspired by and derived from the Rubberduck VBA project.