Connect MCP with a restricted credential

Connect an AI client through Dosya OAuth, pin it to one readable workspace, limit optional account data, and verify the granted read boundary.

Last reviewed

Dosya MCP uses OAuth rather than a pasted API key. The resulting grant is pinned to one readable workspace, requires file-reading access, and cannot change, share, or delete stored content.

Four panels show entering the Dosya MCP server URL, choosing one readable workspace, limiting optional account access, and allowing the OAuth connection.
Four panels show entering the Dosya MCP server URL, choosing one readable workspace, limiting optional account access, and allowing the OAuth connection. Open full-size screenshot.

Steps

  1. In the MCP client, add the server URL https://mcp.dosya.dev/mcp. Follow the browser sign-in opened by the client; do not create or paste a dos_… API key because Dosya rejects API keys and mobile tokens as MCP credentials.
  2. On the consent screen, confirm the requesting app and its destination. A recognized callback shows Verified; a local client warns that access goes to an app on your computer, while any other self-registered app shows Not verified and names its redirect host.
  3. Under Workspace it can read, choose the single workspace this connection needs. End-to-end encrypted Spaces are excluded because Dosya cannot decrypt their files; there is no folder-level MCP grant in the current release.
  4. Keep the required Find and read files in workspace permission. Clear optional See your plan and storage unless the client needs get_account_info; selecting it adds account.read to the mandatory files.read scope.
  5. Select Allow app before the ten-minute consent transaction expires. Deny returns control without creating a grant, and an expired request shows This request expired. Go back to your AI app and connect again.
  6. Return to the client and run list_workspaces. The structured result should name only the workspace selected during consent, proving that the connection cannot enumerate another workspace or the Vault.

The OAuth access token stays in the MCP client. Dosya’s consent page never reveals a reusable secret for manual storage, and unknown scopes submitted by a client are discarded rather than granted.

Reference for “Connect MCP with a restricted credential”: Dosya REST API overview page with Get API Key and View SDKs links.
Reference for “Connect MCP with a restricted credential”: Dosya REST API overview page with Get API Key and View SDKs links. Open full-size screenshot.

Expected result

The client connects to the Dosya MCP resource with files.read, sees one chosen non-encrypted workspace, and has no mutation capability. get_account_info works only when See your plan and storage was granted.

No workspace is available. The consent page says You have no workspace this app can read. End-to-end encrypted Spaces cannot be connected. Join or create a standard workspace before restarting from the AI client.

The callback looks unfamiliar. Choose Deny. Restart only from a client and redirect destination you recognize.

Was this helpful?

Loading helpfulness results…

Voting saves a necessary ballot cookie for up to 180 days so you can change your answer.

Questions and replies

Ask about the steps in this guide. Questions are reviewed before publication.

Keep account details, credentials and private files out of public questions. Use private support for those.

Loading questions…

    Sign in to your Dosya account to ask a question.

    Check the outcome before you retry

    Use these shared checks when a task needs a second look.