Salesforce Profile Retirement Ready • Native MCP Engine

The Open-Source Migration Engine for Salesforce Profiles

Decompose legacy monolith profiles into modular Permission Sets & Permission Set Groups with 100% mathematical parity verification, cross-profile clustering, automated muting, and native Model Context Protocol (MCP) server for AI coding agents.

npx permforge analyze --dir force-app/main/default/profiles
100% Mathematical Parity Proof
15 Production CLI Commands
12 Native MCP Tools for AI Agents
0 Org API Runtime Dependencies
Live Terminal Demo: Running PermForge Migration Pipeline on Salesforce NPSP
PermForge running on Salesforce NPSP repository

> permforge analyze -d force-app/main/default/profiles


ⓘ PermForge Profile Analyzer

Scanning 3 profile metadata files...


Profile: Custom: Sales Representative

  • Objects: 42 (Account, Contact, Opportunity, Lead, Quote...)

  • Field Permissions (FLS): 386

  • Apex Classes: 14 | Visualforce Pages: 6

  • Custom Permissions: 3

  • High-Risk Flags: ModifyAllData (FALSE), ViewAllForecasts (TRUE)

  • Complexity Score: 64 / 100 [Moderate Tech Debt]


✔ Analysis complete. Recommendation: Safe for automated decomposition.

> permforge cluster -d force-app/main/default/profiles -t 0.70


ⓘ PermForge Cross-Profile Clustering Engine

Comparing permission sets across 5 profiles using Jaccard Similarity index...


✔ Identified Shared Baseline: Standard_Employee_Baseline

  • Common Object Grants: Account (Read), Contact (Read), Task (CRUD), Event (CRUD)

  • Shared FLS Grants: 184 common fields


▸ Isolated Role Deltas:

  • Sales_Ops_Delta: + Opportunity Delete, Transfer Leads

  • Service_Rep_Delta: + Case Edit, Knowledge Access


✔ Generated 1 baseline set + 4 lean delta sets in output/permsets.

> permforge decompose -p "Custom: Sales Representative.profile-meta.xml" -o force-app/main/default


ⓘ PermForge Modular Decomposition

Decomposing monolithic profile into single-responsibility artifacts...


✔ Created: permissionsets/Sales_Account_Contact_Access.permissionset-meta.xml

✔ Created: permissionsets/Sales_Opportunity_Core_Access.permissionset-meta.xml

✔ Created: permissionsets/Sales_Apex_Class_Executions.permissionset-meta.xml

✔ Created: permissionsetgroups/Sales_Representative_Persona.permissionsetgroup-meta.xml


✔ Decomposition complete! 1 PSG and 4 domain Permission Sets created.

> permforge verify -p "Custom: Sales Representative.profile-meta.xml" -g force-app/main/default/permissionsetgroups/Sales_Representative_Persona.permissionsetgroup-meta.xml


ⓘ PermForge Mathematical Parity Engine

Auditing 42 objects, 386 FLS, 14 Apex classes, 6 VF pages bit-for-bit...


  • Objects Matched: 42 / 42 (100.0%)

  • FLS Matched: 386 / 386 (100.0%)

  • Missing Grants: 0

  • Unexpected Extra Grants: 0


✔ VERIFICATION SUCCESS: 100% ACCESS PARITY PROVEN. Zero regression risk.

> permforge mcp


ⓘ PermForge Model Context Protocol (MCP) Server Active

Protocol: JSON-RPC 2.0 (stdio) • SDK: @modelcontextprotocol/sdk v1.6.1


Connected AI Coding Agents: Claude Desktop / Cursor / Antigravity / Cline

Exposed Agent Tools (9):

  [1] analyze_profiles      [2] cluster_profiles    [3] decompose_profile

  [4] verify_parity        [5] strip_profile       [6] generate_uap

  [7] generate_muting      [8] lint_profiles       [9] generate_migration_plan


[INFO] Listening for AI client requests on stdio...

