Skip to main content
Glama

MAID Runner MCP

Model Context Protocol server for MAID Runner validation tools.

MAID Runner MCP exposes MAID Runner validation capabilities via the Model Context Protocol (MCP), enabling seamless integration with AI development tools like Claude Code, Aider, and custom AI agents.

What Is This?

MAID Runner MCP is a bridge between AI agents and MAID Runner's validation framework. It provides:

  • MCP Tools: Programmatic access to maid validate, maid snapshot, maid test, and other commands

  • MCP Resources: Access to manifests, schemas, validation results, and system architecture

  • MCP Prompts: Workflow guidance for AI agents through MAID methodology phases

Think of it as an API layer that lets AI agents interact with MAID Runner using standardized MCP protocol instead of subprocess calls.

Related MCP server: Claude Code MCP Bridge

Status

🚧 Alpha Release - Under active development.

This is part of the MAID ecosystem and follows the MAID methodology itself (self-dogfooding).

Quick Start

Installation

# Install from PyPI
pip install maid-runner-mcp

# Or with uv
uv pip install maid-runner-mcp

Running the Server

# Start MCP server (stdio transport)
maid-runner-mcp

# Or with uv
uv run maid-runner-mcp

Integration with Claude Code

Add to your .claude/mcp.json:

{
  "mcpServers": {
    "maid-runner": {
      "command": "uv",
      "args": ["run", "maid-runner-mcp"],
      "env": {
        "MAID_MANIFEST_DIR": "manifests"
      }
    }
  }
}

Now Claude Code can:

  • Validate manifests via maid_validate tool

  • Generate snapshots via maid_snapshot tool

  • Access manifest content via manifest:// resources

  • Get workflow guidance via prompts

Architecture

AI Agents (Claude, GPT-4, etc.)
        ↓
   MCP Protocol (JSON-RPC)
        ↓
  maid-runner-mcp (MCP Server)
        ↓
   MAID Runner (Validation Core)

Features

Tools (Actions with Side Effects)

  • maid_validate - Validate manifests (structural + behavioral + implementation)

  • maid_snapshot - Generate manifest snapshots from existing code

  • maid_snapshot_system - Generate system-wide architecture snapshot

  • maid_list_manifests - Find manifests referencing a file

  • maid_init - Initialize MAID project structure

  • maid_get_schema - Get manifest JSON schema

  • maid_generate_stubs - Generate test stubs from manifest

  • maid_files - Check file tracking status

Resources (Read-Only Data Access)

  • manifest://{name} - Access manifest content

  • schema://manifest - Get manifest JSON schema

  • validation://{name}/result - Access cached validation results

  • snapshot://system - Get system-wide architecture snapshot

  • graph://query - Query manifest knowledge graph

  • file-tracking://analysis - Get file tracking status

Prompts (Workflow Guidance)

  • plan-task - Guide AI through manifest creation

  • implement-task - Guide AI through implementation

  • refactor-code - Guide AI through safe refactoring

  • review-manifest - Guide AI through manifest review

How It Relates to MAID Runner

Component

Role

What It Does

MAID Runner

Validation framework

CLI tool for validating MAID manifests

MAID Runner MCP

MCP interface

Exposes MAID Runner to AI agents via MCP

MAID Runner MCP doesn't replace the CLI—it complements it:

  • CLI (maid): For humans and shell scripts

  • MCP (maid-runner-mcp): For AI agents and programmatic access

Both use the same underlying validation logic.

Use Cases

1. AI-Assisted Development

AI agents can validate code as they generate it:

# AI agent workflow
result = await session.call_tool("maid_validate", {
    "manifest_path": "manifests/task-013.manifest.json",
    "use_manifest_chain": true
})

if not result["success"]:
    # Fix issues based on errors
    ...

2. Architecture Exploration

AI agents can understand system architecture:

# Get system snapshot
snapshot = await session.read_resource("snapshot://system")

# Query knowledge graph
results = await session.read_resource(
    "graph://query?type=class&name=EmailValidator"
)

3. Workflow Automation

Custom agents can automate MAID workflow:

# Get planning guidance
prompt = await session.get_prompt("plan-task", {
    "goal": "Add email validation"
})

# Follow prompt to create manifest
...

Development

Setup

