Skip to main content
Glama
README.md
# ziweihui-mcp

Ziweihui MCP server: memory tools with hard secret-screening gates, plus one-time privilege tokens (verify-and-burn) with a fingerprint-only audit ledger.

## Tools (6, all read-only surfaces)

| Tool | Description |
|------|-------------|
| `ops_memory_digest` | Session digest: one-line conclusion + up to 5 points; suspected secret/sensitive lines are hard-filtered. |
| `ops_memory_search` | Memory search: queries containing suspected secret fragments are rejected outright; sensitive hit lines never enter results. |
| `ops_ledger_snapshot` | Ledger snapshot: total count, per-type counts, latest entry. |
| `ops_spec_lint` | Spec lint: checks seven required sections (name/input/output/preconditions/side-effect boundary/risk level/gate). |
| `ziweihui_verify` | Verify a one-time privilege token: verify-and-burn, one token one use. |
| `ziweihui_audit` | Audit ledger: full history, fingerprints only — no plaintext token values. |

Privilege **granting is deliberately not exposed** over MCP: the escalation path never hangs on the tool bus.

## Run

```bash
pip install ziweihui-mcp
ziweihui-mcp          # stdio transport
```

Any MCP client can connect over stdio. No credentials, no persistent storage, no network calls.

## Design notes

- **Hard gates, both directions**: queries that look like secrets are rejected; results that look like secrets are filtered out. The gate list covers common markers (`key`, `token`, `secret`, `password`, `bearer`, `sk-`, `passwd`, `credential`).
- **Verify-and-burn tokens**: a granted token works exactly once; reuse is rejected. The audit ledger records only SHA-256 fingerprints, never plaintext values.
- **In-memory state**: everything lives in the session; nothing touches disk.

## License

MIT