# consentgate-mcp [Health: Active]

**Category:** 🔒 Security  
**Repository:** https://github.com/jessepetersondev/consentgate-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 135  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/consentgate-mcp

## Description
Gate AI agent actions behind a consent policy with human approval via Telegram. Fail-closed.

## Tools
Capabilities this server exposes over MCP:

- **check_action** — Check whether an action is permitted by the ConsentGate owner's consent policy BEFORE you perform it. Call this for any potentially sensitive, irreversible, or high-impact action — e.g. sending email or messages, posting publicly, spending money, deleting or overwriting files, calling external/destructive APIs, or changing system state. Returns a decision: "allow" (you may proceed), "deny" (do NOT proceed), or "ask" (no rule matched — not approval; use request_approval to get a human decision, or ask the user). This call does not block. FAIL CLOSED: if the result is anything other than "allow", do not perform the action.
- **request_approval** — Request a human's explicit approval for an action and BLOCK until they decide or the timeout elapses. Use for high-stakes actions, or whenever check_action returned "ask". The owner gets an Approve/Deny prompt on Telegram. Returns "allow" ONLY if a human tapped Approve. Returns "deny" on tap-deny, on timeout (fail-closed), or when interactive approvals are unavailable (owner not on Pro, or Telegram not linked — see upgrade_required / telegram_linked). NEVER treat a non-"allow" result as permission.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "consentgate-mcp": {
    "command": "npx",
    "args": ["-y","consentgate-mcp"],
    "env": {
      "CONSENTGATE_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `CONSENTGATE_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What consentgate-mcp MCP server does

The consentgate-mcp MCP server adds a consent check between an MCP-capable agent and sensitive actions. It connects to ConsentGate, where configured rules determine whether a proposed action may proceed, must be rejected, or needs a human decision. The server is intended for workflows where an agent may affect external systems, data, communications, or finances.

Its behavior is fail-closed: an agent should continue only after receiving an explicit `allow`. A `deny`, an unresolved request, a timeout, or an unavailable approval path means the agent must not perform the action.

## How it works

An agent first calls `check_action` with the action and related information. ConsentGate evaluates the request against the account's consent rules and returns `allow`, `deny`, or `ask` when no rule matches. The agent can stop immediately for `deny`. For an unmatched or high-stakes action, it can call `request_approval`.

`request_approval` sends an Approve/Deny prompt to the linked Telegram account and waits for a response. It returns `allow` only when the human explicitly taps Approve. A denial, timeout, or unavailable approval service produces `deny`. The wait can last up to 120 seconds; the example configuration uses `wait_seconds` to request a 90-second wait.

## Setup and configuration

Create a ConsentGate account and API key from the ConsentGate dashboard. Set `CONSENTGATE_API_KEY` to the key, which uses the `cg_` format. The server uses `https://consentgate.fyi` by default; set `CONSENTGATE_BASE_URL` when connecting to a self-hosted instance.

For interactive Telegram approval, the account must be on the Pro plan and have a linked Telegram account through the ConsentGate dashboard. The `check_action` tool is available on any plan.

The server can run with the npm command `npx -y consentgate-mcp` over stdio. Claude Desktop can add that command and environment variable in its MCP configuration, while Claude Code can register it with `claude mcp add`. Until the package is published to npm, run the built `dist/index.js` file from a source checkout instead.

## Tools and capabilities

- `check_action`: evaluates an action against ConsentGate rules without blocking. It returns `allow`, `deny`, or `ask`.
- `request_approval`: sends a Telegram approval prompt and waits for an explicit human decision, with a maximum wait of 120 seconds.
- Action details can include fields such as `action`, `category`, `metadata`, and `wait_seconds`, allowing the approval prompt to carry context like an amount or recipient.

## Limitations and notes

The server does not authorize an action merely because no rule rejects it. An unmatched result is `ask`, and the agent must obtain an explicit approval before proceeding. Telegram-based approval depends on the Pro plan, a linked Telegram account, and an available ConsentGate connection.

The consentgate-mcp MCP server provides the decision tools; the calling agent still needs to invoke them at the appropriate point in its policy. The documented transport is stdio, and the source workflow builds `dist/index.js` with npm before running a smoke test.

_Full upstream README: https://allmcps.com/mcp/consentgate-mcp/readme_

