Policy Portal · Compliance API · MVC Admin · Policy Manager

Diligent Policy Manager,
composed by an agent.

Hybrid-auth tool set spanning three Policy Manager API surfaces. Draft, review, publish, and archive documents. Manage components, regulations, and compliance mappings. Configure the solution — workflows, queues, templates, tag groups, reference data. Bulk-load and bulk-export. All from one agent conversation, through one protocol.

3
API Surfaces
Portal · Compliance · MVC
2
Auth Models
Bearer JWT + OIDC session
Cache
Two-tier, write-invalidating
Schema Detection
Brain canonical compare
$
curl -fsSL https://mcp-policies.riskapture.ai/install.sh | bash
Installs to ~/.local/share/diligent-policies-mcp Node.js 20+, no sudo Re-run to update
Architecture

Three surfaces, one conversation.

The server talks to three distinct Policy Manager backends: a Policy Portal REST API (Bearer JWT) for published documents, a Compliance catalog API (Bearer JWT) for regulation data, and a Policy Manager MVC admin app (OIDC session cookie via a one-time Playwright login) for everything else — document lifecycle, workflows, queues, templates, reference data. Each tool routes itself to the correct surface; you never think about it.

Hybrid auth

Bearer JWT for Portal + Compliance. A headless Playwright OIDC login mints a session cookie only when an MVC-admin endpoint is called. Credentials live in a local .env, never committed.

Two-tier cache

In-memory Map plus persistent ~/.cache/diligent-policies-mcp/cache.json. Per-prefix TTLs, write-invalidating mutators, survives MCP restarts.

Schema detection

Sample-walk every inventory (documents, components, regulations, workflows, queues, templates, reference data), infer attribute types, compare against Brain canonical.

Bulk import / export

Ship bulk operations on day one via client-side loops. Export emits .docx blobs plus manifest JSON. Native bulk endpoints are on the roadmap.

Dedicated admin surface

Configuration tools sit behind policies_admin_*: workflows, task definitions, queues, templates, tag groups, reference data. Clear boundary.

Escape hatch

policies_api_raw calls any Portal/Compliance/MVC endpoint with full content-type control.

What you can do

Capabilities overview.

Document lifecycle

Create drafts, upload Word content, assign owners, drive the review cycle, publish to internal or public URLs, archive, delete.

Components & cross-refs

Author reusable components and link them into documents. Cross-reference documents to each other, to websites, to regulation requirements.

Regulations & compliance

Create regulations, add requirements and references, link requirements to policies. Query the Compliance catalog.

Workflow configuration

Define review workflows and task definitions. Assign a workflow to a document type. Configure the queues that own each step.

Reference data

Create tag groups and reference domains + codes — drive the look-and-feel of document browsing and filtering.

Bulk operations

Bulk-create from a manifest, bulk-archive retired policies, bulk-export to a zip, bulk-link requirements to documents.

Tool Reference

All tools.

Meta & Control Plane (5)
ToolDescription
policies_health_checkSurface-by-surface reachability (Portal/Compliance/MVC) and session metrics
policies_get_session_metricsCall counts, errors, retries, average duration
policies_reset_session_metricsReset counters for a new job
policies_list_capabilitiesTool inventory by category with descriptions
policies_query_allAuto-paginate any Portal or Compliance collection endpoint
Policy Manager — Documents

Document tools.

List, retrieve, create, edit, archive, and delete policy documents. Route session setup where the MVC admin app requires it. Uses POLICIES_ORG_SLUG for the subdomain and the OIDC Playwright flow for session auth.

