MCP77 tools

AI Agent Tools (MCP)

77 schema-validated MCP tools that give Claude, GPT, Gemini, n8n, and custom agents structured, role-gated access to your accounting data. Agents can query portfolios, extract lease terms, run the engine, and draft disclosures — but cannot approve journal entries without human sign-off. This is enforced at the API layer, not by convention.

MCP endpoint
https://api.ledgerlayer.app/mcp
Protocol
MCP 2025-03-26 (HTTP + SSE streaming)
Compatible with
Claude, ChatGPT, Gemini, n8n, LangChain, custom agents

The key rule: AI agents can propose actions via MCP tools, but journal entry approval (journal_approve) requires ADMIN or OWNER role — a human in the loop. This is enforced at the API layer. An agent with a PREPARER token will receive a 403 error if it attempts to approve, regardless of what instructions its prompt contains.

What's new — v5.1

Revenue Recognition — Advanced is live. The tools below are new or materially extended — agents already authenticated to the MCP endpoint can call them immediately (subject to role / scope).

Revenue recognition automation
revenue_contract_confirmrevenue_contract_recalculaterevenue_engine_monthly_close

Confirming a revenue contract auto-runs INITIAL_RECOGNITION per configured standard. Use revenue_contract_recalculate to replay the engine after policy or input changes. revenue_engine_monthly_close runs the batch close idempotently per (entity, standard, period).

Revenue journal lifecycle
revenue_journal_summaryrevenue_journal_approverevenue_journal_approve_batchrevenue_journal_reverserevenue_journal_voidrevenue_journal_posting_reference

Summary rollup, single + batch approve, void, reversal, and external posting-reference stamp for revenue journals. Combine with revenue_journal_search + revenue_journal_detail for end-to-end journal workflows.

Unified disclosure pack
revenue_disclosures_packrevenue_disclosure_narrative_override_upsertlease_disclosure_narrative_override_getlease_disclosure_narrative_override_upsert

revenue_disclosures_pack returns a single structured payload covering all 7 revenue disclosure sections; COMBINED scope merges IFRS 15 + ASC 606 side-by-side. Auditor narrative overrides are available on both revenue and lease disclosure packs, with independent APPROVER+ gating.

Lease period locks
lease_period_lock_getlease_period_lock_upsert

First-class period-lock state for lease: reads return a synthetic OPEN record when no lock exists; upsert requires APPROVER and confirm=true. The lease engine enforces the lock at entry — locked adjustments return 409 LEASE_PERIOD_LOCKED unless the caller opts into allow_locked_period_adjustment + confirm_locked_period_adjustment.

Lease pre-confirm validation
lease_validate_enhanced

Read-only business-rule checker that flags missing payment streams, IBR / FX rate gaps (when context rows are supplied), short-term exemption hints, unusual discount rates, and missing restoration costs. Use before lease_confirm to gate on zero errors; warnings are advisory.

Revenue contract editing + file ingest
revenue_contract_patchrevenue_contract_extract_file

Patch core contract fields post-confirm. Contract extraction accepts uploaded PDF / DOCX / XLSX files directly, mirroring lease_extract_file.

Full tool catalog

