Skip to main content
Glama
MCP-Confirm

MCP-Confirm

by mako10k

@mako10k/mcp-confirm

An MCP server that implements confirmation protocols between AI and users. It provides tools for LLMs to request user confirmation when they need clarification or verification.

@mako10k/mcp-confirm

A Model Context Protocol (MCP) server for AI-user confirmation and clarification. This server provides tools for AI assistants (LLMs) to ask users for confirmation when they need clarification or verification.

Overview

This MCP server implements the Model Context Protocol Elicitation specification to enable confirmation and clarification protocols between AI assistants and users.

AI assistants can use this in situations such as:

  • Confirming actions before execution

  • Clarifying ambiguous requests

  • Verifying understanding is correct

  • Asking yes/no questions

  • Collecting user satisfaction ratings

Related MCP server: askme-cli

Features

Available Tools

  1. ask_yes_no

    • Ask yes/no confirmation questions

    • Used when AI needs clarification or verification

  2. confirm_action

    • Confirm actions before execution

    • Includes impact and details in confirmation dialog

  3. clarify_intent

    • Clarify ambiguous requests

    • Present multiple interpretation options

  4. verify_understanding

    • Verify AI's understanding is correct

    • Confirm next steps before proceeding

  5. collect_rating

    • Collect user satisfaction ratings

    • Evaluate AI response quality

  6. elicit_custom

    • Custom confirmation dialogs

    • Use custom JSON schemas

  7. search_logs

    • Search confirmation history logs

    • Filter by type, success status, date range, response time

    • Paginated results for large datasets

  8. analyze_logs

    • Statistical analysis of confirmation history

    • Success rates, response times, trends

    • Grouping by type, time period, etc.

Installation

# Install globally
npm install -g @mako10k/mcp-confirm

# Or use with npx
npx @mako10k/mcp-confirm

Development with GitHub Codespaces

This project supports development with GitHub Codespaces:

  1. Open this repository on GitHub

  2. Click the "Code" button

  3. Select the "Codespaces" tab

  4. Click "Create codespace on main"

  5. The development environment will be set up automatically

For details, see DEVELOPMENT.md.

Configuration

Environment Variables

You can configure the server using environment variables:

  • MCP_CONFIRM_LOG_PATH: Path to confirmation history log file (default: .mcp-data/confirmation_history.log)

  • MCP_CONFIRM_TIMEOUT_MS: Default timeout for confirmations in milliseconds (default: 180000 = 3 minutes)

    • Minimum: 5000 (5 seconds)

    • Maximum: 1800000 (30 minutes)

    • Invalid values will fall back to default with warning

  • NODE_ENV: Set to development to enable debug logging

Timeout Configuration Examples

# Use 5-minute timeout
export MCP_CONFIRM_TIMEOUT_MS=300000

# Use 1-minute timeout  
export MCP_CONFIRM_TIMEOUT_MS=60000

# Use 10-second timeout (minimum enforced)
export MCP_CONFIRM_TIMEOUT_MS=10000

Timeout Behavior

The server uses intelligent timeout settings based on confirmation type:

  • Critical actions (delete, remove operations): 120 seconds

  • Warning actions: 90 seconds

  • Simple yes/no questions: 30 seconds

  • Rating requests: 20 seconds (reference only)

  • Other confirmations: 60 seconds (default)

Confirmation History Logging

All confirmation interactions are logged to a file for audit purposes. The log includes:

  • Timestamp of the request

  • Confirmation type

  • Full request and response data

  • Response time in milliseconds

  • Success/failure status

  • Error messages (if any)

The log directory (.mcp-data/) will be created automatically if it doesn't exist.

VS Code Integration

Add to your .vscode/mcp.json:

{
  "servers": {
    "mcp-confirm": {
      "type": "stdio",
      "command": "npx",
      "args": ["@mako10k/mcp-confirm"]
    }
  }
}

Claude Desktop Configuration

Add to your Claude Desktop config.json:

Windows

Location: %APPDATA%\Claude\config.json

macOS

Location: ~/Library/Application Support/Claude/config.json

Linux

Location: ~/.config/claude/config.json