# Clone repository
git clone https://github.com/mamertofabian/maid-runner-mcp
cd maid-runner-mcp

# Install dependencies
uv pip install -e ".[dev]"

# Run tests
pytest tests/ -v

Makefile Commands

make install      # Install package
make test         # Run tests
make lint         # Check code style
make format       # Format code
make validate     # Validate MAID manifests

MAID Compliance

This project follows the MAID methodology itself:

  • All changes have manifests in manifests/

  • All features have behavioral tests in tests/

  • Validation enforced via maid validate --use-manifest-chain

See CLAUDE.md for development guidelines.

Contributing

See CONTRIBUTING.md for development workflow and guidelines.

License

MIT License - see LICENSE file.

Available Tools

8 tools
maid_filesA

Get file-level tracking status using MAID Runner.

When to use:

  • Project health check: See which files lack manifests

  • Onboarding: Identify files that need to be brought under MAID

  • Compliance audit: Ensure all source files are tracked

Status categories:

  • undeclared: Files not referenced in any manifest (needs attention)

  • registered: Files in manifests but with potential issues

  • tracked: Files fully compliant with MAID methodology

Tips:

  • Use issues_only=True to focus on problem files

  • Filter by status="undeclared" to find files needing manifests

  • Run periodically to maintain MAID compliance

Args: manifest_dir: Directory containing manifests (default: "manifests") issues_only: If True, only show files with issues status: Filter by status (e.g., "undeclared", "registered", "tracked")

Returns: FileTrackingResult with categorized files

Inputs: manifest_dir, issues_only, status. Returns: undeclared, registered, tracked

maid_generate_stubsA

Generate test stubs from a manifest using MAID Runner.

When to use:

  • Phase 2 (Planning): After creating manifest, generate test file skeleton

  • Jumpstarting tests: Create boilerplate test structure from manifest

  • Consistency: Ensure test file naming matches manifest conventions

What it generates:

  • Test file with naming pattern: tests/test_task_XXX_*.py

  • Test class structure based on expectedArtifacts

  • Import statements for artifacts being tested

  • Placeholder test methods for each artifact

Tips:

  • Run after creating/updating a manifest

  • Generated stubs are starting points - add assertions

  • Test file is added to manifest's readonlyFiles automatically

Args: ctx: MCP context containing session and roots information manifest_path: Path to the manifest JSON file

Returns: GenerateStubsResult with generation outcome

Inputs: manifest_path (required). Returns: success, manifest_path, generated_files, errors

maid_get_schemaA

Get the MAID manifest JSON schema.

When to use:

  • Phase 2 (Planning): Understand manifest structure before creating one

  • Debugging: Verify manifest fields are correctly named and typed

  • Learning: Explore available manifest options

Key information in schema:

  • Required fields: goal, readonlyFiles, expectedArtifacts/systemArtifacts

  • File lists: creatableFiles, editableFiles, readonlyFiles

  • Artifact types: function, class, attribute, etc.

  • Validation commands: validationCommand or validationCommands

Tips:

  • Review schema before writing your first manifest

  • Use schema to validate manifest structure

  • Check artifact type options for expectedArtifacts.contains[]

Args: ctx: MCP context for accessing client roots

Returns: SchemaResult with the manifest schema

Inputs: no named parameters. Returns: success, json_schema, errors

maid_initA

Initialize a MAID project using MAID Runner.

When to use:

  • Starting a new project: Set up MAID directory structure

  • Onboarding existing project: Add MAID support to existing codebase

  • Resetting: Use force=True to reinitialize

What it creates:

  • manifests/ directory for task manifests

  • .maid/ directory for MAID configuration

  • Basic MAID project structure

Tips:

  • Run once at project setup

  • Use force=True only if you need to reset MAID configuration

Args: target_dir: Directory to initialize (defaults to current directory) force: Whether to force initialization even if already initialized

Returns: InitResult with initialization outcome

Inputs: target_dir, force. Returns: success, target_dir, errors

maid_list_manifestsA

List manifests that reference a file using MAID Runner.

When to use:

  • Before editing: Check if a file already has manifests

  • Understanding history: See how a file has evolved through manifests

  • Planning edits: Find related manifests to understand context

Result categories:

  • created_by: Manifests where file is in creatableFiles

  • edited_by: Manifests where file is in editableFiles

  • read_by: Manifests where file is in readonlyFiles

