Api patterns

From wyre-technology/msp-claude-plugins · View interactive version

Api patterns is an AI agent skill from the GitHub repository wyre-technology/msp-claude-plugins. Warmly's remote MCP server: WorkOS AuthKit OAuth 2.0 + PKCE authentication, RFC 9728 protected-resource metadata, multi-organization scoping, the stateful Streamable HTTP session model, the three read-only visitor-intelligence tools and their fields, credit semantics, error codes, and rate-limit gui

How to use this skill

Skill file

Warmly MCP Tools & API Patterns

Overview

Warmly hosts a remote MCP server at https://opps-api.getwarmly.com/api/mcp that exposes three read-only tools backed by Warmly's visitor identification platform. Authentication is OAuth 2.0 with PKCE, delegated to a WorkOS AuthKit tenant. Transport is MCP Streamable HTTP and the server is stateful — it issues an Mcp-Session-Id on initialize that must accompany subsequent requests.

Official docs: docs.getwarmly.com/mcp

Anti-triggers

warmly-visitor-intelligence.

own tenants, scopes, and session models; use hubspot-api-patterns or

pandadoc-api-patterns.

Connection & Authentication

MCP Server Endpoint

POST https://opps-api.getwarmly.com/api/mcp
Accept: application/json, text/event-stream

OAuth 2.0 via WorkOS AuthKit

Warmly publishes RFC 9728 protected-resource metadata; the authorization server is a WorkOS AuthKit tenant:

GET https://opps-api.getwarmly.com/.well-known/oauth-protected-resource
→ authorization_servers: ["https://vigorous-paper-03.authkit.app"]

AuthKit's .well-known/oauth-authorization-server exposes:

Scopes used at the IdP: openid profile email offline_access. The MCP resource itself has scopes_supported: [] — no resource-specific scopes are required, only a valid bearer token.

Multi-Organization Scoping

For accounts with multiple Warmly organizations, every call must pin org context. Two equivalent transports:

The WYRE MCP Gateway uses the header form so the org never leaks into proxy access logs. Single-organization tokens resolve their org server-side; the header is optional.

Available Tools

All three tools are read-only synchronous calls and do not consume identification credits (a list call returns the same visitors that have already been identified — Warmly bills on identification, not retrieval).

`list_warm_visitors`

Returns identified site visitors with full enrichment.

Per-visitor fields include:

`list_warm_accounts`

Visitor activity rolled up to the account/company level.

Per-account fields include:

`get_credits_remaining`

Current month's identification credit balance. Useful for catching credit exhaustion before scaling outreach off Warmly data.

Best Practices

Error Handling

| Status | Meaning | Likely cause |

|---|---|---|

| 401 invalid_token | Missing or expired bearer token | Refresh the OAuth token; check WWW-Authenticate: Bearer resource_metadata=... for the auth server |

| 403 | Token valid, organization context wrong | Pass X-Warmly-Organization-Id for multi-org accounts, or verify the token's authorized org |

| 400 missing session | Mcp-Session-Id not sent | The server is stateful — every tool call must carry the session id issued on initialize |

| 5xx | Warmly platform error | Retry with backoff; persistent 5xx → contact Warmly support |

The WYRE MCP Gateway handles the initialize handshake, session id, and token refresh automatically — these are concerns only when connecting to Warmly's MCP directly.

Rate Limits

Warmly has not published explicit MCP rate limits. The three tools are list reads, not write operations; sustained polling is unnecessary because identifications are batched server-side. A safe pattern is to call list_warm_visitors / list_warm_accounts no more than once per minute per workspace.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.