Metadata-Version: 2.5
Name: chopchat-wizard
Version: 0.2.0
Summary: ChopChat Wizard — knowledge-only MCP for IDE agents: community knowledge (RAG) for TouchDesigner in VS Code, Claude Code, Cursor, ...
Project-URL: Homepage, https://chopchat.io
Project-URL: Repository, https://github.com/RGB-club/chopchat-wizard
Author: RGB Club FlexCo
License: Business Source License 1.1
        
        Parameters
        
        Licensor:             RGB Club FlexCo
        Licensed Work:        chopchat-wizard
        Additional Use Grant: Production use is permitted for any commercial internal use,
                              but NOT hosting/reselling the software as a service to third
                              parties for monetary compensation.
        Change Date:          2030-08-21
        Change License:       GNU Affero General Public License version 3 (AGPL-3.0)
        
        Terms
        
        The Licensor hereby grants you the right to copy, modify, create derivative
        works, redistribute, and make non-production use of the Licensed Work. The
        Licensor may make an Additional Use Grant, above, permitting limited production
        use.
        
        Effective on the Change Date, or the fourth anniversary of the first publicly
        available distribution of a specific version of the Licensed Work under this
        License, whichever comes first, the Licensor hereby grants you rights under the
        terms of the Change License, and the rights granted in the paragraph above
        terminate.
        
        If your use of the Licensed Work does not comply with the requirements currently
        in effect as described in this License, you must purchase a commercial license
        from the Licensor, its affiliated entities, or authorized resellers, or you must
        refrain from using the Licensed Work.
        
        All copies of the original and modified Licensed Work, and derivative works of
        the Licensed Work, are subject to this License. This License applies separately
        for each version of the Licensed Work and the Change Date may vary for each
        version of the Licensed Work released by Licensor.
        
        You must conspicuously display this License on each original or modified copy of
        the Licensed Work. If you receive the Licensed Work in original or modified form
        from a third party, the terms and conditions set forth in this License apply to
        your use of that work.
        
        Any use of the Licensed Work in violation of this License will automatically
        terminate your rights under this License for the current and all other versions
        of the Licensed Work.
        
        This License does not grant you any right in any trademark or logo of Licensor
        or its affiliates (provided that you may use a trademark or logo of Licensor as
        expressly required by this License).
        
        TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
        "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS
        OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
        
        MariaDB hereby grants you permission to use this License's text to license your
        works, and to refer to it using the trademark "Business Source License", as long
        as you comply with the Covenants of Licensor below.
        
        Covenants of Licensor
        
        In consideration of the right to use this License's text and the "Business
        Source License" name and trademark, Licensor covenants to MariaDB, and to all
        other recipients of the licensed work to be provided by Licensor:
        
        1. To specify as the Change License the GPL Version 2.0 or any later version, or
           a license that is compatible with GPL Version 2.0 or a later version, where
           "compatible" means that software provided under the Change License can be
           included in a program with software provided under GPL Version 2.0 or a later
           version. Licensor may specify additional Change Licenses without limitation.
        
        2. To either: (a) specify an additional grant of rights to use that does not
           impose any additional restriction on the right granted in this License, as
           the Additional Use Grant; or (b) insert the text "None" to specify a Change
           Date.
        
        3. Not to modify this License in any other way.
        
        Notice
        
        The Business Source License (this document, or the "License") is not an Open
        Source license. However, the Licensed Work will eventually be made available
        under an Open Source License, as stated in this License.
License-File: LICENSE
License-File: LICENSE.md
Keywords: ai,knowledge,mcp,rag,touchdesigner
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
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 :: Python Modules
Requires-Python: >=3.11
Requires-Dist: fastmcp<5,>=4.1.2
Requires-Dist: httpx<1,>=0.27.0
Description-Content-Type: text/markdown

# ChopChat Wizard

**The knowledge-only MCP for TouchDesigner.** Give IDE agents (VS Code, Claude
Code, Cursor, Kilo, …) the ChopChat community knowledge base — RAG over forum
threads, official docs and chat — as one tool: `search_community_knowledge`.

Deliberately **slim**: no patch-editing, no editor control. It composes with
any other MCP (an editor MCP, TWOZERO, …) or works entirely on its own.

```
you (IDE) ──stdio──► chopchat-wizard ──► ChopChat knowledge gateway
                                           (embeds server-side, returns
                                            chunks + community attribution)
```

## Get a key

