メインコンテンツにスキップ

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.

2026年10月26日• 7 最小読み取り• の言葉 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
目次

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.

記事をシェアする

関連記事

製品の製作と実行について読み続けてください。

何かプロジェクトを考えていますか?

私たちに手紙を書いてください。 24 時間以内に返信し、次のステップを一緒に決定します。