Metadata-Version: 2.4
Name: frootai-orchard-mcp
Version: 0.1.0
Summary: Model Context Protocol (MCP) server for the FAI Harvest pipeline. Exposes 9 tools (discover_repo / extract_facts / retrieve_exemplars / list_plays / import_accelerator / customize_play / re_harvest / approve_play / list_pending_reviews) over stdio. Run any AI accelerator repo through harvest from Copilot / Cursor / Claude Desktop / Continue / Zed. Byte-equal wire contract with frootai-orchard-mcp (npm).
Project-URL: Homepage, https://frootai.dev/docs/mcp/orchard
Project-URL: Repository, https://github.com/frootai/frootai-core
Project-URL: Issues, https://github.com/frootai/frootai-core/issues
Author-email: FrootAI <hello@frootai.dev>
License: MIT
Keywords: ai-agents,claude,continue,copilot,cursor,frootai,harvest,infrastructure-as-code,mcp,model-context-protocol,orchard,solution-plays,zed
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Provides-Extra: sdk
Requires-Dist: mcp>=1.0.0; extra == 'sdk'
Description-Content-Type: text/markdown

# frootai-orchard-mcp

**MCP server for the FAI Harvest pipeline (Python).** Run any AI accelerator
repo through harvest — discover → extract → retrieve → scaffold → compose-infra
→ import as a signed Solution Play — from inside your MCP client (GitHub Copilot
in VS Code, Cursor, Claude Desktop, Continue.dev, Zed, custom Foundry agents).

> Byte-equal wire contract with [`frootai-orchard-mcp`](../../npm-mcp/orchard-server)
> (npm). Same 9 tools, same JSON-RPC 2.0 envelopes, same MCP 2025-03-26 surface.
>
> Distinct from `frootai-mcp-orchard`, the read-only v1.0 catalog server. **This**
> server _runs the pipeline_.

## Install

```bash
uvx frootai-orchard-mcp
```

Wire into your MCP client (`.vscode/mcp.json`, Cursor / Claude config, …):

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

## Tools (9)

| Tool | Auth | Purpose |
|---|---|---|
| `discover_repo` | free | Resolve + classify a repo (wraps Harvest `[H1]`) |
| `extract_facts` | free | Architecture + facts extraction (wraps `[H3]`) |
| `retrieve_exemplars` | free | Top-N reference plays by similarity (wraps `[H4]`) |
| `list_plays` | free | Browse the catalog (slim CDN index) |
| `import_accelerator` | **Pro** | Run the full pipeline → signed ZIP |
| `customize_play` | **Pro** | Apply a policy overlay → 3-way diff + commit token |
| `re_harvest` | **Pro** | Re-run at upstream HEAD → diff |
| `approve_play` | founder | Commit a play to the marketplace catalog |
| `list_pending_reviews` | reviewer | List committed plays awaiting founder approval |

## Status

**H10.2 — scaffold.** The protocol dispatcher (MCP 2025-03-26, JSON-RPC 2.0),
the tool registry, and the stdio transport are in place; the 9 tool _handlers_
land one per sub-phase ([H10.3]–[H10.11]). `tools/list` shows only the tools
registered so far.

## Embed as a library

```python
from frootai_orchard_mcp import create_server, run_stdio, TOOL_NAMES

server = create_server(services={})   # inject harvest deps
run_stdio(server)
```

## Doctrine

- **Zero runtime dependencies.** The MCP wire protocol is hand-rolled (stdlib
  only) — same supply-chain-safety reason the harvest backend hand-rolls its
  JWT signer and Stripe signature verifier, and the same reason the sibling
  catalog server is zero-deps.
- **Pure, injectable, hermetically testable.** `create_server` is side-effect
  free; side-effecting deps are injected via `services`, so the dispatcher is
  unit-tested without a network, fs, or a live MCP client.
- **Byte-equal with the Node server.** Both speak identical JSON-RPC envelopes
  and error codes, so a client gets the same results regardless of runtime.

## License

MIT