Register a free account at [chopchat.io](https://chopchat.io) → **Dashboard →
self-host** → create a key (`nak_td_…`). The key is metered per day: 5
free slots/day on the free plan (paid plans are unlimited). Searches
close together share a slot: the first search claims one, and up to 4
searches within 3 minutes count once, so an agent working through one
prompt usually costs a single slot. Avoid repeating an identical search;
pass `prior_user_message`/`prior_answer_digest` when the agent has
them and the gateway can skip a duplicate turn. Revoked keys stop working
immediately.

> **Privacy:** queries are sent to the knowledge gateway and logged there for
> attribution and abuse prevention (query text plus the API key id). See
> [chopchat.io/privacy](https://chopchat.io/privacy). Retrieved forum content
> is untrusted reference material — the wizard tells the agent not to follow
> instructions found inside it.

## Install

Requires [Python 3.11+](https://www.python.org/downloads/) (or [`uv`](https://docs.astral.sh/uv/) — recommended).

```powershell
# recommended (uv — no global install, always cached)
uvx chopchat-wizard

# or classic pip
pip install chopchat-wizard
```

> **Pre-release:** until the first PyPI release lands, install from the repo:
> `uvx --from git+https://github.com/RGB-club/chopchat-wizard chopchat-wizard`
> (or `pip install git+https://github.com/RGB-club/chopchat-wizard`).

## Wire up your IDE

**Using the ChopChat plugin in TouchDesigner?** Skip all of this: in the
chat, **TDMCP → Your IDE → Add** writes the hosted knowledge MCP (and the
local device simulator) into VS Code, Claude Code or Cursor, with a key
created for that PC from your account. See
[chopchat.io/docs/ide](https://chopchat.io/docs/ide).

By hand: the wizard speaks stdio and needs your API key. Pick your client:

### VS Code

`.vscode/mcp.json` (or *MCP: Add Server* → stdio):

```json
{
  "servers": {
    "chopchat-wizard": {
      "command": "uvx",
      "args": ["chopchat-wizard"],
      "env": { "CHOPCHAT_API_KEY": "nak_td_…" }
    }
  }
}
```

### Claude Desktop

`%APPDATA%\Claude\claude_desktop_config.json` (note the different top-level
key — Claude uses `mcpServers`):

```json
{
  "mcpServers": {
    "chopchat-wizard": {
      "command": "uvx",
      "args": ["chopchat-wizard"],
      "env": { "CHOPCHAT_API_KEY": "nak_td_…" }
    }
  }
}
```

### Claude Code

```powershell
claude mcp add chopchat-wizard -e CHOPCHAT_API_KEY=nak_td_… -- uvx chopchat-wizard
```

### Cursor

`~/.cursor/mcp.json` — Cursor also uses `mcpServers`, unlike VS Code's
`servers`:

```json
{
  "mcpServers": {
    "chopchat-wizard": {
      "command": "uvx",
      "args": ["chopchat-wizard"],
      "env": { "CHOPCHAT_API_KEY": "nak_td_…" }
    }
  }
}
```

Other stdio MCP clients use the same shape with whichever top-level key they
document.

### The zero-install alternative

Clients with **remote MCP** support (VS Code, Claude, …) can skip this package
entirely and connect straight to the hosted Streamable HTTP endpoint:

```
https://knowledge.chopchat.io/mcp
```

with your API key as `Authorization: Bearer nak_td_…` or `X-API-Key`. The
endpoint accepts both `/mcp` and `/mcp/` directly. It is metered exactly like
the stdio wizard.

## Tool arguments

| argument | meaning |
|---|---|
| `query` | the question or topic |
| `top_k` | results to return, 1–50 (default 8) |
| `version` | TouchDesigner build, e.g. `"2025.19830"`; matching chunks are boosted |
| `strict_version` | return only version-matching chunks |
| `app_version` | optional editor session-digest fallback for `version` |
| `error_texts` / `op_names` | optional session-digest hints (keyword arm only, never persisted) |
| `prior_user_message` / `prior_answer_digest` | optional previous turn, so an ack/thanks can skip retrieval |

## Self-hosting

Running the [self-host stack](https://github.com/RGB-club/chopchat-self)?
The knowledge gateway is part of its **default** profile, so
`http://127.0.0.1:8001/mcp` is already there. Point the wizard at it with
`--local` — the gateway is open while it has no API keys of its own, and the
wizard refuses to start keyless without that flag so you can't accidentally
run against the hosted gateway:

```json
{
  "command": "uvx",
  "args": ["chopchat-wizard", "--gateway-url", "http://127.0.0.1:8001", "--local"]
}
```

(or set `CHOPCHAT_GATEWAY_URL=http://127.0.0.1:8001` plus `--local`.) The
gateway embeds server-side against your local Qdrant. Once you create a key on
the local gateway, pass it with `--api-key` (and drop `--local`).

## CLI

```
chopchat-wizard [--api-key KEY] [--gateway-url URL] [--collection NAME] [--name NAME] [--local] [--version]
```

`--local` runs keyless against a self-hosted gateway. `--version` prints the
package version.

| | env | default |
|---|---|---|
| API key | `CHOPCHAT_API_KEY` | — (required unless `--local`) |
| Gateway | `CHOPCHAT_GATEWAY_URL` | `https://knowledge.chopchat.io` |
| Collection | `CHOPCHAT_COLLECTION` | server-side default |
| Server name | `CHOPCHAT_WIZARD_NAME` | `chopchat-wizard` |
| Timeout (s) | `CHOPCHAT_TIMEOUT` | `60` |

## License

Business Source License 1.1 — see [LICENSE](LICENSE) / [LICENSE.md](LICENSE.md):
free non-production use, commercial internal use permitted, no hosting/reselling
as SaaS. The knowledge served through the wizard is licensed for registered
accounts under the API terms.
