विकसकांसाठी दस्तऐवज

Chronosfy MCP — Node.js

@मॉडेलकॉन्टेक्स्टप्रोटोकॉल/एस. डी. के. स्थापित करा. स्कोपचा वापर करा API किल्ली (सी. आर. एम.: या उदाहरणासाठी लिहा), किंवा मनुष्य JWT सह प्राप्त POST /auth/login. त्याच अधिकृतता शीर्षलेखावर काम करते HTTP आणि MCP.
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const base = 'https://chronosfy.com/api';
const authorization = process.env.CHRONOSFY_AUTH; // e.g. 'ApiKey ...'; never hardcode secrets
const request_key = 'person:customer-42:v1'; // preserve across retries/restarts
const person = {"name":"Alice","email":"[email protected]","external_id":"customer-42","metadata":{"source":"integration"}};
const client = new Client({ name: 'integration', version: '1' });
await client.connect(new StreamableHTTPClientTransport(new URL(base + '/mcp'), {
  requestInit: { headers: { Authorization: authorization } },
}));
try {
  const result = await client.callTool({ name: 'create_person', arguments: { ...person, request_key } });
  if (result.isError) throw new Error(JSON.stringify(result.structuredContent ?? result.content));
  const replay = await fetch(base + '/crm/persons', { method: 'POST',
    headers: { Authorization: authorization, 'Content-Type': 'application/json', 'Idempotency-Key': request_key },
    body: JSON.stringify(person) });
  if (!replay.ok) throw new Error(await replay.text());
  // Both results identify the same person.
} finally {
  await client.close();
}
साधने/यादी असलेली साधने शोधा किंवा GET /mcp/tools. दोन्ही समान नावे आणि योजना वापरतात. यजमान किंवा अंतर्भूत one-off देयक, आवर्ती नोंदणी आणि कार्ड साठवणुकीसाठी create_checkout_session आणि get_checkout_session वापरा. /docs/quickstart/checkout. पहा create_person, create_action आणि create_recurrence पर्यायी request_key (8–128 letters/digits/.:-) स्वीकारतात. प्रत्येक नियोजित ईमेल पाठवताना निवडलेल्या व्यक्तीचा किंवा कंपनीचा त्या वेळी नोंदवलेला ईमेल पत्ता वापरला जातो. `subject_type: "company"` · `subject_id` create_payment_link ची आवश्यकता आहे. केवळ त्याच तार्किक विनंतीसाठी आणि पेलोडसाठी किल्ली पुन्हा वापरा. create_payment_link हे save_payment_method आणि set_as_default स्वीकारते, ज्यासाठी देयके आवश्यक असतातः व्यवस्था तसेच देयकेः दुवे. payment_method_status हे देयक स्थितीपासून वेगळे वाचा. create_recurrence first_run_at स्वीकारते; त्याची कायमस्वरूपी स्वयंचलित लोअर बाउंड थांबा/रेझ्यूमे आणि संपादने टिकून राहते. संपूर्ण प्रवाहासाठी /docs/quickstart/renewals पहा. execute_action आणि trigger_recurrence यांनी त्यांचा वेगळा आवश्यक 8–200 वर्ण करार कायम ठेवला आहे. साधन अपयश संच isError = सत्य; मजकूर [0]. मजकुरामध्ये JSON आणि structuredContent मध्ये त्रुटी, संदेश, status_code आणि पर्यायी क्षेत्रे/तपशील आहेत. MCP वाहतुकीवरील HTTP 200 हे व्यावसायिक यश नाही. विकृत JSON-RPC, अज्ञात साधने आणि असमर्थित कार्य विनंत्या या प्रोटोकॉल त्रुटी आहेत. पी. एस. पी. साधनेः get_payment_settings, list_payment_providers, get_payment_webhook_url आणि set_payment_settings सध्याच्या मानवी मालकाची गरज आहे. बचत करण्यासाठी, मिळवा reauth_token पासून POST /auth/reauth सोबत ऑपरेशन = "PUT /settings/payment" आणि त्याच लॉगइन JWT वापरून ते set_payment_settings वर पाठवा. five-minute पुरावा एकदाच वापरला जातो, ज्यात अयशस्वी बचतींचा समावेश आहे. API किज/सेवा टोकन पी. एस. पी. प्रमाणपत्रांचे व्यवस्थापन करू शकत नाहीत. संकेत, नोंदी किंवा सामायिक संभाषण इतिहासात कधीही गुप्त गोष्टी समाविष्ट करू नका; ओळखपत्र पुरवण्यासाठी विश्वासू ग्राहकाचा वापर करा. RSVP organizers use /mcp with rsvp:read or rsvp:write. Create an event with create_rsvp_event, open it with update_rsvp_event, then use add_rsvp_invitees and send_rsvp_invitations. Provide request_key on MCP sends or Idempotency-Key on REST sends. Reuse the same key and guest IDs on a network retry. The receipt lists each guest's dispatch state. A dispatching or unknown delivery needs reconciliation before explicitly sending a new batch. A guest can connect to POST /rsvp/guest/mcp using the invitation UUID as a bearer credential. open_rsvp_invitation, respond_to_rsvp_invitation and open_rsvp_pass return the guest's private URL. The person confirms or declines there. The organizer scans the pass with check_in_rsvp_qr. For email delivery, use get_email_stats and list_email_recipients with action_id, page and limit for the list. Platform operators connect to POST /admin/mcp using their named X-Platform-Admin-Token header. GET /admin/mcp/tools and GET /admin/openapi.json return only the operations granted to that operator. ## डीफॉल्ट पेमेंट प्रदाता पहिला प्रदाता नोंदवतानाही प्रवेश तपशील जतन केल्यावर सध्याची डीफॉल्ट निवड तशीच राहते. नवीन पेमेंटसाठी खाते ठरवताना मालक जतन केलेले खाते निवडून बदलाची पुष्टी करतो. डीफॉल्ट निवडण्यापूर्वीही चेकआउटमध्ये विशिष्ट प्रदाता देता येतो.
GET /api/settings/payment
Authorization: Bearer <owner_access_token>

POST /api/auth/reauth
Authorization: Bearer <owner_access_token>
Content-Type: application/json

{"password":"<password>","operation":"PUT /settings/payment/default"}

PUT /api/settings/payment/default
Authorization: Bearer <owner_access_token>
X-Reauth-Token: <reauth_token>
Content-Type: application/json

{"config_id":"<configurations[].config_id>"}
MCP: set_default_payment_provider({config_id, reauth_token})