Answer

What is a role-aware MCP server for documentation?

A role-aware MCP server answers an AI agent's questions from your docs while respecting each user's permissions — so a client's agent sees only what that client can see. Here's how it works and why it matters for private docs.

Updated 2026-06-28 · 2 min read

The short answer

A role-aware MCP server is a Model Context Protocol server that returns documentation to an AI agent based on the connecting user's role and permissions, instead of exposing everything. When a client's agent connects with a commenter account scoped to one project, it can search only that project's allowed docs — and files excluded by an ignore rule (like .docignore) are never indexed at all. This is what makes MCP safe on private, multi-tenant docs; most doc-tool MCPs are either public-only or ignore per-user roles.

Most documentation tools now claim to "have MCP." But there's a quiet, important difference between an MCP server that dumps your whole docs set to any connected agent and one that respects who is asking. The second kind — a role-aware MCP server — is what makes AI access safe on private, client-facing documentation.

What MCP is, in one paragraph

The Model Context Protocol (MCP) is an open standard that lets AI clients — Claude Code, Cursor, Claude Desktop, ChatGPT, and others — connect to external tools and data sources. An MCP server for documentation exposes your docs so an agent can search them and answer questions grounded in your actual content, instead of guessing.

Why "role-aware" is the part that matters

Documentation isn't flat. An admin should see everything. A client should see only their project. A contractor shouldn't see internal runbooks. A role-aware MCP server enforces exactly that: each connection inherits the connecting user's role and project scope, and results are filtered accordingly.

Here's the same question, two accounts, one server:

Admin agent  → "Find the deployment runbook"  → returns runbook.md + internal notes
Client agent → "Find the deployment runbook"  → runbook is internal → returns nothing

The agent didn't change. The permissions did. That's role-awareness.

How it works under the hood

  1. The agent authenticates as a user via OAuth 2.1 + PKCE — not as an anonymous app.
  2. Every search/fetch is filtered by that user's role (admin / commenter / viewer) and project scope.
  3. Ignored files are never indexed. With Miradorly, anything matched by .docignore is genuinely absent from the index — not hidden in the UI, but never searchable or returnable over MCP.
  4. Read-only by design. The agent can read documents; it cannot mutate or overwrite them.
# .docignore — excluded from rendering, search, and MCP for every role
CLAUDE.md
**/secrets/**
drafts/
*.internal.md

Why most doc-tool MCPs fall short here

ApproachWorks on private docsPer-user role-awareNotes
Mintlify MCPPublic docs only
Notion MCP⚠️Blocks guest users entirely
Miradorly MCPOAuth 2.1 + PKCE, read-only, .docignore

Public-only MCP can't serve private client docs at all. Notion's MCP blocks the guest accounts that clients and contractors use. A role-aware MCP over private docs is the model that actually fits agency and client work.

When you need a role-aware MCP

You need one if any of these are true:

  • You share docs with clients or contractors and want their AI agents to query them.
  • Your repo mixes internal and external docs that must not leak to the wrong reader.
  • You want AI access to private documentation without making it public.

If your docs are fully public and single-audience, a simpler public MCP is enough. The moment access control matters, role-awareness is the requirement — not a nice-to-have.

How to set one up

With Miradorly, the MCP server is included and inherits the same permission model as the portal and comments — one access system, three surfaces. Connect any MCP-capable client:

claude mcp add miradorly https://mcp.miradorly.com/<your-workspace>

From there, each user's agent sees exactly what their account can see. Nothing more.

Frequently asked questions

What does 'role-aware' mean for an MCP server?

It means the MCP server enforces the same access control as the rest of your docs platform. Each connection inherits the user's role (admin, commenter, viewer) and project scope, so the agent only retrieves documents that user is allowed to see.

How is a role-aware MCP secured?

With OAuth 2.1 + PKCE. The agent authenticates as a specific user, and every search or fetch is filtered by that user's permissions. Miradorly's MCP is also read-only by design, so an agent can read docs but never overwrite them.

Does a role-aware MCP work on private docs?

Yes — that's the point. Unlike public-only MCP servers (such as Mintlify's), a role-aware MCP runs on private docs and scopes results per user. It's the right model for agencies and teams sharing docs with clients.

What stops secrets or drafts from being returned over MCP?

An ignore file. Miradorly uses .docignore (same syntax as .gitignore): matched files like CLAUDE.md, secrets, and drafts are never indexed, so they can't appear in search or MCP results for anyone, regardless of role.