Build against an explicit contract
A platform team must provision a remote MCP client against an external authorization server, prove OAuth discovery and request binding, and revoke it without turning control-plane events into a credential channel.
Define the user and system contract
A platform team must provision a remote MCP client against an external authorization server, prove OAuth discovery and request binding, and revoke it without turning control-plane events into a credential channel. Record the region, data freshness, latency budget, privacy purpose, credential owner, and fallback before choosing an SDK or endpoint.
Freeze the registration contract
Bind one developer application to the exact client kind, callback, issuer, MCP resource audience, least scope, tool allowlist, purpose, and reviewer decision before provisioning begins.
const nearbyPlacesTool = {
name: "mappls_search_nearby",
description: "Find real places near a validated Mappls Pin or coordinate.",
inputSchema: {
type: "object",
required: ["location", "category"],
properties: {
location: { type: "string", description: "Mappls Pin or 'lat,lng'." },
category: { type: "string" },
radiusMeters: { type: "integer", minimum: 50, maximum: 10_000 }
}
}
};Deliver one authenticated effect
Lease the durable outbox event, sign timestamp, event ID, and exact body with a managed HMAC key, reject stale or oversized deliveries, and deduplicate by event ID plus body hash.
Use the normalized source contract below as the executable boundary. Switch tabs to compare credential-safe languages without changing the operation.
curl --request GET \
--url 'https://ai.mappls.com/models' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'Persist the external identity
Provision through the authorization server management seam, store only the non-secret external client ID and receipt, return the strict result contract, and reconcile a timeout before retrying any new effect.
Prove discovery and request binding
Publish RFC 9728 protected-resource metadata, discover RFC 8414 issuer metadata, require authorization code plus PKCE S256, and include the exact RFC 8707 resource in authorization and token requests.
Revoke without erasing evidence
Deliver a signed revocation for the same registration aggregate and external identity, disable it at the issuer, preserve receipts and audit, and verify that subsequent authorization checks fail closed.
Prove the production behavior
Automate the happy path and every named failure. The release is ready only when an exact retry returns the original registration result; event-id reuse with different bytes conflicts; redirect, issuer, resource, pkce, state, and least scope are validated; no code, token, client secret, or provider credential crosses the adapter callback; restart and revocation preserve attributable evidence. Capture provider request identity without logging credentials or unnecessary precise location.
Failure modes you must exercise
Fail fast with a typed, user-safe outcome and preserve the original request identity.
Keep the last verified state, mark freshness honestly, and retry only within the documented idempotency boundary.
Reconcile durable local and provider evidence before declaring success or issuing a compensating command.
Reconcile durable local and provider evidence before declaring success or issuing a compensating command.
Timeout after a stateful command is an unknown outcome. Query by provider/idempotency identity or wait for authoritative events; do not blindly retry a new command.
Definition of done
MCP production checks
Continue from source, contracts, and a full app
These links resolve to repository-derived evidence; unsupported package names and endpoints are not filled in from guesswork.
/models/models/{api_model_key}/predictmappls-ai-apisskydnn-aiapi-docs13 verified testsRun it, break it, then observe it
Start with fixture credentials, execute the failure plan, and use request logs, usage, webhook evidence, and operational metrics before promoting traffic.