Skip to main content
Glama
CaLuya-Rita

restaurant-reservation-monitor-mcp

by CaLuya-Rita
README.md
# How to Handle CAPTCHA in a Restaurant Reservation Monitor with MCP and CapSolver

Distinguish challenged pages from real reservation availability with a bounded MCP workflow.

![English cover for restaurant reservation availability monitoring with MCP](assets/cover.png)

[English](README.md) · [简体中文](docs/zh-CN/README.md) · [日本語](docs/ja/README.md) · [Español](docs/es/README.md) · [Português](docs/pt-BR/README.md) · [한국어](docs/ko/README.md)

## Introduction

When developers use MCP for restaurant reservation availability monitoring, CAPTCHA challenges can interrupt the workflow before the agent records the permitted data. This repository demonstrates how to connect MCP with [CapSolver](https://www.capsolver.com/?utm_source=github&utm_medium=referral&utm_campaign=restaurant-reservation-monitor-mcp-captcha-capsolver&utm_content=repository-readme), preserve the business context, and continue only within bounded, owned, mock, or explicitly authorized targets.

The default path is deterministic and offline, so reviewers can understand the business outcome before enabling any live integration.

## Problem

A challenged page must not be interpreted as a valid business result. The workflow emits `challenge_detected`, uses a solver adapter, resumes once, and otherwise stops with a reviewable reason.

## Features

- Scenario-first observation model
- MCP integration boundary
- Mock-first solver lifecycle
- Allowlisted hosts and one bounded resume
- Redacted JSON output

## How It Works

1. Accept an allowlisted target and scenario identifier.
2. Classify the mock browser observation.
3. Route a challenge through the solver adapter.
4. Resume once and normalize the result.
5. Emit a minimal audit record.

The adapter follows the official [createTask API concept](https://docs.capsolver.com/en/guide/api-createtask/) and [getTaskResult API concept](https://docs.capsolver.com/en/guide/api-gettaskresult/).

## Quick Start

```bash
python -m unittest discover -s tests -v
PYTHONPATH=src python examples/mock_workflow.py
```

## Project Structure

```text
src/scenario_agent/  workflow and adapter
examples/            offline demonstration
tests/               unit and policy checks
docs/                localized guides
assets/              shared English cover
```

## Testing

Tests cover a successful bounded resume and rejection of a non-allowlisted target.

## Responsible Use

Use only public data, owned systems, or targets for which you have explicit authorization. Respect terms, rate limits, purpose limitation, field minimization, retention limits, and stop conditions. Do not use this example for private or restricted data, credential access, detection evasion, or unbounded collection. Personal, financial, employment, travel, property, or contact data requires a documented lawful purpose and human review.

## Conclusion

This repository connects a recognizable restaurant reservation availability monitoring problem to a testable MCP workflow. Developer sharing CapSolver integration examples. The final product reference is [CapSolver](https://www.capsolver.com/?utm_source=github&utm_medium=referral&utm_campaign=restaurant-reservation-monitor-mcp-captcha-capsolver&utm_content=repository-readme).

## License

MIT