{
  "mcp": {
    "servers": {
      "mcp-confirm": {
        "command": "npx",
        "args": ["@mako10k/mcp-confirm"],
        "env": {
          "MCP_CONFIRM_LOG_PATH": "~/.mcp-data/confirmation_history.log",
          "MCP_CONFIRM_TIMEOUT_MS": "60000",
          "NODE_ENV": "production"
        }
      }
    }
  }
}

Usage Examples

Basic Confirmation

// Before AI executes an action
await confirm_action({
  action: "Delete files",
  impact: "Cannot be restored",
  details: "10 files will be deleted"
});

Intent Clarification

// When request is ambiguous
await clarify_intent({
  request_summary: "Want to create a project",
  ambiguity: "Type of project unclear",
  options: ["Node.js project", "Python project", "React app"]
});

Understanding Verification

// Before complex tasks
await verify_understanding({
  understanding: "Create web application with user authentication",
  key_points: ["React + Node.js", "JWT authentication", "PostgreSQL database"],
  next_steps: "Create project structure then implement auth system"
});

Technical Specifications

  • Protocol: Model Context Protocol Elicitation

  • Language: TypeScript

  • Runtime: Node.js

  • SDK Version: @modelcontextprotocol/sdk ^1.0.0

How It Works

This server implements true MCP Elicitation protocol:

  1. Sends elicitation/create method to client

  2. Defines user input structure with JSON Schema

  3. User responds with accept, decline, or cancel

  4. On accept, receives structured data following schema

This enables reliable communication between AI and users.

Development

# Clone repository
git clone https://github.com/mako10k/mcp-confirm.git
cd mcp-confirm

# Install dependencies
npm install

# Build
npm run build

# Run locally
npm start

# Quality checks
npm run quality

License

MIT License - see LICENSE file for details.

Repository

Available Tools

8 tools
analyze_logsC

Perform statistical analysis on confirmation history logs

Inputs: startDate, endDate, groupBy.

ask_yes_noA

Ask a yes/no confirmation question to the user when the AI needs clarification or verification

Inputs: question (required).

clarify_intentA

Ask user to clarify their intent when the request is ambiguous or could be interpreted multiple ways

Inputs: request_summary (required), ambiguity (required), options.

collect_ratingC

Collect user satisfaction rating for AI's response or help quality

Inputs: subject (required), description.

confirm_actionB

Ask user to confirm an action before proceeding with potentially impactful operations

Inputs: action (required), impact, details.

elicit_customA

Create a custom confirmation dialog with specific schema when standard tools don't fit

Inputs: message (required), schema (required).

search_logsC

Search confirmation history logs with various filters and pagination

Inputs: keyword, confirmationType, startDate, endDate, +6 more.

verify_understandingC

Verify that the AI correctly understood the user's requirements before proceeding

Inputs: understanding (required), key_points, next_steps.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no ambiguity. For example, ask_yes_no handles simple binary questions, clarify_intent addresses ambiguous requests, confirm_action verifies impactful operations, and verify_understanding checks comprehension—all serving different confirmation needs without overlap.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with clear, descriptive names. Examples include analyze_logs, search_logs, collect_rating, and verify_understanding, maintaining uniformity throughout the set without any deviations in style or structure.

    Tool Count5/5

    With 8 tools, the server is well-scoped for handling user confirmation and verification tasks. Each tool earns its place by covering distinct aspects like questioning, clarification, logging, and feedback, avoiding both bloat and insufficiency.

    Completeness5/5

    The tool set provides complete coverage for the confirmation domain, including standard confirmations (ask_yes_no, confirm_action), intent handling (clarify_intent, verify_understanding), feedback collection (collect_rating), logging (analyze_logs, search_logs), and customization (elicit_custom), with no apparent gaps.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A cross-platform MCP server that provides native popup windows for AI agents to gather user feedback, input, and safety confirmations. It enables agents to present interactive questionnaires and secure confirmation prompts for sensitive operations like file deletion or code execution.
      13
      MIT
    • A
      license
      A
      quality
      A
      maintenance
      An MCP server that enables AI agents to pause and request human approval or information via Slack, Telegram, or macOS dialogs before proceeding with actions.
      2
      15
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server enabling AI agents to request user feedback during tasks, reducing wasted API calls. Optimized for data sync workflows with tools for audience sync confirmation, DMP verification, and rollback confirmation.
      MIT