Lease
lease_extract
Extract lease terms from Excel, PDF, or text via AI
Lease
lease_extract_file
Upload file attachment for AI extraction
Lease
lease_confirm
Confirm extracted lease data and trigger engine run
Lease
lease_detail
Get full lease record including schedule and status
Lease
lease_patch
Modify discount rate, term, status, modification, or termination on an existing lease
Lease
lease_schedule
Retrieve amortisation schedule for a lease
Lease
lease_validate_enhanced
Pre-confirm business-rule validator — flags missing payment streams, IBR/FX gaps, exemption hints, and restoration cost gaps
Lease
lease_period_lock_get
Read lease period-lock state for (entity, reporting_standard)
Lease
lease_period_lock_upsert
Lock or unlock lease periods per standard (APPROVER+)
Lease
lease_disclosure_narrative_override_get
Read auditor narrative override on a lease disclosure pack
Lease
lease_disclosure_narrative_override_upsert
Upsert auditor narrative override on a lease disclosure pack (APPROVER+)
Portfolio
portfolio_summary
Portfolio-level ROU assets, liabilities, and cash flows
Portfolio
portfolio_search
Search leases by entity, currency, standard, or status
Portfolio
portfolio_analytics
Maturity buckets, IBR distribution, upcoming renewals
Journals
journal_search
Search journal entries with filters and pagination
Journals
journal_detail
Get full journal entry with line items
Journals
journal_summary
Aggregate journal data by period or account
Journals
journal_approve
Approve a journal entry (APPROVER+)
Journals
journal_approve_batch
Approve multiple journal entries in one operation
Journals
journal_reverse
Create a reversal JE for an approved entry
Journals
journal_void
Void a pending journal entry before approval
Journals
journal_export
Export approved JEs in CSV, XLSX, or JSON — for any ERP, iPaaS, or agent stack
Engine
engine_run
Run the accounting engine for entity/period (lease scenarios)
Engine
engine_monthly_close
Batch monthly close per entity + standard
Disclosures
disclosures_get
Get IFRS 16 or ASC 842 disclosure pack
Disclosures
fsimpact_get
Financial statement impact for entity/period
Revenue
revenue_contract_extract
AI extraction of revenue contract terms from text
Revenue
revenue_contract_extract_file
AI extraction from an uploaded contract file (PDF/DOCX/XLSX)
Revenue
revenue_contract_confirm
Confirm contract data and auto-chain INITIAL_RECOGNITION per standard
Revenue
revenue_contract_patch
Patch core revenue contract fields post-confirm
Revenue
revenue_contract_detail
Get full contract with obligations and schedules
Revenue
revenue_contract_search
Search revenue contracts with filters
Revenue
revenue_contract_recalculate
Re-run the recognition engine for a contract (after policy changes or corrections)
Revenue
revenue_engine_run
Run the recognition engine for a specific scenario
Revenue
revenue_engine_monthly_close
Batch monthly close across revenue contracts for an entity + standard
Revenue
revenue_schedule_get
Revenue recognition schedule for a contract
Revenue
revenue_journal_search
Search revenue journal entries
Revenue
revenue_journal_detail
Get revenue journal entry with line items
Revenue
revenue_journal_summary
Revenue journal summary rollup by account, status, or entity
Revenue
revenue_journal_approve
Approve a revenue journal entry (APPROVER+)
Revenue
revenue_journal_approve_batch
Approve multiple revenue journal entries in one operation
Revenue
revenue_journal_reverse
Create a reversal JE for an approved revenue entry
Revenue
revenue_journal_void
Void a pending revenue journal entry before approval
Revenue
revenue_journal_posting_reference
Stamp an external-system posting reference on an approved revenue JE
Revenue
revenue_disclosures_get
IFRS 15 / ASC 606 single-disclosure rows
Revenue
revenue_disclosures_pack
Unified revenue disclosure pack — single-standard or COMBINED IFRS 15 + ASC 606
Revenue
revenue_fsimpact_get
Revenue financial statement impact
Revenue
revenue_disclosure_narrative_override_upsert
Upsert auditor narrative override on a revenue disclosure pack (APPROVER+)
Revenue
revenue_period_lock_upsert
Lock or unlock revenue periods per standard (APPROVER+)
Revenue
revenue_policy_snapshot_create
Bind a revenue policy snapshot to an entity (APPROVER+)
Revenue
revenue_ssp_matrix_upsert
Upload or update the stand-alone selling price matrix for IFRS 15 allocation
Config
entities_list
List entities (legal entities in scope)
Config
entity_settings_get
Read entity-level settings and policy elections
Config
entity_settings_upsert
Update entity-level settings and policy elections
Config
ibr_rates_list
List IBR rate entries
Config
ibr_rates_upsert
Upload or update IBR rate matrix
Config
fx_rates_list
List FX rate entries
Config
fx_rates_upsert
Upload or update FX rate table
Config
policy_bind
Bind an accounting policy to an entity
Config
policy_coverage
Check policy coverage for an entity
Config
policy_conflicts
Detect conflicting policy elections
Config
policy_resolve
Resolve a policy conflict for an entity
Config
policy_rebase
Rebase entity policies from a parent template
Config
policy_grandfathering
Check grandfathering eligibility for legacy leases
Ingest
ingest_csv_extract
Extract lease data from CSV upload
Ingest
ingest_xlsx_extract
Extract lease data from Excel upload
Ingest
ingest_confirm
Confirm ingested data and route to engine
Ingest
smart_ingest_extract
Smart AI extraction from any file format (revenue or lease auto-routed)
Ingest
smart_ingest_confirm
Confirm smart-ingested data
System
system_health
Check API and engine health status
System
system_metadata
Get entity metadata and configuration
System
session_whoami
Return the authenticated principal, role, scopes, and allowed tools
System
audit_list
Search audit trail entries with filters
System
prompt_template_get
Get AI prompt templates for extraction
Notifications
notifications_list
List maturity, renewal, and workflow notifications
Notifications
notifications_create
Create a manual notification or alert
Notifications
notifications_set_status
Mark notifications as read or dismissed

