Metadata-Version: 2.4
Name: comfy-vault-mcp
Version: 0.1.0
Summary: MCP server exposing comfy-vault's ComfyUI model tools to Claude and Codex.
Project-URL: Homepage, https://github.com/Chepko932/comfy-vault-mcp
Project-URL: Issues, https://github.com/Chepko932/comfy-vault-mcp/issues
Author: comfy-vault contributors
License: MIT License
        
        Copyright (c) 2026 Joshua Dormann and comfy-vault contributors
        
        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.
License-File: LICENSE
Keywords: civitai,claude,codex,comfyui,mcp,model-management
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: comfy-model-vault>=0.2
Requires-Dist: mcp>=1.0
Provides-Extra: civitai
Requires-Dist: comfy-model-vault[civitai]>=0.2; extra == 'civitai'
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# comfy-vault-mcp

An [MCP](https://modelcontextprotocol.io) server that exposes
[comfy-vault](https://github.com/Chepko932/comfy-vault) to coding agents, so
you can ask Claude or Codex to audit and clean up your ComfyUI model library in
plain language.

It wraps the comfy-vault library (PyPI package `comfy-model-vault`, a real
dependency — not vendored) as five tools. The agent calls them; comfy-vault does
the work.

## Tools

| Tool | What it does |
|------|--------------|
| `vault_scan` | Index a models directory recursively; counts, sizes, categories. |
| `vault_orphans` | List models no workflow references (read-only). |
| `vault_lora_info` | Look up Civitai metadata for a file by its content hash. |
| `vault_duplicates` | Find byte-identical duplicate models (same SHA256). |
| `vault_delete` | Delete orphans — **dry-run unless `confirm=true`**, fenced to the scanned roots. |

## Install

```bash
pip install comfy-vault-mcp
```

This installs `comfy-model-vault` (the comfy-vault library) as a dependency.
Python 3.10+.

## Use with Claude Code

```bash
claude mcp add comfy-vault -- comfy-vault-mcp
```

or add it to `.mcp.json` in your project:

```json
{
  "mcpServers": {
    "comfy-vault": {
      "command": "comfy-vault-mcp"
    }
  }
}
```

## Use with Codex CLI

Add to `~/.codex/config.toml`:

```toml
[mcp_servers.comfy-vault]
command = "comfy-vault-mcp"
```

## Example

Once connected, ask in natural language:

> "Find all unused Pony LoRAs over 2 GB in `D:\ComfyUI\models`, check which of
> them still exist on Civitai, and show me the duplicates — but don't delete
> anything yet."

The agent will call `vault_orphans`, `vault_lora_info`, and `vault_duplicates`,
then summarise. `vault_delete` stays a dry-run until you explicitly confirm.

## Offline / testing mode

Set `COMFY_VAULT_CIVITAI_FIXTURES` to a directory of recorded `{sha256}.json`
Civitai responses, and `vault_lora_info` resolves from those instead of the live
API — no network, no key. This is how the test suite runs. For live use, an
optional `CIVITAI_API_KEY` raises your rate limit but is not required.

## License

[MIT](LICENSE). Same license as comfy-vault, for consistency across the toolkit.
