clarity-api-mcp
Allows publishing local files to a raw public URL via Tailscale Funnel for the Clarity AI upscaler to fetch.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@clarity-api-mcpUpscale my local image /tmp/photo.jpg using crystal mode and save the result to my Downloads folder."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
clarity-api-mcp
Bun MCP server for the Clarity AI upscaler. One POST endpoint, every official mode.
Features
Tools:
clarity_list_models,clarity_upscaleModes:
crystal,crystal-video,clarity(creativealias),clarity-proLocal files: published to a raw public URL (
uguu,litterbox, or Tailscale Funnel) before the Clarity POSTDropbox share pages and tmpfiles.org HTML pages are rewritten to direct file URLs
Bun-native: TypeScript with no compile step, automatic
.env,Bun.file/Bun.write, Bun ShellcurlStructured MCP output plus a text fallback
Requirements
Bun >= 1.1
A Clarity AI API key from https://clarityai.co/api
Setup
git clone https://github.com/thomastraum/clarity-api-mcp.git
cd clarity-api-mcp
bun install
cp .env.example .envPut your key in .env (never commit this file):
CLARITY_API_KEY=your-key-hereBun loads .env automatically. The server also reads this package's .env when a coding agent starts it from another directory.
MCP client config
Replace the path with your clone:
{
"mcpServers": {
"clarity-api": {
"command": "bun",
"args": ["/absolute/path/to/clarity-api-mcp/src/index.ts"]
}
}
}The key can live in .env or in the MCP env block. See docs/INSTALL.md for Claude, Cursor, Codex, and Grok snippets.
Tools
clarity_list_models
Returns every mode, parameter list, and example body from the official API page.
clarity_upscale
Sends POST https://api-upscale.clarityai.co with Authorization: Bearer ….
Input (common)
Field | Notes |
|
|
| Public image URL or local file (all image modes) |
| Public video URL or local file ( |
|
|
| Optional. Result is POSTed here instead of returned |
| Optional local file or directory to save the result |
| Optional debug flag |
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. $0.03 per output MP, max 64 MP.
Output
{
"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 charges 1 credit = $0.01. Local files are published first so Clarity can fetch raw bytes. Use publish: "funnel" if the file should stay on this machine (Tailscale Funnel, not Serve).
Environment variables
Name | Default | Purpose |
| — | Required (or |
|
| Override the endpoint |
|
| curl timeout in ms |
| — | Auto-save results when |
|
| Default publisher for local files |
|
| litterbox TTL ( |
Scripts
bun start
bun test
bun run smoke-test
bun run smoke-test -- --live--live calls the real API and spends credits.
Notes
Do not write to stdout from this process except the MCP transport. Diagnostics go to stderr.
The HTTP client is Bun Shell
curl, matching the official examples, with aResponsebody as stdin.
License
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