POST /mcp
استخدم حقول الطلب والأذونات الموثقة لنقطة HTTP هذه.
مثال طلب#
curl -X POST 'https://platform.tongai.io/mcp' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Accept: application/json, text/event-stream" \ -H "MCP-Protocol-Version: 2025-11-25" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": { "name": "your-app", "version": "1.0.0" } }}'الإعدادات
curl --versionالمصادقة#
استخدم مفتاح API على الخادم لحسابك، أو OAuth لحساب كل عميل. لا ترسل المفاتيح في المطالبات أو وسيطات الأدوات.
المعاملات#
MCP-Protocol-VersionstringاختياريIdempotency-Keystringاختياريمعرّف UUID، مثل e8aa0a87-6cd9-42eb-975a-b72bf43218c8.
محتوى الطلب#
application/jsonjsonrpcJSONمطلوبالقيم المسموح بها
"2.0"idstring | integerاختياريmethodstringمطلوبparamsobjectاختياريمخطط الاستجابة#
{ "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2025-11-25", "capabilities": { "tools": {}, "resources": {} }, "serverInfo": { "name": "tong-developer-tools", "version": "0.1.0" } }}الأخطاء والحدود#
{ "jsonrpc": "2.0", "id": 2, "result": { "isError": true, "content": [ { "type": "text", "text": "{\"error\":{\"code\":\"REQUEST_INVALID\",\"message\":\"Check the request fields and try again.\",\"request_id\":\"e8aa0a87-6cd9-42eb-975a-b72bf43218c8\",\"retryable\":false},\"request_id\":\"e8aa0a87-6cd9-42eb-975a-b72bf43218c8\"}" } ] }}