డెవలపర్ డాక్యుమెంటేషన్

Chronosfy MCP — Node.js

@మోడల్ కాంటెక్స్ట్ ప్రోటోకోల్/ఎస్. డి. కె. ని ఇన్స్టాల్ చేయండి. స్కోప్డ్ API కీని ఉపయోగించండి (సిఆర్ఎమ్ః ఈ ఉదాహరణ కోసం వ్రాయండి), లేదా POST /auth/login. తో పొందిన మానవ JWT అదే ఆథరైజేషన్ హెడర్ 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 కీలు/సర్వీస్ టోకెన్లు PSP ఆధారాలను నిర్వహించలేవు. ప్రాంప్ట్లు, లాగ్లు లేదా భాగస్వామ్య సంభాషణ చరిత్రలో రహస్యాలను ఎప్పుడూ చేర్చవద్దు; ఆధారాలను అందించడానికి విశ్వసనీయ క్లయింట్ను ఉపయోగించండి. 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})