clarity-api-mcp
clarity-api-mcp
Clarity AI アップスケーラー用の Bun MCP サーバー。1 つの POST エンドポイントで、公式の全モードに対応します。
特徴
ツール:
clarity_list_models、clarity_upscaleモード:
crystal、crystal-video、clarity(creativeエイリアス)、clarity-proローカルファイル: Clarity POST の前に raw 公開 URL (
uguu、litterbox、または Tailscale Funnel) に公開Dropbox 共有ページと tmpfiles.org HTML ページを直接ファイル URL に書き換え
Bun ネイティブ: コンパイル不要の TypeScript、自動
.env、Bun.file/Bun.write、Bun Shellcurl構造化された MCP 出力とテキストフォールバック
Related MCP server: imagine-mcp
要件
Bun >= 1.1
https://clarityai.co/api の Clarity AI API キー
セットアップ
git clone https://github.com/thomastraum/clarity-api-mcp.git
cd clarity-api-mcp
bun install
cp .env.example .env.env にキーを入れてください(このファイルは決してコミットしないこと):
CLARITY_API_KEY=your-key-hereBun は .env を自動的に読み込みます。このサーバーは、コーディングエージェントが別のディレクトリから起動した場合も、このパッケージの .env を読み取ります。
MCP クライアント設定
パスを自分のクローンに置き換えてください:
{
"mcpServers": {
"clarity-api": {
"command": "bun",
"args": ["/absolute/path/to/clarity-api-mcp/src/index.ts"]
}
}
}キーは .env または MCP の env ブロックに置けます。Claude、Cursor、Codex、Grok のスニペットは docs/INSTALL.md を参照してください。
ツール
clarity_list_models
公式 API ページからすべてのモード、パラメータ一覧、およびリクエストボディの例を返します。
clarity_upscale
Authorization: Bearer … を付けて POST https://api-upscale.clarityai.co に送信します。
入力(共通)
フィールド | 備考 |
|
|
| 公開画像 URL またはローカルファイル(全イメージモード) |
| 公開ビデオ URL またはローカルファイル( |
|
|
| 任意。結果は返さずにここへ POST されます |
| 任意。結果を保存するローカルファイルまたはディレクトリ |
| 任意のデバッグフラグ |
Crystal — scale_factor 1–200、creativity 0–10、output_format jpg/png、target_megapixels 0.001–1500
Crystal Video — scale_factor 1–200
Clarity — creativity / resemblance / dynamic / fractality −10–10、scale_factor 2–16、style default/portrait/anime、postprocessing none/sharpen、prompt
Clarity Pro — creativity −10–10、scale_factor 2/4/8/16、output_format png/jpg。出力 1 MP あたり $0.03、最大 64 MP。
出力
{
"mode": "crystal",
"requested_mode": "crystal",
"url": "https://…",
"credit_cost": 3,
"cost_usd": 0.03,
"balance": 97,
"webhook": null,
"saved_to": "/path/to/out.jpg",
"published_url": "https://a.uguu.se/…",
"published_via": "uguu",
"note": null
}Clarity は 1 クレジット = $0.01 です。ローカルファイルは、Clarity が raw バイトを取得できるように、最初に公開されます。ファイルをこのマシン上に置いたままにする場合は publish: "funnel" を使用してください(Tailscale Funnel であり、Serve ではありません)。
環境変数
名前 | デフォルト | 目的 |
| — | 必須( |
|
| エンドポイントを上書き |
|
| curl のタイムアウト(ms) |
| — |
|
|
| ローカルファイルのデフォルトの公開方法 |
|
| litterbox の TTL( |
スクリプト
bun start
bun test
bun run smoke-test
bun run smoke-test -- --live--live は実際の API を呼び出し、クレジットを消費します。
注意事項
MCP トランスポート以外では、このプロセスから stdout に書き込まないでください。診断情報は stderr に出力されます。
HTTP クライアントは Bun Shell の
curlで、公式の例に合わせ、Responseボディを stdin として使用します。
ライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Kling AI video generation
MCP server for Wan AI video generation
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server for video enhancement and SAM3 image segmentation, enabling tasks like upscaling videos and segmenting objects in images via natural language.449 npmMIT
- AlicenseAqualityFmaintenanceProduction-grade MCP server for image and video understanding and generation across Gemini, OpenAI, and Grok.54Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for the Golpo AI video API, enabling video generation, listing, and downloading from any MCP-compatible client.MIT
- FlicenseNot gradedqualityDmaintenanceA powerful Model Context Protocol (MCP) server for image processing, designed to empower AI models with advanced image manipulation capabilities.-