Provides 10 MCP tools for AI governance, security scans, state machine validation, and AI integration.
Configuration
View docs{
"mcpServers": {
"anthonykewl20-ranex-framework": {
"command": "/usr/local/bin/ranex_mcp",
"args": []
}
}
}You deploy and use the Ranex MCP Server to enable AI-assisted governance and automated checks for your Python projects. It provides a suite of tools to validate architecture, enforce state machine rules, run security scans, and integrate AI helpers through a lightweight, local MCP server.
You interact with the MCP server by running the MCP binary and connecting your client or Cursor-based workflow to the server. The server exposes a set of tools that you can invoke from your AI-enabled workflows to perform architecture validation, state machine checks, security scans, import validation, and other governance tasks. Use the provided CLI and MCP integration points to perform checks as part of your development and deployment pipelines.
Prerequisites: ensure you have Python and a compatible shell available on your system. You will also use a simple installer to create an isolated environment for running the MCP components.
Step 1: Run the installer to create a virtual environment.
./install.shStep 2: Activate the virtual environment.
source .venv/bin/activateStep 3: Install the core packages manually if you prefer a direct approach.
python3 -m venv .venv
source .venv/bin/activate
pip install ranex_core-0.0.1-cp312-cp312-manylinux_2_28_x86_64.whlStep 4: Initialize your project and run a security and architecture scan.
cd your-project
ranex init
ranex scanStep 5: Set up the MCP server for AI integration.
# Install MCP server binary to a system path
cp ranex_mcp /usr/local/bin/
# Add to Cursor configuration to expose the MCP server
{
"mcpServers": {
"ranex": {
"command": "/usr/local/bin/ranex_mcp"
}
}
}The MCP server provides a range of tools that can be used to integrate governance checks into your AI workflows. In particular, you can enable state machine validation, security scanning, and import validation as part of your development lifecycle.
Key MCP tools exposed by the server include: validate_file_structure, validate_transition, check_import, security_scan, detect_antipattern, list_db_aliases, validate_sql, validate_intent, check_function_exists, and get_active_persona.
Example usage snippets show how to configure state machine validation and to run scans as part of your automation.
# State machine example (YAML)
# app/features/orders/state.yaml
feature: orders
initial_state: Pending
states:
Pending: { description: "New order" }
Confirmed: { description: "Order confirmed" }
Processing: { description: "Being prepared" }
Shipped: { description: "In transit" }
Delivered: { description: "Completed", terminal: true }
Cancelled: { description: "Cancelled", terminal: true }
transitions:
- { from: Pending, to: Confirmed }
- { from: Pending, to: Cancelled }
- { from: Confirmed, to: Processing }
- { from: Processing, to: Shipped }
- { from: Shipped, to: Delivered }If you encounter issues during installation or while running scans, verify that the virtual environment is active and that the MCP binary is in your system PATH. Check that the Cursor or client configuration points to the correct MCP server command, and ensure the required tools are accessible in your workflow environment.
Performs architecture validation to ensure project structure aligns with defined architectural rules.
Checks state machine transitions to prevent illegal or skipped steps.
Detects typosquatting and suspicious imports to improve dependency safety.
Runs a SAST-like scan with 7 patterns to find common security issues.
Identifies code smells through 5 antipattern patterns to improve code quality.
Lists available database aliases and connection configurations.
Validates SQL usage and queries for correctness and safety.
Assesses ambiguity in prompts or intents to improve alignment.
Performs semantic checks to verify function or endpoint presence.
Retrieves the active AI persona for alignment checks.