SmallPict LogoSmallPict

Model Context Protocol (MCP) สำหรับ AI

เชื่อมต่อ SmallPict เข้ากับ Claude Desktop, Cursor, Google Antigravity และผู้ช่วย AI

การเชื่อมต่อผ่าน Model Context Protocol (MCP)

SmallPict รองรับมาตรฐานเปิด Model Context Protocol (MCP) ที่พัฒนาขึ้น เพื่อช่วยให้ผู้ช่วยเขียนโค้ด AI สามารถจัดการและปรับแต่งไฟล์รูปภาพได้ตามคำสั่งภาษาธรรมชาติ

Interactive Architecture Flowchart

End-to-End Image Processing & Edge CDN Flow

Sub-50ms image optimization lifecycle from client upload to Cloudflare Enterprise edge delivery.

Origin Request

Client Application

WordPress / SDK / API

Uploads raw image binary with HMAC-SHA256 signature and UUID v4 idempotency key.

Phase 1 Ready
Cache & Delivery

Cloudflare Edge CDN

Global Edge PoPs

Checks global edge cache. On cache HIT, delivers AVIF/WebP in <20ms worldwide.

Phase 2 Ready
Auth & Scoping

SmallPict Go Gateway

AWS Lambda / API Gateway

Validates HMAC credentials, verifies quota limits, and scopes access to customer_id.

Phase 3 Ready
Transcoding

libvips SIMD Worker

High-Speed C-Engine

Multi-threaded quantization transcode to AVIF & WebP with 0 visual loss and ~88% compression.

Phase 4 Ready
Persistent Sync

S3 Pipeline & Storage

Global Object Store

Stores optimized output, invalidates outdated cache tags, and hydrates Cloudflare Edge.

Phase 5 Ready
Zero Data Interception:End-to-end HMAC validation & SHA256 integrity check
Engine: libvips SIMD·Latency: <50ms

🛠️ เครื่องมือ MCP ที่พร้อมใช้งาน

เครื่องมือคำอธิบายพารามิเตอร์หลัก
smallpict_optimizeปรับแต่งรูปภาพในเครื่องหรือจาก URL เป็น AVIF/WebPpath, url, format, quality, max_width
smallpict_get_quotaตรวจสอบยอดโควตาคงเหลือและปริมาณการใช้งานไม่มี (ใช้คีย์ที่กำหนดไว้)
smallpict_purge_cdnล้างไฟล์ที่ระบุออกจากแคชของ Cloudflare CDNurls (รายการ URL)

⚙️ การตั้งค่าในโปรแกรมแก้ไข AI

1. Claude Desktop

เพิ่มการตั้งค่าลงในไฟล์ claude_desktop_config.json:

JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{  "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):

JSON
1
2
3
4
5
6
7
8
9
10
{  "command": "npx",  "args": [    "-y",    "@smallpict/mcp"  ],  "env": {    "SMALLPICT_API_KEY": "sp_sdk_your_key_here"  }}