orgintel
The orgintel server is a read-only Salesforce permission architecture analysis tool that snapshots org permissions into a local DuckDB store to support RBAC remediation. It provides the following capabilities:
Snapshot org: Bulk-fetch the entire permission model (profiles, permission sets, groups) into a local store; returns summary stats only.
Manage snapshots: List existing snapshots with org info, timestamps, and row counts.
Describe objects: Get a live field list for any Salesforce object with a sensitivity guess per field, with sensitive fields ordered first.
Run read-only SOQL queries: Execute
SELECT-only queries with a hard row cap and automatic redaction of identifier columns.Analyze profiles: View profiles sorted by user count, including license, permission cardinality, and
ModifyAllDataflag.Compare permissions: Compute the symmetric difference between two principals' permissions, grouping differing fields by permission signature.
Find sensitive access: Identify principals granting read/edit on fields matching sensitivity patterns, with affected user counts resolved through effective permissions.
Verify decomposition: Formally check whether a proposed base-profile + permission-set decomposition preserves every user's effective permissions exactly.
Propose decomposition: Automatically compute a thin-base profile and permission-set decomposition (via Jaccard clustering), then verify and return it with placeholder keys for naming and justification.
Provides tools for analyzing Salesforce permission architecture, including profiles, permission sets, and permission set groups, to support RBAC remediation. Capabilities include snapshotting permission models, diffing permissions, detecting sensitive field access, verifying and proposing permission decompositions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@orgintel snapshot my sandbox and show me profiles with sensitive field access"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
orgintel
An MCP server that analyzes Salesforce permission architecture — profiles, permission sets, and permission set groups — to support RBAC remediation. It reads an org, snapshots the permission model into a local DuckDB store, and answers questions about it. Phases 1–4 (acquisition, analysis core, eval harness, agent).
Two hard guarantees, both enforced as mechanism rather than policy:
Read-only. orgintel never issues an insert, update, delete, or metadata deploy against any org. Enforced by a transport-layer route allowlist (see
clients/transport.py); a non-allowlisted request raises before it is sent.No personal identifiers persisted. The
userstable has no name, username, or email column — the columns do not exist.soql_querymasks identifier columns in its results. See DESIGN-P1.md §2.7.
Why it's built this way
A mid-size org has ~850k FieldPermissions rows — a raw dump is ~20M tokens, ~100× a
context window. The model never sees raw API output. Every tool returns an
aggregate, a diff, or a bounded slice; the join happens in DuckDB. Every response
carries a budget that discloses truncation and how to narrow.
Related MCP server: KubeGuard MCP Server
Setup
Requires uv and the Salesforce CLI (sf).
uv sync
uv run pytest # 51 tests, no org neededAuth (Phase 1: SFDX token reuse)
orgintel reads the access token from an org you've already authenticated with the Salesforce CLI — zero extra setup. JWT bearer flow is a planned seam, not yet built.
sf org login web --alias my-org # once
sf org list # confirm it's ConnectedThe subprocess argv is fixed and its output (which contains a live token) is never logged.
Tools
Tool | What it returns |
| Bulk-fetches the permission model into DuckDB. Returns summary stats only — counts, timing, snapshot_id. |
| Available snapshots, newest first. |
| Profiles by user count: license, perm cardinality, ModifyAllData flag, unassigned count. |
| Live field list with a |
| Symmetric difference of two principals. Differing fields grouped by |
| Read-only SOQL. SELECT-only parser guard, row cap, identifier columns redacted. |
| (P2) Every principal granting read/edit on a name-matched sensitive field, with affected user counts resolved through effective permissions. Recall-first. |
| (P2) Formal check that a proposed base-profile + permission-set/group refactor leaves every user's effective permissions unchanged. Returns per-user added/removed grants; an uncovered user fails. |
| (P4) Computes a thin-base + permission-set decomposition (deterministic) and runs it through |
scope defaults to all tables. Apex in SetupEntityAccess is excluded by default
(84% of that table, ~noise for RBAC); pass "setup_entity_access:apex" to include it.
Two P2 functions — effective_permissions (union across profile + permission sets + PSG
components, minus muting) and cluster_profiles (Jaccard clustering of profiles) — are
internal building blocks, not yet exposed as tools. verify_decomposition is the crown
jewel: permission-refactor correctness is formally checkable, so "did the refactor
preserve access" is a boolean, not a judgement call — and propose_decomposition is
gated by it, so an unverifiable proposal is never returned.
Agent (P4)
agent/ is an MCP client that drives these tools via the Anthropic API
(claude-opus-5). The division of labor is the whole point: the tools compute and
verify; the model orchestrates, names, and judges. propose_decomposition returns a
verified structure with placeholder names; the model names each base in the customer's
vocabulary and writes the rationale. The model also judges whether an unmatched field
name looks sensitive (mbr_num__c, dob_enc__c) — the gap P3 measured as evasive recall.
uv sync --extra agent
orgintel-agent "snapshot <orgalias>, then propose a decomposition" # billableThe model call sits behind an LLM protocol, so the loop, tool bridge, and judge are all
tested with a scripted fake — no API key, no billing. Only orgintel-agent makes real
calls. uv run python -m evals.agent_delta measures the evasive-recall lift the judge
buys (0.0 → 1.0 with the offline stand-in; detectable recall held at 1.0).
Register with Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"orgintel": {
"command": "uv",
"args": ["run", "orgintel"],
"cwd": "../MCP Salesforce"
}
}
}Then in Claude: "Snapshot my-org, then show me the profiles with the most users, then diff the top two."
Eval harness (P3)
The highest-signal artifact in the project: a scoreboard for the deterministic analysis core, built before the agent so it develops against numbers, not vibes.
uv run python -m evals.run # writes evals/REPORT.md + a run to evals/history/fixtures/generate.py synthesizes org snapshots with planted ground truth
(deterministic given a seed): latent roles, redundant pairs that should collapse,
adversarial "do not consolidate" cases, and sensitive fields — some pattern-detectable,
some named to evade (mbr_num__c, dob_enc__c). The harness scores cluster purity,
sensitive-field recall (detectable target 1.0; evasive recall is the gap the P4 model
must close, measured explicitly), and privilege preservation (verify_decomposition must
certify a ground-truth decomposition and catch a broken one). Each run diffs against the
previous, so a prompt or pattern change that drops recall shows up immediately.
Snapshot store
One DuckDB file, default ~/.orgintel/snapshots.db, override with ORGINTEL_DB. Set it
per client engagement to keep each org's data in its own file. A snapshot holds
principal/object/field metadata and pseudonymous user ids — re-identification
requires authenticated access to the source org. Snapshot files are git-ignored.
Layout
src/orgintel/
clients/ thin async SF wrappers (REST, Bulk 2.0, SFDX auth) — no DB, guarded transport
store/ DuckDB schema (SQL migrations), ingest, queries, snapshot loader — no network
analysis/ pure functions: diff, effective perms, clustering, sensitivity, verify, propose — no I/O
agent/ MCP client + Anthropic-backed model (LLM protocol), tool loop, field judge
config/ sensitivity.yaml (patterns + setup-entity scope)
snapshot.py the acquisition coordinator (auth -> fetch -> ingest)
server.py nine FastMCP tools — thin
fixtures/ deterministic synthetic orgs with planted ground truth (P3)
evals/ scoreboard: run.py (deterministic core) + agent_delta.py (P4 model lift)See DESIGN-P1.md for the schema rationale and CLAUDE.md for conventions.
Available Tools
9 toolsdescribe_objectA
Live describe of an object's fields with a sensitivity_guess flag per field (SSN/DOB/account-number/etc from config). Sensitive fields ordered first.
Inputs: api_name (required), org_alias (required). Returns: object
find_sensitive_accessA
Every principal granting read/edit on a field whose name matches a sensitivity pattern (SSN/DOB/account-number/card/comp/… from config), with how many users end up with that access (resolved through effective permissions, honoring muting). Recall is prioritized over precision — expect broad matches.
Inputs: snapshot_id (required). Returns: object
list_profilesA
Profiles in a snapshot: name, license, user count, perm cardinality, and whether they hold ModifyAllData. Sorted by user count desc. Unassigned profiles surfaced.
Inputs: snapshot_id (required), include_user_counts. Returns: object
list_snapshotsA
List available snapshots (newest first) with org, timestamp, and row counts.
Inputs: no named parameters. Returns: object
permission_diffA
Symmetric difference of permissions between two principals (profile or permission set). Differing fields grouped by (a_perm, b_perm) signature. The P1 workhorse.
PSGs are out of scope in P1 (they need union-minus-muting resolution — P2's
effective_permissions); passing one returns an instructive error, not a wrong answer.
Inputs: principal_a (required), principal_b (required), snapshot_id (required). Returns: object
propose_decompositionA
Propose a thin-base-profile + permission-set decomposition. The STRUCTURE is computed deterministically (cluster the profiles, derive each cluster's shared base and each profile's deviation) and is run through verify_decomposition before it is returned — if it doesn't preserve every user's effective permissions, you get the failure, not the proposal. Names and rationale are deliberately NOT provided: the tool returns placeholder keys plus each base's member profile names and shared grants as raw material for YOU to name in the customer's vocabulary and justify.
Inputs: snapshot_id (required), threshold, target_base_count. Returns: object
snapshot_orgA
Bulk-fetch a Salesforce org's permission architecture into the local snapshot store. Returns ONLY summary statistics — never permission rows. scope defaults to all tables; pass 'setup_entity_access:apex' to include Apex (off by default).
Inputs: org_alias (required), scope. Returns: object
soql_queryA
Read-only SOQL. SELECT-only (parser-guarded), hard row cap, identifier columns (Name/Email/Phone/...) redacted before results are returned (DESIGN §2.7).
Inputs: query (required), org_alias (required), max_rows. Returns: object
verify_decompositionA
Formal check: does a proposed base-profile + permission-set/group decomposition leave EVERY user's effective permission set unchanged? Returns per-user added/removed grants (both must be empty to pass) and any users the plan fails to cover. This is a boolean, not a vibe — it either preserves privilege exactly or it doesn't.
Inputs: proposal (required), snapshot_id (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct operation: snapshots, listing, describing, querying, profiling, diffing, sensitive access search, and decomposition verification/proposal. No overlap in functionality.
All tools follow a consistent verb_noun snake_case pattern (e.g., snapshot_org, list_snapshots, permission_diff), making the purpose clear from the name.
9 tools is well-scoped for the domain of Salesforce org permission analysis and decomposition. Each tool serves a clear role without redundancy.
The toolset covers the entire workflow: fetching permission architecture, describing objects, querying, listing profiles, diffing permissions, finding sensitive access, and proposing/verifying decompositions. No obvious gaps.
Related MCP Connectors
IaC attack-path auditor: finds internet-to-crown-jewel chains in Terraform/CFN/K8s.
Detects database migration table locks, terraform cost leaks, and OWASP API flaws.
Check and manage RBAC permissions, roles, groups and grants in a Permio (perms.io) project.
Cloud cost, inventory and governance on AWS/Azure/GCP. Read-only by default, optional scoped writes
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables secure interaction with Salesforce orgs through LLMs, providing tools for managing orgs, querying data, deploying metadata, running tests, and performing code analysis. Features granular access control and uses encrypted auth files to avoid exposing secrets in plain text.492Apache 2.0
- -licenseNot gradedqualityNot gradedmaintenanceEnables security analysis of Kubernetes Role configurations using LLM-assisted prompt chaining and rule-based assessment. Provides comprehensive security scoring, hardened role generation, and runtime permission usage correlation to identify privilege escalation risks and over-permissive configurations.-
- FlicenseNot gradedqualityBmaintenanceA local, privacy-first knowledge graph for Salesforce orgs. It live-syncs your org to a SQLite + vector index on your machine and exposes 26 MCP tools to Cursor, Claude Code/Desktop, and VS Code, so the AI you already use can reason about Apex, LWC, Flow, Vlocity, OmniStudio, security, and integrations without your code or schema ever leaving your laptop.-
- FlicenseNot gradedqualityCmaintenanceEnables auditors to scan cloud IAM policies for privilege-escalation paths, wildcards, and risky grants directly within Cursor or Claude Code, using a deterministic rule engine that runs entirely on local infrastructure.1-