New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@appmonster/approval

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appmonster/approval

Human-in-the-loop approval client for AI agents: ask a person before a write, wait for the answer. Works with any MCP server's approveWrite hook.

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@appmonster/approval

Ask a human before an AI agent does something irreversible. Every K-MCP server runs its write tools through this.

import { writeGateFromEnv, takeConfirmToken } from "@appmonster/approval";

const gate = writeGateFromEnv(process.env, { source: "my-server" });
const { args, token } = takeConfirmToken(rawArgs);
const g = await gate.check("toss_cancel_payment", args, token);
if (!g.ok) return g.message;   // preview / rejected / quota — show it to the agent
ModeEnvBehaviour
confirm (default)—First call returns a preview + one-time confirm_token; runs only when re-called with it (same args, 10 min).
approvalOKAGENT_API_KEY=ok_…Creates a request at OK Agent; the owner approves on KakaoTalk (or an auto-approve rule does).
directKMCP_WRITE_MODE=directNo check.

Other env: OKAGENT_URL (default https://okagent.kr), APPROVAL_TIMEOUT_SEC (default 600), APPROVAL_SOURCE. Legacy APPROVAL_URL / APPROVAL_API_KEY still work.

Lower level: ApprovalClient (create / get / ask) and createApprover() for hosts that only want a boolean approveWrite hook.

MIT

Keywords

mcp

FAQs

Package last updated on 23 Oct 2026

Related posts