Quick start with Claude Desktop

Add the Ledger Layer MCP server to your Claude Desktop configuration file (claude_desktop_config.json). Provide your Bearer token. Claude will immediately have access to all tools — scoped to your role. No additional setup, no SDK, no code.

In Claude Desktop: Settings → Developer → Edit Config. Add the Ledger Layer MCP server URL and your Bearer token. Restart Claude. You can now ask Claude to "show me a summary of my lease portfolio" or "extract the lease terms from this Excel file" and it will use the appropriate Ledger Layer tools automatically.

Quick start with Claude Code

Add the Ledger Layer MCP server to your Claude Code settings (project or global). The tools appear in Claude Code's tool list immediately. Use them to query your portfolio, review journal entries, or trigger engine runs — all from your terminal.

In your project's .claude/settings.json or ~/.claude/settings.json, add the Ledger Layer MCP server configuration. Claude Code discovers the tools automatically and makes them available in your coding session.

Schema validation and error handling

Every tool call is validated against a JSON Schema before the request reaches the engine. Invalid inputs are rejected at the MCP layer with a structured error message that describes exactly which field failed validation and why. The engine never receives malformed data.

Tool schemas are embedded in the MCP server manifest and returned during the tools/list handshake. AI agents use these schemas to construct valid requests. If a required field is missing, a type is wrong, or a value is out of range, the error response includes the field name, expected type, and constraint that was violated.

Agent access scope and role gating

Agents authenticate with the same Bearer token format as human users. The role carried by the token gates every tool call. An agent with a PREPARER token can extract leases, run the engine, and query journals — but cannot approve. An agent with a VIEWER token can query but cannot modify anything. This is enforced server-side.

Role hierarchy: OWNER > ADMIN > PREPARER > VIEWER. Each tool in the catalog has a minimum required role. The MCP server returns a 403 error with a clear message when a tool call exceeds the token's role. This prevents prompt injection from escalating agent privileges — no matter what an AI agent is instructed to do, the API enforces the role boundary.

Multi-agent orchestration

Ledger Layer MCP tools are designed for multi-agent workflows. One agent can extract lease data, another can review the extraction, and a human can approve the final journal entries. Each agent operates within its role boundary. The audit trail captures which agent (by token identity) performed each action.

For complex workflows, use n8n, LangChain, or your own orchestration layer to chain Ledger Layer MCP calls. The engine is stateless per request — agents don't need to maintain session state. Idempotency keys prevent duplicate operations when agents retry failed calls.

Webhook integration for agents

Combine MCP tools with webhooks for event-driven agent workflows. An agent can subscribe to engine events (journal.created, close.completed) and trigger follow-up actions — like generating a portfolio summary after monthly close completes, or alerting a Slack channel when a lease modification is detected.

Webhooks deliver events to any HTTP endpoint. The payload includes the full resource representation and metadata (event_id, event_type, timestamp, actor). Agents can process webhook payloads and use MCP tools to respond — creating a closed-loop automation pattern with human approval gates at critical points.

What agents can do with Ledger Layer

Query and summarise

Ask Claude "what's my total lease liability by entity?" and it queries portfolio_summary, formats the answer, and explains the breakdown — from engine-verified data.

Extract and prepare

Upload a lease contract PDF. The agent calls lease_extract_file, reviews the extracted terms, and presents them for your confirmation before anything hits the engine.

Draft and review

Ask the agent to draft a disclosure summary from disclosures_get output. It reads engine-verified numbers and produces human-readable disclosure language — without computing anything.

Monitor and alert

An n8n workflow calls portfolio_analytics daily, checks for leases expiring within 90 days, and sends a Slack notification to the lease manager with renewal options.

Automate close prep

Before monthly close, an agent runs portfolio_search for all active leases, verifies IBR rates are current, and generates a pre-close readiness report for the controller.

Audit support

An agent queries journal_search and audit_list to compile a complete audit package — every journal entry with its source lease, approval actor, and modification history.

Connect your AI agent to Ledger Layer

MCP server credentials, tool manifest, and quickstart guides available in the dashboard after signup. Works with Claude, GPT, Gemini, n8n, and any MCP-compatible agent.

Get MCP access
← API Reference