Skip to main content
Glama
agaver2
by agaver2
README.md
# QueRegalar.me

Wishlist personal simple y agent-friendly. Spanish and English.

Live: https://queregalar.me

Title: **QueRegalar.me: wishlists your AI agent can actually use**

One-liner: A bilingual WebMCP wishlist where an AI agent can inspect available gifts, avoid duplicates, reserve one, and — for owners — create an account and a starter list after confirmation.

## What it does

Someone shares a public gift list. Friends open `/u/:username` and either:

- tap **Me encargo yo** / **I’ll take this** themselves,
- tap **Aportar** / **Contribute** on an expensive group gift (a pledge, not a payment), or
- ask an in-browser agent (WebMCP) to pick an available gift under budget, reserve it, or join a group gift with a partial amount, then draft a WhatsApp message.

Owners create a list in the dashboard, or ask an agent on `/register` and `/app` (confirmation + email verification; drafts stay private until publish). They can also use OpenAPI or remote MCP with a per-user token.

## Language

- https://queregalar.me/es/webmcp
- https://queregalar.me/en/webmcp
- Unprefixed `/webmcp` and `/u/:username` still work.

## WebMCP tools (public list)

Registered only when `document.modelContext.registerTool` exists:

| Tool | Side effects |
| --- | --- |
| `get_wishlist` | none; includes contribution metadata when enabled |
| `get_available_gifts` | none; optional `max_budget`, `currency`, `priority`; also returns `open_for_contribution` and `fully_pledged` |
| `get_contribution_options` | none; optional `max_budget`, `currency` |
| `reserve_gift` | reserves if still `available`; `409 already_reserved` otherwise |
| `pledge_contribution` | records a pledge if remaining amount allows it |
| `draft_group_message` | none; deterministic WhatsApp text |
| `draft_contribution_message` | none; WhatsApp copy for a shared gift |

Owner signup (`/register`) and owner list (`/app`) tools are documented in [`docs/WEBMCP.md`](./docs/WEBMCP.md).

Demo page: https://queregalar.me/en/webmcp  
Demo list: https://queregalar.me/u/ana

Work added after 2026-08-25 is documented in [`docs/WEBMCP.md`](./docs/WEBMCP.md).

## Other agent surfaces

- https://queregalar.me/agents.txt
- https://queregalar.me/openapi.json
- Remote MCP: `https://queregalar.me/mcp` with `Authorization: Bearer <QREGALARME_TOKEN>`
- Human docs: https://queregalar.me/agent

The token is password-equivalent for that user's gifts. Do not commit it. WebMCP owner tools use the browser session instead and never put the token in public JavaScript.

## Setup

```bash
git clone https://github.com/agaver2/queregalarme.git
cd queregalarme
npm install
npm test
PORT=3033 BASE_URL=http://127.0.0.1:3033 node src/server.js
```

SQLite is created automatically under `data/`. The process binds to `127.0.0.1`.

Useful env vars:

- `PORT` (default `3033`)
- `BASE_URL`
- `DATA_DIR` / `DB_PATH`
- `COOKIE_SECURE` (`true` behind HTTPS)
- `NODE_ENV`
- `MAIL_FROM` (verification emails via local sendmail)

## License

MIT