Import Order Enforcer

Import Order Enforcer MCP Connector for Claude

A+

Enforce deterministic import ordering and detect unused imports using AST analysis.

3 tools Official Updated Oct 1, 2026 Official Vinkius Partner

The Import Order Enforcer uses Abstract Syntax Tree (AST) parsing to ensure your source files maintain a consistent structure. It validates that imports are correctly grouped into categories like 'builtin', 'external', and 'internal' while enforcing alphabetical sorting within each group. Use the validate_import_compliance tool to check for grouping or spacing violations, detect_unused_imports to identify dead code, and generate_fixed_import_block to automatically reconstruct a clean import section.

typescriptastlintingrefactoringclean-codeimport-ordering

3 tools expose this connector's capabilities to your AI agent.

detect_unused_imports

Detects unused imports

fix_imports

Generates a fixed import block

validate_imports

Validates import compliance

See how to talk to your AI agent using Import Order Enforcer.

Are there any unused imports in this code? import { useState, useEffect } from 'react'; import { data } from './utils'; const x = 10;

The following imports are unused: 'useState' at line 1, 'useEffect' at line 1.

Check if my imports follow the rules for this file: import { z } from 'zod'; import fs from 'fs';

The import order is valid according to your configuration.

Fix the imports in this block: import { b } from 'pkg-b'; import { a } from 'pkg-a';

import { a } from 'pkg-a'; import { b } from 'pkg-b';

Use the `detect_unused_imports` tool by providing your file content; it will return a list of all identifiers that are declared but never used.

Related Connectors