Model Context Protocol (MCP) สำหรับ AI
เชื่อมต่อ SmallPict เข้ากับ Claude Desktop, Cursor, Google Antigravity และผู้ช่วย AI
SmallPict รองรับมาตรฐานเปิด Model Context Protocol (MCP) ที่พัฒนาขึ้น เพื่อช่วยให้ผู้ช่วยเขียนโค้ด AI สามารถจัดการและปรับแต่งไฟล์รูปภาพได้ตามคำสั่งภาษาธรรมชาติ
End-to-End Image Processing & Edge CDN Flow
Sub-50ms image optimization lifecycle from client upload to global edge delivery.
- 01
Client Application
WordPress / SDK / API
Uploads raw image binary with HMAC-SHA256 signature and UUID v4 idempotency key.
Origin Request
- 02
smallPict Edge CDN
Global Edge PoPs
Checks global edge cache. On cache HIT, delivers AVIF/WebP in <20ms worldwide.
Cache & Delivery
- 03
SmallPict API Gateway
Authentication & Quotas
Validates HMAC credentials, verifies quota limits, and scopes access to customer_id.
Auth & Scoping
- 04
Optimization Engine
High-Speed Native Encoder
Multi-threaded quantization transcode to AVIF & WebP with no visible quality loss and much smaller files.
Transcoding
- 05
Secure Storage & Sync
Encrypted Cloud Storage
Stores optimized output, invalidates outdated cache tags, and warms the edge cache.
Persistent Sync
Zero Data Interception: End-to-end HMAC validation & SHA256 integrity check
Engine: smallPict
เครื่องมือ MCP ที่พร้อมใช้งาน
| เครื่องมือ | คำอธิบาย | พารามิเตอร์หลัก |
|---|---|---|
smallpict_optimize | ปรับแต่งรูปภาพในเครื่องหรือจาก URL เป็น AVIF/WebP | path, url, format, quality, max_width |
smallpict_get_quota | ตรวจสอบยอดโควตาคงเหลือและปริมาณการใช้งาน | ไม่มี (ใช้คีย์ที่กำหนดไว้) |
smallpict_purge_cdn | ล้างไฟล์ที่ระบุออกจากแคชของ SmallPict CDN | urls (รายการ URL) |
การตั้งค่าในโปรแกรมแก้ไข AI
1. Claude Desktop
เพิ่มการตั้งค่าลงในไฟล์ claude_desktop_config.json:
{ "mcpServers": { "smallpict": { "command": "npx", "args": [ "-y", "@smallpict/mcp" ], "env": { "SMALLPICT_API_KEY": "sp_sdk_your_key_here" } } }}2. Cursor IDE
ใน Cursor Settings > Features > MCP:
- Name: SmallPict
- Type:
command - Command:
npx -y @smallpict/mcp - Environment Variable:
SMALLPICT_API_KEY=sp_sdk_your_key_here
3. Google Antigravity
ในไฟล์การตั้งค่า (~/.gemini/antigravity/mcp/smallpict.json):
{ "command": "npx", "args": [ "-y", "@smallpict/mcp" ], "env": { "SMALLPICT_API_KEY": "sp_sdk_your_key_here" }}