Metadata-Version: 2.4
Name: flikt-mcp
Version: 0.1.0
Summary: MCP server for Flikt.AI — browse plan-review results, ask questions, export RFIs, and start reviews from Claude
Project-URL: Homepage, https://flikt.ai
Project-URL: Repository, https://github.com/Flikt-AI/flikt-mcp
Author: Flikt.AI
License: MIT License
        
        Copyright (c) 2026 Flikt.AI
        
        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: claude,construction,coordination,flikt,mcp,plan-review
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.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# flikt-mcp

MCP server that connects Claude (Claude Code, Claude Desktop, or any MCP
client) to your [Flikt.AI](https://flikt.ai) account: browse plan-review
results, dig into coordination conflicts, ask questions, export RFI
packages, and — if you allow it — kick off reviews of uploaded plan sets.

## Setup

1. **Mint a token** in the Flikt portal: **Settings → API access → Create
   token**. Default tokens are read-only. Check *"Allow this token to start
   reviews"* (and set a monthly page limit) only if you want Claude to be
   able to start reviews against your subscription's page allowance — a
   token can never charge your card; runs that aren't fully covered by your
   plan are refused.
2. Copy the token at creation — it is shown exactly once.
3. **Add the server** (Claude Code):

   ```bash
   claude mcp add flikt \
     --env FLIKT_API_TOKEN=flk_your_token_here \
     -- python -m flikt_mcp
   ```

   or in any MCP client config:

   ```json
   {
     "mcpServers": {
       "flikt": {
         "command": "python",
         "args": ["-m", "flikt_mcp"],
         "env": { "FLIKT_API_TOKEN": "flk_your_token_here" }
       }
     }
   }
   ```

   Install first with `pip install .` (from this directory), or run via
   `uvx --from <path-to-flikt-mcp> flikt-mcp`.

`FLIKT_API_BASE` overrides the API host (default `https://api.flikt.ai`).

## Tools

| Tool | Token permission | What it does |
|---|---|---|
| `list_projects` | read | Projects with open-conflict severity rollups + review status |
| `get_project` | read | One project's summary + latest submission id |
| `list_conflicts` | read | Open conflicts (filter by severity / discipline / ball-in-court) |
| `ask_project` | read | Q&A over results: cost exposure, counts, top risks, schedule impact |
| `check_review_status` | read | Poll a running review (`uploaded` → `processing` → `complete`) |
| `save_rfis_pdf` | read | Download the ready-to-send RFI package to a local file |
| `run_review` | **start reviews** | Start the review for an uploaded, fully-covered submission |

## Spend safety

`run_review` rides your subscription's page allowance and nothing else.
The Flikt API refuses (HTTP 402) any run that would require a payment —
overage, per-project pricing, or spec add-ons — and tells you to finish in
the portal instead. Per-token monthly page limits (set at mint time) bound
what a single token can consume; revoking a token in Settings cuts access
instantly.

## Agentic review skill

`skills/review-my-plan-set/SKILL.md` packages the full loop — check the
plan set, confirm the spend with you, start the review, poll, then deliver
a top-risks summary and the RFI package. Point your Claude skills directory
at it or copy it into `.claude/skills/`.

## Development

```bash
pip install -e ".[dev]"
pytest
```
