Metadata-Version: 2.4
Name: agentpromocode-mcp
Version: 0.4.0
Summary: Python MCP server for agentpromocode.com resolve + feedback tools
Project-URL: Homepage, https://agentpromocode.com
Project-URL: Repository, https://github.com/agentpromocode/agentpromocode
Project-URL: Spec, https://github.com/agentpromocode/acdp
Author: agentpromocode
License-Expression: MIT
License-File: LICENSE
Keywords: acdp,agent-commerce,coupon,discount,mcp,promo-code
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.6
Requires-Dist: pydantic>=2.7
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# agentpromocode-mcp

<!-- mcp-name: io.github.fedepellegrini/agentpromocode -->

**Agents shouldn't pay full price.** Python MCP server for the incentive layer for agentic commerce — resolve before checkout, feedback after.

Runs without an API key in the anonymous demo tier. Create a free key at `https://agentpromocode.com/start` for higher limits and consumer-level feedback health.

## Install

```bash
pip install agentpromocode-mcp
```

Or run with `uvx`:

```bash
uvx agentpromocode-mcp
```

## Claude Desktop

```json
{
  "mcpServers": {
    "agentpromocode": {
      "command": "uvx",
      "args": ["agentpromocode-mcp"]
    }
  }
}
```

## Tools

- `resolve(domain, basket?, agent_id?)` → `POST /v1/resolve`
- `feedback(attribution_token, code?, outcome, basket_value?, geo?)` → `POST /v1/feedback`

`outcome` must be one of `worked`, `expired`, `ineligible`, or `error`.

## Env

- `AGENTPROMOCODE_API_KEY` is optional; omit it for anonymous demo tier.
- `AGENTPROMOCODE_API_BASE` defaults to `https://api.agentpromocode.com`.

## Data Contract

`/v1/feedback` is mandatory for serious keyed integrations. Sustained low feedback-to-resolve ratio can suspend an API key.

## ACDP

- Spec: `https://agentpromocode.com/acdp`
- OpenAPI: `https://api.agentpromocode.com/openapi.json`

## License

MIT.
