MCP-Confirm

MCP-Confirm

An MCP server implementing AI-user confirmation protocols, providing tools for LLMs to seek user confirmation when uncertain through yes/no questions, action confirmations, intent clarification, understanding verification, and satisfaction ratings.

Category
访问服务器

Tools

ask_yes_no

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

confirm_action

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

clarify_intent

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

collect_rating

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

elicit_custom

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

verify_understanding

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

README

@mako10k/mcp-confirm

AI-ユーザー間の復唱確認プロトコルを実装するMCPサーバーです。LLMが不安になったときに、ユーザーに確認を取るためのツールを提供します。

@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

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

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: 60000)
  • NODE_ENV: Set to development to enable debug logging

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

  • GitHub: https://github.com/mako10k/mcp-confirm
  • npm: https://www.npmjs.com/package/@mako10k/mcp-confirm

機能

利用可能なツール

  1. ask_yes_no

    • はい/いいえの確認質問
    • AIが明確化や検証が必要な時に使用
  2. confirm_action

    • アクション実行前の確認
    • 影響や詳細を含めた確認ダイアログ
  3. clarify_intent

    • あいまいなリクエストの意図確認
    • 複数の解釈オプションの提示
  4. verify_understanding

    • AIの理解が正しいかの検証
    • 次のステップの確認
  5. collect_rating

    • ユーザー満足度の収集
    • AIの回答品質の評価
  6. elicit_custom

    • カスタム確認ダイアログ
    • 独自のJSONスキーマを使用

セットアップ

# 依存関係のインストール
npm install

# ビルド
npm run build

# 実行(グローバルインストール後)
npm install -g @mako10k/mcp-confirm
mcp-confirm

# または npx で直接実行
npx @mako10k/mcp-confirm

VS Code統合

.vscode/mcp.jsonでMCPクライアントとして設定済み:

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

使用例

基本的な確認

// AIがアクションを実行する前
await confirm_action({
  action: "ファイルを削除",
  impact: "復元できません",
  details: "10個のファイルが削除されます"
});

意図の確認

// あいまいなリクエストの場合
await clarify_intent({
  request_summary: "プロジェクトを作成したい",
  ambiguity: "どの種類のプロジェクトか不明",
  options: ["Node.js プロジェクト", "Python プロジェクト", "React アプリ"]
});

理解の検証

// 複雑なタスクの前
await verify_understanding({
  understanding: "Webアプリケーションを作成して、ユーザー認証を実装する",
  key_points: ["React + Node.js", "JWT認証", "PostgreSQLデータベース"],
  next_steps: "プロジェクト構造を作成してから認証システムを実装"
});

技術仕様

  • プロトコル: Model Context Protocol Elicitation
  • 言語: TypeScript
  • ランタイム: Node.js
  • SDKバージョン: @modelcontextprotocol/sdk ^1.0.0

プロトコルの仕組み

このサーバーは真のMCP Elicitationプロトコルを実装しており:

  1. elicitation/createメソッドでクライアントにリクエスト送信
  2. JSONスキーマでユーザー入力の構造を定義
  3. ユーザーはacceptdeclinecancelで応答
  4. acceptの場合、スキーマに従った構造化データを受信

これにより、AIとユーザー間の確実な意思疎通が可能になります。

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选