Skip to main content
Glama
DenizV

loop-reader-mcp

by DenizV

loop-reader-mcp

A read-only, remote Model Context Protocol (MCP) server that lets an AI assistant search and read Microsoft Loop content through the Microsoft Graph API — with per-user permission trimming, so each person only ever sees the Loop pages they already have access to.

Microsoft Loop has no official content API. This project reads Loop through the Graph file layer using the documented ?format=html conversion for .loop / .fluid files, and layers on an authorization model that keeps every user strictly inside their own permissions.

Read-only by construction. The Graph client permits only GET plus POST /search/query. No create/update/delete tools exist.

Why this is interesting

Loop workspace pages live in SharePoint Embedded (SPE) containers, which do not accept delegated (per-user) tokens for content downloads — only an app-only identity can fetch the bytes. Naively using that app identity for everything would flatten permissions: any connected user could read any Loop page. This server avoids that with a two-identity, capability-based design:

Assistant ──/.well-known discovery──▶ server → "log in with Microsoft Entra"
Assistant ──OAuth (Entra sign-in)───▶ user authenticates (must be app-assigned)
Assistant ──Bearer <user token>─────▶ server validates it (jose + Entra JWKS)
        │
        ├─ discovery tools ── On-Behalf-Of ─▶ Graph as the USER
        │                                     (Microsoft security-trims results)
        │                                     └─ each hit → signed capability handle
        │
        └─ loop_get_page(ref)
             ├─ verify handle: HMAC signature + principal + expiry
             └─ fetch via APP identity (?format=html) → sanitized HTML

The authorization decision is Microsoft's, not this code's. A user can only discover pages they may access (search runs as them), and can only read a page via a signed handle minted for their own principal. The app identity is used only to retrieve bytes the user already proved they can see.

Related MCP server: M365 MCP

Tools (all read-only)

Tool

Identity

Description

loop_search

user (OBO)

Full-text search across Loop, trimmed to the caller

loop_list_recent

user (OBO)

The caller's most recently modified Loop pages

loop_find_meeting_notes

user (OBO)

Best-effort meeting-notes finder (name/path heuristic)

loop_list_workspaces

user (OBO)

Loop workspaces the caller can access, recency-sorted

loop_list_components

user (OBO)

.loop components in the caller's OneDrive

loop_get_page

app (handle-gated)

A page as sanitized HTML, read by ref

Security model

  • The app is its own OAuth resource server: it validates each Entra JWT (signature via JWKS, audience, issuer, expiry, scp=access_as_user, rejects ID tokens) and publishes discovery docs pointing clients at Entra. No reverse- proxy auth needed.

  • Signed, stateless capability handles: loop_search returns an opaque ref (HMAC-signed, carrying item id + principal + expiry). loop_get_page reads only by ref — the model never handles raw identifiers, handles can't be forged or replayed across users/clients, and there's no server-side state to lose across restarts/instances.

  • Per-user trimming via On-Behalf-Of; app identity reachable only through a verified handle.

  • Injection-resistant: user queries are sanitized and results are re- filtered server-side to .loop/.fluid, so a crafted query can neither escape the file-type scope nor exceed the user's own access.

  • Structured audit logging of every search/read (principal + item ids, never tokens or content). Optional App Insights telemetry redacts item ids.

  • See SECURITY.md for the full model and residual risks.

Setup (overview)

Requires a Microsoft 365 tenant with Loop and rights to register an Entra app.

  1. Register an Entra application with Microsoft Graph Application permissions (Files.Read.All, Sites.Read.All, FileStorageContainer.Selected) and Delegated (Files.Read.All, Sites.Read.All) for OBO; expose an access_as_user scope; add your MCP client's OAuth redirect URI; require user assignment via a security group.

  2. Register the app as a guest on Loop's SPE container type (one-time, SharePoint Online Management Shell, Windows PowerShell):

    Set-SPOApplicationPermission `
      -OwningApplicationId "a187e399-0c36-4b98-8f04-1edc167a0996" `
      -GuestApplicationId "<your-client-id>" `
      -PermissionAppOnly "readcontent"

    (a187e399-… is Microsoft Loop's container type ID, constant across tenants.)

  3. Host it on any platform running a persistent Node.js 20+ HTTP process, reachable over HTTPS. Set the env vars from .env.example. Enable "always on" so it doesn't cold-start. If you don't use App Insights, install with npm install --omit=optional to keep the deploy small.

  4. Add it to your MCP client as a custom/remote connector (server URL + OAuth client id/secret). Each user connects individually so their own sign-in drives the trimming.

Configuration

See .env.example. Required: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET (or certificate), PUBLIC_URL. Recommended: HANDLE_SIGNING_KEY. Optional: VERIFY_TTL_MINUTES (15), REQUIRE_SCOPE (true), STRICT_REVOCATION (false), MAX_CONTENT_BYTES, PORT, APPLICATIONINSIGHTS_CONNECTION_STRING.

Status & caveats

Built against Microsoft Graph and MCP as of 2026. The ?format=html conversion and SPE guest registration are documented, but "Loop via the file layer" is not an official Loop API — behavior may change. Community code, not a certified product: review it and run npm audit before production. See CHANGELOG.md for version history and SECURITY.md for the security model.

License

MIT — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.

  • The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.

  • The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.

  • Official Microsoft MCP Server to query Microsoft Entra data using natural language

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A production-ready MCP server that provides secure, delegated access to Microsoft 365 services including Email, SharePoint, OneDrive, and Calendar. It enables AI models to search messages, browse files, manage calendar events, and parse document contents using OAuth 2.1 authentication.
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server that provides read access to Microsoft Loop workspaces and pages by reusing your Loop web session, enabling listing, reading, and searching across Loop content without app registration.
    8
    35
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A secure MCP server that connects AI assistants to Google Workspace, enabling permission-aware retrieval-augmented generation for grounded answers.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DenizV/loop-reader-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server