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 出力とテキストフォールバック
要件
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for Kling AI video generation
MCP server for Wan AI video generation
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/thomastraum/clarity-api-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server