LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
← Build a tenant-safe MCP tool server & eval runner
BUILD → VERIFY → EXPLAIN · STEP 2 OF 6

Enforce server-side tenant and role boundaries

Treat the LLM agent as an untrusted client; scope data by trusted actor identity.

UNDERSTAND

Bring these concepts with you

BUILD

Your implementation

  1. Implement executeAuthorizedTool(actor, toolName, args, db) for lookup_ticket and update_ticket_status.
  2. Scope lookup_ticket to matching actor.organizationId and (staff role OR ticket.ownerId === actor.id).
  3. Require actor.role === 'staff' within the same organization for update_ticket_status.
export function executeAuthorizedTool(actor, toolName, args, db) {
  // Scope ticket reads and status updates to trusted actor identity and organization.
}
Need a hint?
  • Return generic 'Ticket not found' for both missing and cross-tenant records.
  • Ignore any identity claims inside args—rely solely on trusted actor context.

Saved on this device · 0 / 6000 · Do not include passwords or private data.

VERIFY

Acceptance checks

From the folder containing your downloaded files, run:

node checks.mjs ./starter.mjs 2

This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.

Record your attempt to enable the checklist and reference comparison.

Compare with the reference

Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.

EXPLAIN

Your interviewer asks

Why is prompt-level access control ('never read other tenants') fundamentally insecure for MCP servers?

Say your answer aloud, then record the trade-offs and evidence in your notes above.

LOCAL VOICE REHEARSAL

Rehearse your step walkthrough aloud

Target pacing: 02:00 · Stays in this browser only; never uploaded.

00:00/ 02:00
AlifBay Prep