Pular para o conteúdo principal

How we built /api/client/mcp with OAuth 2.1 + PKCE, two-step action_confirm tokens, and zero-trust S3 file links

MCP-Native Client Portals: Connecting Claude and ChatGPT Safely to Project Status & Billing

Modern B2B clients want to ask their AI assistant 'Where does our project stand and which invoices are due?' without navigating complex dashboards. Here is the security architecture behind Sajjad Studio's Client Portal MCP.

26 de outubro de 2026• 7 minutos de leitura• Palavras de Sajjad Samaei
Sajjad Samaei, product designer and full-stack engineer

Isolated /api/client/mcp gateway with atomic confirmation tokens and scoped S3 access

Isolated /api/client/mcp gateway with atomic confirmation tokens and scoped S3 access
Índice

B2B clients shouldn't have to hunt through nested dashboard menus just to check milestone progress, verify site uptime, or open a change request. With Sajjad Studio's Client Portal MCP (`/api/client/mcp`), clients connect Claude or ChatGPT directly to their account via OAuth 2.1 + PKCE while strict tenant isolation and two-step write confirmation keep their account safe.

Strict Separation Between Staff and Client Doors

Client tokens only carry client:* scopes bound to a verified accountSlug. Every read and write re-verifies account status in real time, strips internal staff notes (isInternal: true), and labels untrusted text fields so prompt injection inside ticket history is never executed as instructions.

Two-Step Write Confirmation (`action_confirm`)

Write tools (ticket_create, ticket_reply, change_request_create) never mutate the database directly. They return a human-readable preview and a 600-second cryptographic confirmToken backed by an atomic PostgreSQL compare-and-set claim.

Want to give your clients an MCP-native portal experience? Get in touch with Sajjad Studio.

compartilhar artigo

Artigos relacionados

Continue lendo sobre criação e execução de produtos.

Tem um projeto em mente?

Escreva para nós; respondemos dentro de 24 horas para determinarmos juntos o próximo passo.