MCP Tools Platform Rakontevr MCP catalog and CleverCase cc_* legal workflow tools
CleverCase agents route stories, inference, docs, and domain search through the rakontevr MCP server (tenant-scoped). The tenant plugin (@clevercase/rak-plugin) registers 12 CleverCase-specific cc_* tools alongside the platform catalog.
clevercase setup
# writes .cursor/mcp.json with RAK_TENANT_ID=00000000-0000-4000-a000-000000000003
Tenant preset: RAK_MCP_PRESET=client (reduced catalog — no fleet/deploy tools).
Intent Tool Notes Backlog rsp_storiesSource of truth when DATABASE_URL set Tasks rsp_tasksTaskStore-backed dispatch Create story rsp_story_create → rsp_stories_pushPush to Postgres Pipeline (tenant) rsp_execute_tenantNot platform rsp_executePhase gate rsp_checkRun before phase-7 code drops Run audit rsp_run_status, rsp_auditVerify phase evidence AI query ai_query, ai_statusGateway-routed inference Legal Q&A rsp_ask_iorekIorek with persona/domain Domain rules business_rules_search, workflow_searchDistilled legal rules Tenant RAG rak_extension_rag_queryExtension-scoped retrieval Docs docs_index, docs_validateFilesystem canonical Health cursor_doctor, cursor_team_contextSession bootstrap Gateway gateway_statusHosted gateway reachability Secrets metadata secrets_list, secrets_auditNo secret values
rsp_execute, rsp_plan_and_dispatch, dgx_fleet_status, fleet_*, deploy/rollback tools, rsp_security_scan.
Defined in packages/rak-plugin-clevercase/src/mcp-tools.ts. Twelve tools cover case management, compliance, trust accounting, billing, documents, conflicts, and legal research.
Tool Description Required params cc_case_searchSearch cases by term and status termcc_case_statusCase status and timeline caseIdcc_matter_createCreate a new matter clientId, title, practiceArea, leadAttorney
Tool Description Required params cc_compliance_checkSOC 2 / HIPAA / ABA check for an action action, userId, targetType, targetIdcc_compliance_reportPeriod compliance report startDate, endDate
Tool Description Required params cc_trust_balanceCurrent trust account balance accountIdcc_trust_transaction_logTrust transaction history accountId, startDate, endDate
Tool Description Required params cc_time_entry_createCreate billable time entry matterId, userId, hours, description, billablecc_invoice_generateGenerate matter invoice matterId, billingPeriod
Tool Description Required params cc_document_searchSearch matter documents querycc_conflict_checkConflict-of-interest screening clientName
Tool Description Required params cc_legal_researchIntegrated legal research query
One MCP call per tool per turn — reuse JSON; do not re-call to confirm.
Session start: cursor_doctor once, then rsp_stories for backlog.
Legal domain: call business_rules_search + workflow_search before rsp_ask_iorek with personaId: "gladys", domain: "legal".
Watch _rakMcpBudget — stop new calls when usedPct is high.
rsp_ask_iorek({
question: "What are IOLTA trust posting rules?",
personaId: "gladys",
tenantId: "00000000-0000-4000-a000-000000000003",
domain: "legal",
model: "iorek"
})
MCP audit log: .rakontevr/logs/mcp-tool-audit.jsonl
Field Source sessionIdRAK_CURSOR_SESSION_IDtenantIdMCP server env rspRunId, storyIdOptional MCP env traceIdGateway X-Trace-Id
Failover order: local stdio → cluster nodes → hosted cloud gateway. All connections require RAKONTEVR_SERVICE_KEY + X-Tenant-Id header.