Tips:

  • Use before creating a new manifest for an existing file

  • If file is in creatableFiles, it was first created by that manifest

  • Use --use-manifest-chain in maid_validate for files with history

Args: file_path: Path to the file to check manifest_dir: Directory containing manifests (default: "manifests")

Returns: ListManifestsResult with manifest information

Inputs: file_path (required), manifest_dir. Returns: file_path, total_manifests, created_by, edited_by, +1 more

maid_snapshotA

Generate a manifest snapshot from existing code using MAID Runner.

When to use:

  • Onboarding existing code: Create manifests for pre-existing files

  • Before refactoring: Capture current state as a baseline

  • Documentation: Generate manifest to document existing APIs

Key behavior:

  • Analyzes source file to extract public artifacts (functions, classes)

  • Creates a manifest with expectedArtifacts matching current code

  • Optionally generates test stub file for the manifest

Tips:

  • Use before making changes to existing code without manifests

  • The generated manifest serves as a "snapshot" of current state

  • Review and adjust the generated manifest as needed

Args: file_path: Path to the source file to generate a snapshot for output_dir: Directory to output the manifest (default: "manifests") force: Whether to overwrite existing manifest files skip_test_stub: Whether to skip generating test stub file

Returns: SnapshotResult with generation outcome

Inputs: file_path (required), output_dir, force, skip_test_stub. Returns: success, manifest_path, test_stub_path, superseded_manifests, +1 more

maid_snapshot_systemA

Generate a system-wide manifest snapshot using MAID Runner.

When to use:

  • Documentation: Create a comprehensive view of all project artifacts

  • Architecture review: See all public APIs across the codebase

  • Dependency analysis: Understand cross-file relationships

What it creates:

  • Aggregated manifest combining all individual manifests

  • System-wide view of all tracked artifacts

  • Uses systemArtifacts (array) instead of expectedArtifacts (object)

Tips:

  • Run periodically to update system documentation

  • Useful for onboarding new team members

  • Compare snapshots over time to track API evolution

Args: output: Path to the output system manifest file (default: "system.manifest.json") manifest_dir: Directory containing individual manifests (default: "manifests") quiet: Whether to suppress progress output (default: True)

Returns: SystemSnapshotResult with generation outcome

Inputs: output, manifest_dir, quiet. Returns: success, output_path, errors

maid_validateA

Validate a MAID manifest using MAID Runner.

When to use:

  • Phase 2 (Planning): After creating/updating a manifest, validate it passes

  • Phase 3 (Implementation): After writing code, verify it matches the manifest

  • Before committing: Ensure all manifests are valid

Validation modes:

  • implementation: Checks that code artifacts match manifest expectedArtifacts

  • behavioral: Checks that tests exist and reference the expected artifacts

  • schema: Checks that the manifest structure conforms to the JSON schema

Use manifest chain when:

  • Editing existing files (taskType: "edit")

  • The file has previous manifests that define its history

  • You need to verify the full history of changes is valid

Args: manifest_path: Path to the manifest JSON file validation_mode: Validation mode (implementation, behavioral, or schema) use_manifest_chain: Whether to use manifest chain for validation manifest_dir: Directory containing manifests (optional) quiet: Whether to suppress verbose output ctx: MCP context for accessing working directory

Returns: ValidateResult with validation outcome

Inputs: manifest_path (required), validation_mode, use_manifest_chain, manifest_dir, +1 more. Returns: success, mode, manifest, target_file, +3 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: file tracking, stub generation, schema retrieval, initialization, manifest listing per file, snapshot of a single file, system-wide snapshot, and validation. There is no overlapping functionality.

    Naming Consistency5/5

    All tools follow the 'maid_' prefix with a verb_noun pattern (e.g., maid_generate_stubs, maid_list_manifests). The naming is consistent, descriptive, and predictable across all 8 tools.

    Tool Count5/5

    With 8 tools, the server is well-scoped for the MAID domain. It covers initialization, analysis, validation, stubbing, and tracking without being overly numerous or sparse.

    Completeness4/5

    The tools cover the core MAID workflow (init, snapshot, validate, generate stubs, track files, list manifests). However, there is no tool to list all manifests (only per file) or to delete/clean up manifests, which are minor gaps.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers