npm package: @okmira/mcp
Description: MCP server for Mira — where stakeholders shape how AI builds your product
Latest version: 0.0.26

# @okmira/mcp

MCP server and hooks for [Mira](https://okmira.ai) — where stakeholders shape how AI builds your product.

## What is Mira?

AI made developers 10x faster. Feedback is still 1x. Mira closes the gap.

Mira gives stakeholders a structured way to review builds and guide AI-assisted development — through feedback, reusable skills, and specialized agents. Developers fetch that input directly into their AI coding tool and apply it conversationally.

## Installation

### One-command setup (recommended)

```bash
npx @okmira/mcp setup
```

Opens your browser for authentication, detects your AI coding tool, and writes all config files automatically. Works with 18+ AI coding tools.

To refresh configs without re-authenticating (e.g. after a version update):

```bash
npx @okmira/mcp@latest setup --upgrade
```

### Manual setup

Register the MCP server with your tool. Example for Claude Code:

```bash
claude mcp add mira \
  -e CC_FEEDBACK_API_URL=https://okmira.ai \
  -e CC_FEEDBACK_API_KEY=ccf_YOUR_KEY_HERE \
  -- npx @okmira/mcp
```

Get your API key from the project dashboard at [okmira.ai](https://okmira.ai).

## MCP Tools

| Tool | Description |
|------|-------------|
| `register_build` | Register a new build after deployment. Use when auto-registration did not fire. |
| `fetch_feedback` | Fetch feedback for a build. Returns role-contextualized feedback with suggested directions. |
| `update_feedback_status` | Mark feedback as acknowledged, applied, or stale. Closes the feedback loop. |
| `check_pending_feedback` | Check for unreviewed feedback across recent builds. Acts as an inbox. |
| `fetch_skills` | List reusable skills (brand guidelines, code standards, etc.) defined by stakeholders. |
| `install_skill` | Fetch a skill with full content for installation as a slash command. |
| `fetch_subagents` | List specialized agent definitions (code reviewer, security auditor, etc.). |
| `install_subagent` | Fetch a subagent definition with full content for installation. |

## Hooks

Optional hooks for zero-friction automation. During setup, choose your deploy strategy:

| Strategy | How builds get registered | Hook behavior |
|----------|--------------------------|---------------|
| `cli` | Detects deploy URLs from CLI output | Matches platform CLI patterns (Vercel, Netlify, Cloudflare, etc.) |
| `git-push` | Detects `git push` output | Uses `deployUrl` from `.mira.json` |
| `webhook` | Vercel/external webhook POST | Skips PostToolUse hook entirely |

**`mira-auto-register`** (PostToolUse) — Detects deploys in Bash output and automatically registers builds. Strategy-aware: only fires for your configured workflow.

**`mira-check-feedback`** (SessionStart) — Surfaces pending feedback count at the start of each session so your AI tool can proactively inform you.

Hook credentials are read from the MCP server config — no duplication needed. Supported by Claude Code, Codex CLI, Factory.ai, and Kiro CLI.

## Configuration

| Variable | Description |
|----------|-------------|
| `CC_FEEDBACK_API_URL` | Base URL — `https://okmira.ai` (production) or `http://localhost:3000` (local) |
| `CC_FEEDBACK_API_KEY` | Project-scoped API key (`ccf_` prefix), generated from the dashboard |

## How It Works

```
Developer deploys build
  → Build registered (via hook, MCP tool, or webhook)
  → Stakeholders review build, leave feedback and direction
  → Developer fetches feedback into their AI coding tool
  → AI applies feedback conversationally
  → New build deployed → cycle repeats
```

## Requirements

- Node.js 18+ (for native `fetch()`)
- `git` (for hooks — ref/branch detection)

## License

MIT