Documents
ToolDescription
policies_list_documentsList documents grouped by type (All / POLICIES / PROCEDURES / STANDARDS / CODES / GUIDELINES)
policies_list_by_typeList documents in a given group with pagination
policies_get_documentFull document detail with reference data for edit forms
policies_get_document_metadataLighter read — document object only, no reference lists
policies_create_documentCreate a new document MUTATES
policies_save_general_infoUpdate document metadata (name, description, category) MUTATES
policies_archive_documentArchive a document MUTATES
policies_unarchive_documentUnarchive a document MUTATES
policies_search_documentsAdvanced search across documents
policies_get_blob_contentDownload the document body (Word/PDF)
policies_get_historyRevision history with comments
policies_compare_versionsDiff two versions of a document
policies_get_cross_referencesDependent docs, website refs, regulation links
policies_save_cross_referencesSave cross-references MUTATES
policies_get_public_urlsPublished As-link URLs for a document
policies_upload_document_sectionUpload .docx content as a section MUTATES
Components

Reusable content blocks that get embedded into documents.

ToolDescription
policies_list_component_groupsList component groups (top level)
policies_list_component_groupList components within a group
policies_get_componentComponent content
policies_get_component_metadataComponent metadata and configuration
policies_create_componentCreate a new component MUTATES
policies_save_component_dataSave component content/metadata MUTATES
policies_upload_component_contentUpload .docx content into a component MUTATES
Review cycles & tasks

Workflow tools.

ToolDescription
policies_list_task_groupsList all task groups
policies_list_task_groupList tasks inside a group
policies_get_work_itemGet the review-cycle work item for a document
policies_take_ownershipTake ownership of a review task MUTATES
policies_save_taskSave/update a review task MUTATES
policies_remove_taskRemove a task MUTATES
Publishing

Publishing tools.

ToolDescription
policies_get_public_urlsPublic As-link URLs for published documents
policies_clear_previewClear a document's preview cache
policies_unlock_documentUnlock a document held by a user session MUTATES
Regulations & compliance mapping

Regulation tools.

ToolDescription
policies_validate_regulation_nameCheck regulation name uniqueness
policies_create_regulationCreate a regulation MUTATES
policies_get_subcategoriesList subcategories
policies_get_regulation_requirementsList requirements for a regulation
policies_save_requirementSave a requirement MUTATES
policies_save_referenceSave a reference MUTATES
policies_get_required_documentsDocuments linked to a requirement
policies_add_documents_to_requirementLink documents to a requirement MUTATES
policies_edit_regulationLoad a regulation edit form
policies_save_attachmentsSave attachments to a regulation MUTATES
Admin & configuration

Admin tools.

Everything behind policies_admin_* configures the solution rather than authoring content. Separate bucket, separate mental model.

ToolDescription
policies_admin_list_workflowsList review workflows
policies_admin_get_workflowWorkflow definition detail
policies_admin_save_workflowCreate/update a workflow MUTATES
policies_admin_list_task_definitionsList review task definitions
policies_admin_save_task_definitionCreate/update a task definition MUTATES
policies_admin_list_workflow_assignmentsWorkflow assignment rules by document type
policies_admin_save_workflow_assignmentAssign a workflow to a document type MUTATES
policies_admin_list_queuesReview queues
policies_admin_save_queueCreate/update a queue MUTATES
policies_admin_get_queue_usersQueue membership
policies_admin_save_queue_usersSave queue membership MUTATES
policies_admin_list_templatesDocument templates
policies_admin_save_template_assignmentSave template assignment MUTATES
policies_admin_list_tag_groupsTag groups
policies_admin_save_tag_groupCreate/update a tag group MUTATES
policies_admin_list_reference_domainsReference domain definitions
policies_admin_list_reference_codesReference code values
policies_admin_save_reference_domainCreate/update a reference domain MUTATES
policies_admin_save_reference_codeCreate/update a reference code MUTATES
policies_admin_list_review_frequenciesReview frequencies
policies_admin_list_security_groupsSecurity groups
policies_admin_get_security_groupSecurity group detail
Users & session

User tools.

ToolDescription
policies_list_usersList all users
policies_get_userUser detail
policies_list_subscribersList subscribers
policies_get_ui_settingsUI preferences for the current user
policies_save_preferencesSave user preferences MUTATES
policies_pingSession keepalive
Bulk import & export

Bulk tools.

