Skip to main content
Glama

Ward

MCP server for AI-powered code quality analysis. Detects security issues, bugs, code smells, and performance problems.

Supports: Python, JavaScript/TypeScript, Go, Java, Ruby, Rust, C/C++, and more.

Quick Start

Requires Python 3.10+

1. Install

pip install semgrep ward-mcp

2. Add to MCP config

Claude Desktop / Cursor / Windsurf (mcp.json or claude_desktop_config.json):

{
  "mcpServers": {
    "ward": {
      "command": "python",
      "args": ["-m", "ward", "mcp"]
    }
  }
}

Claude Code CLI (~/.claude/mcp_servers.json):

{
  "ward": {
    "type": "stdio",
    "command": "python",
    "args": ["-m", "ward", "mcp"]
  }
}

Done. Your AI agent now has access to Ward's scanning tools.

Related MCP server: CodeBase Optimizer

Auto-scan Setup

Add to your project's CLAUDE.md or .cursorrules:

After generating code, use ward mcp - scan_remote tool to check for issues.
Format: scan_remote(code_files=[{"path": "filename.py", "content": "code"}])
If issues found: fix and scan again.

Tools

Tool

Description

scan_remote

Scan code content directly

scan

Scan files by path

scan_with_custom_rule

Scan with custom YAML rules

Warning - first mcp call will be longer due to installation.

Troubleshooting

"semgrep not found" - Run pip install semgrep

Server won't start - Check python -m ward mcp runs without errors

Roadmap

Phase 1: AI-Powered Analysis (Coming Soon)

  • explain_issue - LLM-powered detailed explanations for detected issues

  • suggest_fix - AI-generated code fixes with context-aware suggestions

Phase 2: Cross-File Intelligence (Coming Soon)

  • analyze_cross_file - Graph-based taint analysis across multiple files

  • Detect complex vulnerabilities that span multiple modules

  • Dependency flow tracking and data flow analysis

Stay tuned for updates!

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables comprehensive code analysis including quality assessment, security vulnerability detection, refactoring suggestions, complexity calculations, and automatic documentation generation for multiple programming languages.
    5
    7 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides comprehensive codebase analysis including project structure evaluation, cross-language duplicate detection, microservices validation, and configuration optimization with AI-powered pattern learning that generates actionable improvement reports.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI-powered, zero-trust code review with multiple models, supporting single files, git diffs, and multiple files, with security, performance, and architecture checks across 10+ languages.
    13
    MIT