MCP Tools Reference

Ranex provides 43 MCP tools (+ 4 feature-gated) for real-time AI governance.

How AI Uses These Tools

  • AI automatically calls tools based on context
  • Tools validate before code generation
  • Results guide AI behavior (block, warn, or proceed)

Tool Categories

Core Validation

10 tools
validate_file_structureEnforce architectural rules before file creation
validate_intentClarify ambiguous requests before implementation
check_function_existsPrevent code duplication
validate_sqlValidate SQL queries against live schema
security_scanCheck for 30+ vulnerability patterns
detect_antipatternDetect 15+ code antipatterns

Persona

5 tools
persona_validateValidate action against active persona
persona_getGet current persona context
persona_setSwitch active persona

Drift Detection

5 tools
drift_snapshotCreate specification snapshot
drift_checkCheck for specification drift
drift_reportGenerate drift report

ARBITER

5 tools
arbiter_validate3-layer test integrity validation
arbiter_contractContract-based testing
arbiter_oracleOracle validation

Governance

4 tools
govern_checkFull governance validation
govern_pre_commitPre-commit validation
audit_queryQuery audit trail

RAG Search

4 tools
rag_searchSemantic code search
rag_contextGet relevant context

Example: validate_file_structure

Before creating files, AI calls this tool to check architecture rules:

// Input
{
  "file_path": "app/utils/helpers.py"
}

// Output
{
  "valid": false,
  "error": "Folder 'utils/' is forbidden. Use app/commons/",
  "suggestion": "Move to app/commons/helpers.py"
}

Live Examples

validate_file_structure returning PASS
validate_file_structure - file complies with architecture rules
validate_file_structure detecting architecture violation
Architecture violation - forbidden folder detected, suggesting app/commons/
check_import detecting malicious package
check_import - detecting potentially malicious package
security_token_generate tool response
security_token_generate - generating secure JWT tokens

MCP Server Setup

Add to your IDE's MCP configuration:

{
  "mcpServers": {
    "ranex": {
      "command": "ranex_mcp",
      "args": ["--stdio"]
    }
  }
}

Supported IDEs

🌊
Windsurf
Full MCP support
↗️
Cursor
Full MCP support
🤖
Claude Desktop
Full MCP support