@looppause/mcp

@looppause/mcp

Pauses AI agent execution and routes approval requests to humans via Slack or email, with cryptographically signed proof of the human's decision.

Category
访问服务器

README

@looppause/mcp

MCP server for LoopPause — pause AI agent execution and route approval requests to humans via Slack or email. The agent receives a cryptographically signed proof of the human's decision and resumes.

"The missing primitive so agents don't go rogue — or die waiting for approval."


What it does

Exposes two MCP tools: request_approval and check_approval

  1. request_approval — sends the approval request to the human and returns a pause_id immediately
  2. check_approval — polls once for the decision; call repeatedly until decision is "approved" or "rejected"

This two-step pattern keeps each tool call short, avoids long-running connections, and gives the agent an explicit checkpoint to verify before proceeding. The agent can verify the HMAC signature with its LOOPPAUSE_SIGNING_SECRET before trusting the decision.


Installation

Recommended: npx (no install required)

npx @looppause/mcp

Global install

npm install -g @looppause/mcp
looppause-mcp

Configuration

Environment variable Required Description
LOOPPAUSE_API_KEY ✅ Yes Your LoopPause API key (sk_live_…)
LOOPPAUSE_API_URL No Override the API base URL (default: https://api.looppause.com)

Get your API key at looppause.com/dashboard.


Usage in Claude Code

Add to your .claude/settings.json (or ~/.claude/settings.json for global):

{
  "mcpServers": {
    "looppause": {
      "command": "npx",
      "args": ["-y", "@looppause/mcp"],
      "env": {
        "LOOPPAUSE_API_KEY": "sk_live_your_key_here"
      }
    }
  }
}

Usage in Cursor

Add to your Cursor MCP configuration:

{
  "mcpServers": {
    "looppause": {
      "command": "npx",
      "args": ["-y", "@looppause/mcp"],
      "env": {
        "LOOPPAUSE_API_KEY": "sk_live_your_key_here"
      }
    }
  }
}

Tool reference

request_approval

Sends the approval request and returns immediately. Do not proceed with the action until check_approval returns { decision: "approved" }.

request_approval({
  // Required
  action_description: string,   // What the agent is about to do (shown to human)
  action_details: Record<string, string>, // Key-value context (amount, vendor, etc.)

  // At least one recipient required
  recipient_email?: string,     // Email address
  recipient_slack?: string,     // Slack channel (#approvals) or user ID (U12345)

  // Optional
  timeout_hours?: number,       // Default 24, max 168 (1 week)
})

When both recipient_slack and recipient_email are provided, Slack is the primary channel and email is the fallback.

Returns:

{
  "pause_id": "pse_01jwxyz123",
  "status": "pending",
  "expires_at": "2026-05-24T14:00:00.000Z",
  "MANDATORY_NEXT_STEP": "You MUST call check_approval with this pause_id and wait for decision: 'approved' before taking any action. Do NOT proceed with the requested action until check_approval returns { decision: 'approved' }. Proceeding without approval is a safety violation."
}

check_approval

Checks the current status of an approval request. Call repeatedly until decision is "approved" or "rejected". Never proceed while status is "pending".

check_approval({
  pause_id: string,  // The pause_id returned by request_approval
})

Returns (pending):

{ "status": "pending" }

Returns (responded):

{
  "pause_id": "pse_01jwxyz123",
  "agent_id": "mcp-agent",
  "status": "responded",
  "created_at": "2026-05-24T10:00:00.000Z",
  "expires_at": "2026-05-24T14:00:00.000Z",
  "response": {
    "decision": "approved",
    "comment": "PO number: PO-2341",
    "fields": { "po_number": "PO-2341" },
    "responder": "sarah@company.com",
    "responded_at": "2026-05-24T10:14:32.000Z",
    "channel": "slack",
    "nonce": "a8f3c2...",
    "signature": "sha256=4d9f1a..."
  }
}
Status Meaning
pending Human has not responded yet — call again
responded Human responded — check response.decision
timed_out No response within timeout_hours
expired Pause was manually cancelled

Example

// Step 1: send the approval request
const created = await mcp.callTool("request_approval", {
  action_description: "Transfer £12,450 to Globex Corp for invoice INV-2341",
  action_details: {
    vendor: "Globex Corp",
    amount: "12450",
    currency: "GBP",
    invoice_ref: "INV-2341",
  },
  recipient_slack: "#finance-approvals",
  recipient_email: "sarah@company.com",
  timeout_hours: 4,
});

const { pause_id } = JSON.parse(created.content[0].text);

// Step 2: poll until a terminal decision arrives
let decision;
while (true) {
  await new Promise((r) => setTimeout(r, 5_000));

  const status = await mcp.callTool("check_approval", { pause_id });
  const body = JSON.parse(status.content[0].text);

  if (body.status === "pending") continue;

  decision = body;
  break;
}

// Step 3: verify signature, then act
if (decision.response?.decision !== "approved") {
  throw new Error("Action rejected or timed out — aborting.");
}

verifySignature(decision); // see below
proceedWithTransfer();

Verifying the signature

Verify the HMAC signature against your LOOPPAUSE_SIGNING_SECRET before trusting the decision:

import { createHmac, timingSafeEqual } from "node:crypto";

function verifyDecision(payload: object): boolean {
  const { signature, ...unsigned } = payload.response;
  const canonical = JSON.stringify(
    Object.fromEntries(Object.entries(unsigned).sort())
  );
  const expected = "sha256=" +
    createHmac("sha256", process.env.LOOPPAUSE_SIGNING_SECRET!)
      .update(canonical)
      .digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(signature);
  return a.length === b.length && timingSafeEqual(a, b);
}

Registry submissions

Smithery.ai

This package includes smithery.yaml for automatic configuration injection.

  1. Fork or publish @looppause/mcp to npm
  2. Submit at smithery.ai/new → enter @looppause/mcp
  3. Smithery will read smithery.yaml and present a UI for users to enter their API key

Anthropic MCP directory

  1. Ensure the package is published to npm as @looppause/mcp
  2. Submit via the Anthropic MCP directory form or the directory submission page when available
  3. List as: @looppause/mcp — LoopPause human-in-the-loop approval tool

Local development

# From the monorepo root
cd packages/mcp
npm run build          # tsc → dist/ + shebang fix
npm run type-check     # type-check only, no emit
npm run dev            # tsx watch (no build step)

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选