15-day Pro trial · no credit cardStart free →

API & webhooks

MCP serverBeta

Connect AI assistants to STINGIM through the Model Context Protocol server with OAuth 2.1.

The MCP server is in beta. Tool names and scopes are stable; new tools may be added.

The STINGIM MCP server lets AI assistants and agents — Claude Desktop, Cursor, or your own — use your project's data through the Model Context Protocol. Read-only by default; write tools must be granted explicitly.

ItemValue
Endpointhttps://api.stingim.com/v1/mcp
TransportStreamable HTTP, POST only, stateless (no Mcp-Session-Id), JSON responses
Protocol versions2025-11-25, 2025-06-18, 2025-03-26 (default when the header is missing)
Methodsinitialize, ping, tools/list, tools/call
BatchesUp to 10 messages per request; body up to 256 KiB
AuthStatic bearer token (mcp_…) or OAuth 2.1

Option 1: access token

  1. In the console open AI & Knowledge → Custom tools → MCP access (project administrators only).
  2. Click Create token: give it a name, choose the scopes, an expiry and an optional IP allowlist.
  3. Copy the token (mcp_…). It is shown only once; only a hash is stored. Up to 20 tokens per project.

Send it as Authorization: Bearer mcp_….

{
  "mcpServers": {
    "stingim": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.stingim.com/v1/mcp", "--header", "Authorization:${MCP_TOKEN}"],
      "env": { "MCP_TOKEN": "Bearer mcp_YOUR_TOKEN" }
    }
  }
}

Claude Desktop goes in claude_desktop_config.json, Cursor in .cursor/mcp.json.

Option 2: OAuth 2.1

Clients that support MCP authorization can connect with just the endpoint URL. An unauthenticated request returns 401 with:

HTTP
WWW-Authenticate: Bearer realm="mcp", resource_metadata="https://api.stingim.com/.well-known/oauth-protected-resource/v1/mcp"
EndpointURL
Protected resource metadata (RFC 9728)https://api.stingim.com/.well-known/oauth-protected-resource
Authorization server metadata (RFC 8414)https://api.stingim.com/.well-known/oauth-authorization-server
Dynamic client registration (RFC 7591)POST https://api.stingim.com/oauth/register
Authorizehttps://api.stingim.com/oauth/authorize
TokenPOST https://api.stingim.com/oauth/token
RevokePOST https://api.stingim.com/oauth/revoke
  • Authorization code flow with PKCE S256 (required); grants authorization_code and refresh_token.
  • Client authentication: none, client_secret_post or client_secret_basic. Redirect URIs may be https, loopback http or a private scheme (max 5 per client).
  • The user is sent to a consent page in the console. Only a project administrator can approve, and chooses which scopes to grant.
  • Authorization codes live 60 seconds. Access tokens (mcpat_…) live 1 hour; refresh tokens (mcprt_…) live 30 days and rotate on use. Reusing a code or refresh token revokes the whole grant.
  • Tokens are bound to the resource https://api.stingim.com/v1/mcp (RFC 8707). The iss parameter is returned on authorization responses.
  • Connected applications are listed under MCP access → Connected applications, where they can be disconnected.

Scopes and tools

ToolScopeArguments
kb_search — search the knowledge basekb:readquery (1–500), lang? (en zh th vi id ms), top_k (1–10, default 5), include_help_center (default true)
faq_get — get an FAQkb:readfaq_id (integer), lang?
ticket_get — get a tickettickets:readticket_id
ticket_search — search ticketstickets:readquery? (≤ 100), status? (open closed), contact_id?, page (1–200), page_size (1–50, default 20)
contact_lookup — look up a contactcontacts:reademail?, phone?, external_user_id?
order_status — order statusorders:readorder_number (≤ 40), email?, phone? — needs the Shopify integration
conversation_summary — summary and recent messagesconversations:readconversation_id
conversation_search — search conversationsconversations:readcontact_id?, email?, phone?, keyword? (2–100), status? (open closed waiting bot queued active), date_from?, date_to?, page (1–100), page_size (1–50)
ticket_create — create a tickettickets:createidempotency_key, contact_id, conversation_id?, title (1–200), description? (≤ 4000), priority? (low medium high urgent)
ticket_comment — comment on a tickettickets:commentidempotency_key, ticket_id, content (1–4000)
contact_tag_add — add existing tags to a contactcontacts:tagidempotency_key, contact_id, tag_names?, tag_ids? (each ≤ 10)
  • IDs match ^[A-Za-z0-9_-]{1,64}$; idempotency keys ^[A-Za-z0-9_\-:.]{8,128}$.
  • Arguments are validated strictly: wrong types are not coerced and unknown fields are rejected.
  • Calling a tool outside the token's scopes returns JSON-RPC error -32602.

Write tools and idempotency

Every write tool requires an idempotency_key:

SituationResult
New keyExecutes and stores the result
Same key and arguments, finishedOriginal result with "idempotent_replay": true; nothing is written twice
Same key, different argumentsidempotency_conflict
Same key while the first call is still runningin_progress
Timeout or server error on ticket_create / ticket_commentoutcome_unknown — check with ticket_search, then retry with a new key

Tool errors

Tool failures come back as a tool result with isError: true and { "error": { "code", "message" } }, so the model can correct itself. Codes: invalid_arguments, not_found, not_connected, not_verified, rate_limited, idempotency_conflict, in_progress, outcome_unknown, unavailable, result_too_large. Results larger than 48,000 bytes are truncated from the end of their list ("truncated": true) or rejected with result_too_large.

Limits

  • 120 JSON-RPC requests per minute per token (HTTP 429, Retry-After: 60).
  • 20 write tool calls per minute per token (rate_limited tool error).
  • Results up to 48,000 bytes.

Usage per token (calls, errors, latency per tool for the last 30 days) is shown on the MCP access page. Secrets such as tokens, passwords, API keys and AI prompts are never included in tool results.

Found a mistake? Email [email protected]