Metadata-Version: 2.5
Name: corvevo-mcp
Version: 0.2.0
Summary: MCP server exposing the Corvevo CPM platform (clash detection, IFC/BCF coordination, 3D exports, cost, compliance, chat) to any MCP client.
Project-URL: Homepage, https://github.com/ddefia/corvevov1
Project-URL: Repository, https://github.com/ddefia/corvevov1
Author: Corvevo
License: MIT
Keywords: bcf,bim,clash-detection,construction,ifc,mcp,model-context-protocol,takeoff
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.2
Description-Content-Type: text/markdown

# Corvevo MCP server

Connect any MCP client (Claude Desktop, Claude Code, Cursor) to Corvevo and drive it in plain English: upload a drawing set, run the pipeline, check clashes, pull a cost estimate, export IFC/BCF/GLB.

The server is a thin HTTP proxy over the Corvevo FastAPI backend. No business logic lives here.

## Remote endpoint (no install)

The backend serves the same tool set over streamable HTTP at `/mcp`.

**claude.ai (web/mobile)**: add a custom connector with the URL `https://corvevov1-production.up.railway.app/mcp`. No token to paste — the endpoint speaks OAuth 2.1 (PKCE, dynamic client registration), and claude.ai walks the user through Corvevo sign-in and consent in the browser.

**Claude Code**: one command connects with a personal API token:

```bash
claude mcp add --transport http corvevo https://corvevov1-production.up.railway.app/mcp --header "Authorization: Bearer cpat_..."
```

Mint the token in Settings → Connect your AI. Requests are rate-limited to 120/minute per token; a read-scoped token can query but not run pipelines or mutate. The stdio install below remains useful for local backends and for export tools that write files onto your machine — remote export tools write inside the server container instead.

## Install

From PyPI:

```bash
pip install corvevo-mcp
```

or run without installing:

```bash
uvx corvevo-mcp
```

From source:

```bash
cd mcp_server
pip install -e .
```

## Configure

Environment variables:

| Variable | Default | Purpose |
|---|---|---|
| `CORVEVO_API_URL` | `http://localhost:8000` | Backend base URL (production: `https://corvevov1-production.up.railway.app`) |
| `CORVEVO_API_TOKEN` | — | A personal API token (`cpat_…`) minted in Settings → Connect your AI. Production requires this (or credentials); omit only against a local backend with `AUTH_REQUIRED=false` |
| `CORVEVO_EMAIL` / `CORVEVO_PASSWORD` | — | Alternative to a token: the server logs in, caches the JWT, and re-logs-in when it expires |
| `CORVEVO_DOWNLOAD_DIR` | CWD | Where export tools (GLB/IFC/BCF/XLSX) write files |

Claude Desktop / Claude Code config entry (Settings → Connect your AI generates this with your token filled in):

```json
{
  "mcpServers": {
    "corvevo": {
      "command": "corvevo-mcp",
      "env": {
        "CORVEVO_API_URL": "https://corvevov1-production.up.railway.app",
        "CORVEVO_API_TOKEN": "cpat_..."
      }
    }
  }
}
```

## Tools

Projects and pipeline: `list_projects`, `get_project`, `create_project`, `upload_file`, `run_pipeline`, `pipeline_status`, `project_summary`.

Clash detection: `run_clash_detection`, `get_clashes`, `clash_summary`.

Coordination (IFC/BCF): `coordination_capabilities`, `ingest_ifc`, `list_ifc_models`, `run_ifc_clashes`, `run_advanced_coordination`, `export_bcf`, `import_bcf`.

3D model: `build_building_model`, `building_model_status`, `export_glb`, `export_ifc`.

Cost: `get_cost_estimate`, `run_cost_estimate`, `export_cost_xlsx`.

Compliance: `run_compliance_check`, `get_compliance_results`.

Chat: `ask_corvevo` — the agentic project chat, answer plus source citations.

## Claude Skill

`skills/corvevo-coordination/` packages the find-fix-verify loop as a Claude Skill: judgment rules (slab penetrations are sleeves, not reroutes), the Bonsai fix snippet with unit conversion, GUID-stability rules, and the fire-once/poll pattern for long runs. Install by copying the folder:

```bash
cp -r skills/corvevo-coordination ~/.claude/skills/
```

## Notes

- List tools cap output at 50 records so a single call cannot flood the client model's context. Use the summary tools for totals.
- `run_pipeline` fires once; poll `pipeline_status` instead of re-firing.
- IFC solid clash requires `ifcopenshell` on the backend; `coordination_capabilities` reports availability and the reason when missing.
