Metadata-Version: 2.4
Name: sakshi-mcp
Version: 0.2.0
Summary: Sakshi governance as an MCP server: witness, enforce, and check regulatory readiness from any MCP-capable agent — no SDK integration required.
Author: RotaVision
License: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.2
Description-Content-Type: text/markdown

# sakshi-mcp

**Sakshi governance as an [MCP](https://modelcontextprotocol.io) server.** Any
MCP-capable agent or host — Claude Desktop, Cursor, an agent framework — gains
three governance tools **without integrating the SDK**:

| Tool | When the agent calls it |
|---|---|
| `enforce_action` | *Before* a consequential action (move money, change records, contact a customer): returns `auto` / `async_review` / `sync_review` / `block`. A kill switch or safe-mode outranks the envelope. |
| `witness_decision` | *After* executing a consequential tool: records it on the tamper-evident chain and returns the sequence number + record hash (the receipt). |
| `check_readiness` | Any time: the live regulator-readiness score per instrument (RBI MRM / DPDP / SEBI / IRDAI). |

This is the MCP analogue of the Sakshi SDK: opt-in, so it is **evidence +
advisory enforcement** — the agent chooses to consult it. Hard enforcement in
the tool path (an intercepting proxy) is the heavier sibling and shares this
server's plumbing.

Sakshi never sees raw identifiers here: the server is a *client* of the Sakshi
API, so every call rides the same tokenization and hash-chain path as any
other ingest.

## Configure it in an MCP host

```json
{
  "mcpServers": {
    "sakshi-governance": {
      "command": "sakshi-mcp",
      "env": {
        "SAKSHI_API_URL": "https://sakshi.your-bank.internal",
        "SAKSHI_MCP_API_KEY": "sks_..."
      }
    }
  }
}
```

`SAKSHI_API_URL` defaults to `http://localhost:8000`; `SAKSHI_MCP_API_KEY` is a
Sakshi ingest key (falls back to `SAKSHI_API_KEY`).

## Run it directly

```bash
pip install sakshi-mcp
SAKSHI_API_URL=... SAKSHI_MCP_API_KEY=sks_... sakshi-mcp        # stdio (default)
SAKSHI_MCP_TRANSPORT=streamable-http sakshi-mcp                 # serve over HTTP
```

Apache-2.0.