Built for Complex Salesforce Architectures

Everything required to navigate Salesforce's upcoming Profile Retirement without human error, spreadsheets, or access disruptions.

◆

Zero-Loss Decomposition

Intelligently decomposes monolithic profiles into modular, single-responsibility Permission Sets grouped by business domain (Object access, FLS, Apex classes, custom permissions).

Automated Slicing
✔

Mathematical Parity Proof

Verifies decomposed Permission Set Groups against the original Profile bit-for-bit. Guarantees 0 missing grants and 0 unexpected privileges before pushing to production.

Zero Regression
⚙

Cross-Profile Clustering

Leverages Jaccard similarity algorithms across your entire repository to automatically extract a shared Standard_Employee_Baseline and isolate role-specific delta sets.

DRY Security Model
🛡

Muting PSG Generator

Generate native .mutingpermissionset-meta.xml to handle subtractive permissions inside Permission Set Groups without fragmenting your security architecture.

Subtractive Control
⚡

Profile Stripper & Sanitizer

Strips all migratable permissions from target profiles while preserving non-migratable essentials: Login IP Ranges, Login Hours, Page Layout Assignments, and Desktop Integrations.

Non-Destructive
🤖

Native MCP Server

Built-in Model Context Protocol server exposing 12 structured tools. Connect Claude Desktop, Cursor, Antigravity, or Cline to autonomously audit, decompose, and verify your repo.

AI Agent Ready
📋

User Access Policies (UAP)

Generates native Salesforce User Access Policies (.userAccessPolicy-meta.xml) to automate real-time and scheduled PSG assignments based on user attributes.

Automated Provisioning
🚀

Official GitHub Action Gate

Plug-and-play GitHub Action (uses: visparashar/permforge@main) that detects permission creep in PRs, enforces 100% mathematical parity gates, and posts interactive PR summary reports.

CI/CD & Marketplace

The 4-Phase Migration Methodology

A battle-tested workflow designed to move enterprise Salesforce orgs to the Principle of Least Privilege.

Phase 01

Scan & Audit

Audit complexity scores, inventory SObjects and FLS, detect high-risk system grants, and export an executive HTML dashboard.

permforge analyze && report
Phase 02

Cluster & Decompose

Extract shared baseline permissions across all profiles and slice role-specific grants into modular domain Permission Sets and PSGs.

permforge cluster && decompose
Phase 03

Parity Verification

Audit the generated sets against original profiles bit-for-bit. Math proof guarantees 100% equivalence before touching production.

permforge verify -p <prof> -g <psg>
Phase 04

Sanitize & Deploy

Strip legacy permissions from profiles, generate User Access Policies for auto-assignment, and produce rollback scripts.

permforge strip && uap && plan

Complete CLI Reference

15 purpose-built commands covering discovery, decomposition, verification, and automated assignment.

permforge pipeline Enterprise Pipeline

Multi-stage orchestration engine coordinating audit, clustering, domain decomposition, mathematical parity verification, UAP generation, and reporting in a single command.

permforge pipeline --run --cluster --strict --dry-run
permforge retrieve Live Org API

Connects directly to an authenticated Salesforce org via sf/sfdx auth cache and retrieves profiles via Metadata API in batch chunks.

permforge retrieve -o my-org --all-custom
permforge analyze Audit

Inventories profile SObject & FLS permissions, computes 0-100 complexity debt score, and flags high-risk permissions.

permforge analyze -d force-app/main/default/profiles
permforge cluster Migration

Cross-profile similarity analyzer. Extracts shared Standard_Employee_Baseline and role-specific delta sets.

permforge cluster -d force-app/.../profiles -t 0.70
permforge decompose Migration

Modularizes a profile into single-responsibility domain Permission Sets and a persona Permission Set Group.

permforge decompose -p CustomSales.profile-meta.xml
permforge verify Validation

Mathematically verifies 100% access parity between a source Profile and a target Permission Set Group.

permforge verify -p CustomSales.profile -g Sales.psg
permforge strip Sanitize

Strips migratable permissions from profiles while keeping layout assignments, login hours, and IP ranges intact.

permforge strip -p CustomSales.profile -o cleaned/
permforge uap Automation

Generates declarative User Access Policies (.userAccessPolicy-meta.xml) to automate PSG assignment on user record changes.

permforge uap -n Assign_Sales -g Sales_Rep_PSG
permforge mute Subtractive

Generates Muting Permission Sets (.mutingpermissionset-meta.xml) for subtractive permissions within PSGs.

permforge mute -n Mute_Delete -s Account:delete
permforge lint CI/CD

Pre-commit and pull request linter. Emits GitHub Actions annotations to prevent profile regression.

permforge lint -d force-app/.../profiles --strict
permforge graph Topology

Visualizes PSG inheritance hierarchy and object grant dependencies as Mermaid diagrams or ASCII trees.

permforge graph -g Sales_Rep_PSG.permissionsetgroup
permforge report Reporting

Generates a self-contained interactive HTML audit report with security debt charts, risk tables, and export options.

permforge report -d force-app/ -o audit.html
permforge plan Execution

Generates complete migration runbook: user assignment CSVs, rollback scripts, and SF CLI deploy sequences.

permforge plan -p CustomSales.profile -o migration/
permforge wizard Interactive

Interactive terminal wizard that guides admins step-by-step through discovery, clustering, decomposition, and parity checks.

permforge wizard
permforge mcp AI Agent

Starts the native Model Context Protocol (MCP) server over stdio for autonomous AI coding agents.

permforge mcp

Model Context Protocol (MCP) Integration

Let Claude Desktop, Cursor, Antigravity, or Cline refactor and verify your Salesforce permissions autonomously.

Automate Migrations with AI Agents

PermForge implements the official Model Context Protocol (MCP) standard. When running in your IDE or desktop AI client, agents have 12 native tools to inspect, plan, decompose, and verify changes safely.

▸ permforge_pipeline
▸ permforge_retrieve_profiles
▸ permforge_list_org_profiles
▸ analyze_profiles
▸ cluster_profiles
▸ decompose_profile
▸ verify_parity
▸ strip_profile
▸ generate_uap
▸ generate_muting
▸ lint_profiles
▸ generate_migration_plan

✔ Example Prompt for Your Agent:

"Analyze all profiles in force-app/main/default/profiles, extract a shared baseline permission set, and generate a 100% parity verification report."

// ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "permforge": {
      "command": "npx",
      "args": ["-y", "permforge", "mcp"]
    }
  }
}

PermForge vs. Alternative Methods

See how PermForge compares to manual spreadsheet migrations and native tooling.

Capability PermForge (Open-Source) Manual Spreadsheets & Metadata API Salesforce Standard Setup UI
100% Mathematical Parity Proof ✔ Bit-for-bit mathematical audit ✘ Manual sampling / High error rate ✘ None
Cross-Profile Baseline Clustering ✔ Jaccard similarity baseline extraction ✘ Ad-hoc human guesswork ✘ Not supported
Automated Muting PSG Generation ✔ Native .mutingpermissionset-meta.xml ✘ Manual XML authoring ✔ Manual clicks per field/object
Profile Sanitizer (strip migratables) ✔ Preserves layouts/IPs, strips perms ✘ High risk of breaking layouts ✘ Manual unchecking hundreds of boxes
Model Context Protocol (MCP) AI Tools ✔ 9 tools for Cursor/Claude/Antigravity ✘ None ✘ None
CI/CD Linter & Pre-commit Gate ✔ GitHub Actions annotations / strict mode ✘ None ✘ None
Runtime API / Org Connection Required ✔ Zero (Local metadata driven) Requires live sandbox login Requires production/sandbox login

Ready to Modernize Your Salesforce Org?

PermForge is free, open source, and works immediately with any Salesforce DX or Metadata API repository.

View on GitHub →