Metadata-Version: 2.5
Name: entertao-mcp
Version: 0.1.0
Summary: Local, non-custodial Bittensor Gamma MCP server connecting AI agents to the entertao.com service registry.
Project-URL: Homepage, https://entertao.com
Project-URL: Documentation, https://entertao.com/agents
Project-URL: Repository, https://github.com/NTG-Claude/bittensor-market
Author: entertao
License-Expression: MIT
License-File: LICENSE
Keywords: ai-agents,bittensor,entertao,gamma,mcp,model-context-protocol,tao
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: bittensor>=11.3.5; sys_platform != 'win32'
Requires-Dist: httpx<1,>=0.27
Requires-Dist: mcp<2,>=1.2
Requires-Dist: pydantic<3,>=2.10
Description-Content-Type: text/markdown

# entertao-mcp

Local, non-custodial Python MCP server connecting AI agents (Claude Code, Cursor, etc.) to the [`entertao.com`](https://entertao.com) service registry with local, Just-in-Time (JIT) Bittensor Gamma payments.

- **Strict separation:** `entertao.com` is used strictly for read-only service discovery and OpenAPI/Access manifests. All wallet signing (`btauth/1`), `mint_gamma` transactions, and provider API calls happen **100% locally** on your machine.
- **Testnet-first:** Defaults to `BT_NETWORK=test`. Mainnet (`finney`) requires explicit opt-in.
- **Hard local spend guardrails:** Enforces `ENTERTAO_MAX_MINT_USD` (`2.00`), `ENTERTAO_DAILY_CAP_USD` (`5.00`), and `ENTERTAO_AUTO_MINT=false` (strictly dry-run / quote-only; an agent cannot self-approve minting).
- **Zero protocol fees:** Funds go directly to your own hotkey's on-chain Gamma deposit.

## Platform Support

- **Linux & macOS:** Full support (discovery + wallet + Gamma minting + `btauth/1` signing via `bittensor>=11.3.5`).
- **Windows:** Read-only discovery tools work natively. Wallet and Gamma tools require Linux, macOS, or **WSL** because `bittensor-core` publishes Linux/macOS wheels only.

## Quick Start (`uvx`)

```json
{
  "mcpServers": {
    "entertao": {
      "command": "uvx",
      "args": ["entertao-mcp"],
      "env": {
        "BT_NETWORK": "test",
        "BT_WALLET_NAME": "default",
        "BT_HOTKEY_NAME": "api_hotkey",
        "ENTERTAO_MAX_MINT_USD": "2.00",
        "ENTERTAO_DAILY_CAP_USD": "5.00",
        "ENTERTAO_AUTO_MINT": "false"
      }
    }
  }
}
```

## MCP Tools

1. `search_services(query, payment_method="gamma", verified_only=True)` — Read-only search against `entertao.com`.
2. `get_service_manifest(service_id)` — Fetch verified endpoints, OpenAPI operations, and Gamma requirements by product slug (with automatic UUID fallback).
3. `check_or_fund_gamma(netuid, target_usd)` — Check local hotkey Gamma balance; strictly returns a dry-run quote when `ENTERTAO_AUTO_MINT=false`, or executes `MintGamma` when `ENTERTAO_AUTO_MINT=true` with write-ahead locking, on-chain `daily_spend_cap`, and local `~/.entertao/usage.jsonl` audit logging.
4. `call_gamma_service(service_id, path, method="POST", body=None)` — Validate HTTPS + manifest allowlist + DNS SSRF checks, sign locally with `btauth/1`, and call the subnet provider directly.

## Development & Tests

```bash
uv sync
uv run pytest
uv run ruff check src tests
uv run mypy src
```
