Design an MCP integration for a document assistant that reads local files safely.

Instruction: Explain server-enforced file scope, bounded reads, and how you handle content that tries to instruct the assistant.

Context: Design a local document integration that reads permitted files without exposing neighboring directories or treating document text as authority.

Updated

Official answer available

Read the opening below, then unlock the full answer and practical guidance.

I would start with a read-only integration and a user-selected directory. The server would resolve requested paths against that directory, reject escapes, and define whether symlinks are allowed. The permission check must apply to the file actually opened, including protections against path changes between checking and opening.

Reads would have file-size and output limits, permitted formats, and clear errors...

Your preparation path

Work through these questions in order. Read the answer aloud, then explain it in your own words.

Related Questions