Skip to content

Proposal: optional governed AI (MCP) access (off by default, no UI) #1545

Description

@sandeepshekhar26

Hi — Books being local-first with no API is exactly why I think it'd shine with a governed AI
integration, so I wanted to float it before opening a PR.

I'd like to contribute an optional, off-by-default, backend-only way to let a user's AI assistant
operate Books safely as a governed MCP server: reads/reports flow freely, routine record-keeping is
audited, and creating a financial document or submitting one (which posts the double-entry ledger) —
plus anything destructive — pauses for one-click human approval, all signed into an audit log.

It adds no dependency, no UI, and no change to the app: the handler reuses the same headless fyo
layer your test harness uses (new Fyo({ DatabaseDemux: DatabaseManager, isElectron: false })), so an
agent call runs the identical Doc.sync()/.submit() a human action does. It's a self-contained
kriya-mcp/ folder (+ a one-line .eslintrc.js ignore), inert unless explicitly enabled.

I've built and verified it end-to-end (create party → item → invoice → submit posts a balanced
ledger). Would a PR be welcome? Glad to scope it however you prefer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions