بروتوكول Model Context Protocol (MCP) للذكاء الاصطناعي
ربط منصة SmallPict مع Claude Desktop وCursor وGoogle Antigravity ومساعدي البرمجة.
التكامل عبر بروتوكول Model Context Protocol (MCP)
تدعم منصة SmallPict معيار Model Context Protocol (MCP) المفتوح، مما يمكن وكلاء الذكاء الاصطناعي من إدارة وتحسين أصول الصور لديك استناداً إلى الأوامر باللغة الطبيعية.
End-to-End Image Processing & Edge CDN Flow
Sub-50ms image optimization lifecycle from client upload to Cloudflare Enterprise edge delivery.
Client Application
WordPress / SDK / API
Uploads raw image binary with HMAC-SHA256 signature and UUID v4 idempotency key.
Cloudflare Edge CDN
Global Edge PoPs
Checks global edge cache. On cache HIT, delivers AVIF/WebP in <20ms worldwide.
SmallPict Go Gateway
AWS Lambda / API Gateway
Validates HMAC credentials, verifies quota limits, and scopes access to customer_id.
libvips SIMD Worker
High-Speed C-Engine
Multi-threaded quantization transcode to AVIF & WebP with 0 visual loss and ~88% compression.
S3 Pipeline & Storage
Global Object Store
Stores optimized output, invalidates outdated cache tags, and hydrates Cloudflare Edge.
🛠️ أدوات MCP المتاحة
| الأداة | الوظيفة | المعاملات الأساسية |
|---|---|---|
smallpict_optimize | تحسين وضغط الصور المحلية أو الروابط إلى AVIF/WebP | path, url, format, quality, max_width |
smallpict_get_quota | الاستعلام عن الرصيد المتبقي والاستهلاك اللحظي | لا يوجد (تستخدم المفتاح المبرمج) |
smallpict_purge_cdn | إبطال وحذف ملفات محددة من كاش Cloudflare Edge | urls (قائمة الروابط) |
⚙️ الإعداد في برامج تحرير الذكاء الاصطناعي
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:
- الاسم: SmallPict
- النوع:
command - الأمر:
npx -y @smallpict/mcp - متغير البيئة:
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" }}