Metadata-Version: 2.4
Name: qr-cow-mcp
Version: 0.1.1
Summary: MCP server for qr-cow: create, style, and manage QR codes (with scan analytics) from Claude, Cursor, Zed, or any MCP client.
Author-email: HSN family <hi@qr-cow.com>
License: MIT License
        
        Copyright (c) 2026 HSN family (qr-cow.com)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://qr-cow.com
Project-URL: Documentation, https://qr-cow.com/docs
Project-URL: Repository, https://github.com/qrcow/qr_cow_mcp
Project-URL: Issues, https://github.com/qrcow/qr_cow_mcp/issues
Project-URL: Changelog, https://github.com/qrcow/qr_cow_mcp/blob/main/CHANGELOG.md
Keywords: mcp,model-context-protocol,qr-code,qr,claude,ai-tools
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp<2,>=1.0.0
Requires-Dist: httpx>=0.27
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Dynamic: license-file

# qr-cow MCP server

[![PyPI](https://img.shields.io/pypi/v/qr-cow-mcp)](https://pypi.org/project/qr-cow-mcp/)
[![Python](https://img.shields.io/pypi/pyversions/qr-cow-mcp)](https://pypi.org/project/qr-cow-mcp/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![CI](https://github.com/qrcow/qr_cow_mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/qrcow/qr_cow_mcp/actions/workflows/ci.yml)

An MCP server that exposes the customer-facing [qr-cow.com](https://qr-cow.com)
API to any MCP-compatible AI client (Claude Desktop, Claude Code, Cursor,
Zed, …).

Once connected, you can say things like:

> "Make a QR code that goes to https://my-cafe.com/menu, call it Café menu"
> "Render a styled QR for https://acme.com in the ocean preset, 600px"
> "Show me which countries scanned my café menu last week"
> "Change the destination of the café menu QR to /menu-v2"

…and the assistant calls the API on your behalf.

---

## 1. Create a token

1. Sign in at https://qr-cow.com.
2. Go to **Dashboard → API & MCP**.
3. Click **Create token**. Give it a name like "Claude Desktop".
4. Copy the `qrc_live_…` value that appears. **It's shown once.**

## 2. Wire it into your MCP client

### Claude Desktop / Claude Code

Add to `~/.claude.json` (or your platform's equivalent config):

```json
{
  "mcpServers": {
    "qr-cow": {
      "command": "uvx",
      "args": ["qr-cow-mcp"],
      "env": {
        "QRCOW_API_TOKEN": "qrc_live_..."
      }
    }
  }
}
```

Restart the client. You should see qr-cow tools listed.

### Cursor / Zed

Same shape — pass `command`, `args`, and an `env` block with
`QRCOW_API_TOKEN`. See their MCP docs for the exact key.

### Self-hosted qr-cow

Set `QRCOW_API_BASE` (defaults to `https://qr-cow.com/api`) to point at
your install:

```json
"env": {
  "QRCOW_API_TOKEN": "qrc_live_...",
  "QRCOW_API_BASE": "https://your-host/api"
}
```

---

## Tools

| Tool | What it does |
|---|---|
| `create_qrcode` | Create and save a static or dynamic QR (URL, Wi-Fi, vCard, …) in your account. |
| `render_styled_qrcode` | Render a fully styled QR image (dot/eye shapes, gradient, logo) from data plus a preset or style, without saving it. Returns the image. |
| `list_qrcodes` | List recent QR codes in your account. |
| `get_qrcode` | Fetch one QR code with its current destination + design. |
| `update_qrcode_destination` | Change a dynamic QR's destination — the printed code keeps working. |
| `delete_qrcode` | Soft-delete a code. |
| `get_qrcode_analytics` | Scans, unique scanners, country / device / hour-of-day breakdown. |
| `me` | The signed-in user's profile + current plan. |

---

## Develop locally

```sh
git clone https://github.com/qrcow/qr_cow_mcp.git
cd qr_cow_mcp
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
pytest

# Try it out — auth doesn't matter for startup
QRCOW_API_TOKEN=qrc_live_local QRCOW_API_BASE=http://localhost:8080/api qr-cow-mcp
```

The server speaks stdio, so the easiest way to manually exercise it is
through an MCP client.

## Privacy & security

- The server is a thin pass-through: your token stays in your MCP client
  config and is only ever sent to the qr-cow API (or the `QRCOW_API_BASE`
  you configure) as a `Bearer` header.
- No telemetry, no third-party calls. Requests carry a
  `User-Agent: qr-cow-mcp/<version>` header so the API can distinguish
  MCP traffic.

## Contributing & releases

- [CONTRIBUTING.md](CONTRIBUTING.md) — dev setup, style, how to send a PR.
- [CHANGELOG.md](CHANGELOG.md) — what changed in each release.
- [RELEASING.md](RELEASING.md) — how maintainers cut a release (tag → CI → PyPI).

## License

[MIT](LICENSE)