V0.1 implements bulk operations client-side by looping over single-record tools. Native bulk endpoints (the native .xlsx + .docx-in-.zip flow exposed by the Policy Manager UI) are on the roadmap — see knowledge/80-ui-automation-roadmap.md.

ToolDescription
policies_bulk_create_documentsCreate many documents from a manifest MUTATES
policies_bulk_export_documentsExport a batch of documents to a local directory
policies_bulk_archive_documentsArchive many documents MUTATES
policies_bulk_unarchive_documentsUnarchive many documents MUTATES
policies_bulk_create_regulationsCreate many regulations MUTATES
policies_bulk_link_requirements_to_documentsLink requirements to documents in bulk MUTATES
Schema & data dictionary

Schema tools.

ToolDescription
policies_schema_detectionFast sample (~5 instances) of a resource's attributes
policies_get_inventory_schemaDeep introspection (default 50) with type inference, population rates, samples
policies_build_data_dictionaryComposite across every resource
policies_list_brain_canonical_inventoriesRiskapture Brain canonical inventories (read-only)
policies_compare_inventory_to_brainAlign observed to canonical — aligned / onlyInBrain / onlyInObserved / typeConflicts
policies_find_duplicate_documentsCluster documents by normalized name + category
Cache

Cache tools.

ToolDescription
policies_cache_statusKeys by prefix, bytes, hit/miss/write counters, file path
policies_clear_cacheTargeted purge: all / reference / instances / portal / brain
Escape hatch

Raw API.

ToolDescription
policies_api_rawCall any Portal/Compliance/MVC endpoint (GET or non-destructive POST) with full content-type control. DELETE blocked.
Configuration

Environment variables.

VariableRequiredDescription
POLICIES_BASE_URLYesAPI base URL (e.g. https://apis-us.diligentoneplatform.com)
POLICIES_API_TOKENYesBearer for Policy Portal + Compliance APIs
POLICIES_ORG_IDYesOrganisation ID (numeric)
POLICIES_ORG_SLUGYesSubdomain of policymanager.diligentoneplatform.com (e.g. piedpiper)
POLICIES_REGIONNoRegion code — us / ca / eu / ap / au / af / jp (default us)
POLICIES_UI_EMAILIf MVCOIDC email — required for MVC admin-app tools
POLICIES_UI_PASSWORDIf MVCOIDC password
POLICIES_UI_FALLBACKNoSet to false to disable the Playwright fallback
POLICIES_CACHE_ENABLEDNoDefault true
POLICIES_CACHE_DIRNoDefault ~/.cache/diligent-policies-mcp
POLICIES_LOG_FILENoPath for JSONL request log
Constraints

Hard rules.

Hybrid auth routing
Tools choose the API surface automatically. Portal/Compliance calls use the bearer token; MVC-admin calls use the OIDC session cookie via Playwright.
Credentials never committed
A per-project .env is the only credential store. .env is git-ignored. Nothing is written to ~/.env or any global location.
MVC fallback opt-out
Set POLICIES_UI_FALLBACK=false to disable the Playwright fallback. MVC-only tools will then fail fast with a clear message instead of attempting OIDC.
Cache trusts write-invalidation
Never manually clear the cache after a write tool — invalidation fires automatically on mutators.
Rate limits respected
The bearer client retries on 429 / 5xx with exponential backoff. The MVC client retries once on session expiry.
DELETE is dedicated-tool-only
policies_api_raw does not support DELETE. Use a dedicated delete tool (e.g. policies_archive_document, bulk delete) so the cache is invalidated correctly.
Quick start

Getting started.

1. Install via the one-liner above, or clone from GitHub

2. Set your environment variables — bearer token from Admin Hub > API Access Tokens, plus OIDC email/password if you want MVC-admin coverage

3. Restart Claude Code: /mcp reset diligent-policies

4. Start with policies_health_check to verify connectivity

5. Run policies_list_capabilities to see all available tools

6. Run policies_build_data_dictionary for a full snapshot of the current data shape