Skip to content

MCP (Model Context Protocol) User Guide ​

This guide explains how to configure and use the Model Context Protocol (MCP) integration with the NetApp Connector, enabling AI assistants like ChatGPT Enterprise and Anthropic Claude to search and retrieve files from your file shares with proper access control.


Table of Contents ​

  1. Overview
  2. Architecture
  3. Prerequisites
  4. Configuration
  5. Claude Desktop Setup
  6. Available Tools
  7. Security & Access Control
  8. Rate Limiting
  9. Troubleshooting
  10. Environment Variables Reference

Overview ​

The MCP integration allows AI assistants to securely search and retrieve content from your NetApp file shares. Key features include:

  • πŸ” ACL-Based Access Control: Users can only access files they have permission to view based on SMB ACLs resolved to Microsoft Entra IDs
  • πŸ” Full-Text Search: Search file content using natural language queries
  • πŸ“„ Content Windowing: Navigate large documents in chunks that fit AI context windows
  • ⚑ Rate Limiting: Per-user rate limits prevent abuse and ensure fair usage
  • πŸ”’ OAuth 2.0 Authentication: Secure authentication via Microsoft Entra ID

How It Works ​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         User asks Claude a question                         β”‚
β”‚                    "Find the Q4 financial reports"                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                              Claude Desktop                                 β”‚
β”‚                     Uses MCP tools to search files                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β”‚ MCP Protocol (HTTP + OAuth)
                                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         NetApp Connector MCP Server                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   OAuth     β”‚  β”‚ ACL Filter  β”‚  β”‚ Rate Limiterβ”‚  β”‚ Content Windowing   β”‚ β”‚
β”‚  β”‚ Validation  β”‚  β”‚ (per-user)  β”‚  β”‚ (per-user)  β”‚  β”‚ (large documents)   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β”‚ Internal API calls
                                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         NetApp Connector Database                           β”‚
β”‚              (File metadata, content, ACLs, search indexes)                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Architecture ​

Component Diagram ​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                              AI AGENT LAYER                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚  β”‚ Claude Desktop β”‚  β”‚  Windsurf IDE  β”‚  β”‚  Custom Agent  β”‚                  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚          β”‚                   β”‚                   β”‚                           β”‚
β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                           β”‚
β”‚                              β”‚                                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚ MCP Protocol
                               β”‚ (HTTP POST /mcp)
                               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           MCP SERVER LAYER                                   β”‚
β”‚                                                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                    HTTP Transport (FastAPI Router)                      β”‚ β”‚
β”‚  β”‚                         POST /mcp endpoint                              β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                    β”‚                                         β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚         β–Ό                          β–Ό                          β–Ό              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚   OAuth     β”‚           β”‚ ACL Filter  β”‚           β”‚    Rate     β”‚         β”‚
β”‚  β”‚ Validation  β”‚           β”‚             β”‚           β”‚   Limiter   β”‚         β”‚
β”‚  β”‚             β”‚           β”‚ - User ID   β”‚           β”‚             β”‚         β”‚
β”‚  β”‚ - Entra ID  β”‚           β”‚ - Groups    β”‚           β”‚ - Per-tool  β”‚         β”‚
β”‚  β”‚ - JWT       β”‚           β”‚ - Share ACL β”‚           β”‚ - Per-user  β”‚         β”‚
β”‚  β”‚ - Groups    β”‚           β”‚   Override  β”‚           β”‚ - Bytes     β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚                                    β”‚                                         β”‚
β”‚                                    β–Ό                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                           MCP TOOLS                                     β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚ β”‚
β”‚  β”‚  β”‚ search_files β”‚ β”‚ full_text_   β”‚ β”‚ get_file_    β”‚ β”‚ list_shares  β”‚    β”‚ β”‚
β”‚  β”‚  β”‚              β”‚ β”‚ search       β”‚ β”‚ content      β”‚ β”‚              β”‚    β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                                       β”‚ β”‚
β”‚  β”‚  β”‚ search_      β”‚                                                       β”‚ β”‚
β”‚  β”‚  β”‚ entities     β”‚                                                       β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                                       β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                                                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                               β”‚ Internal HTTP
                               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        NETAPP CONNECTOR API                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ GET /files  β”‚  β”‚ POST /searchβ”‚  β”‚ GET /shares β”‚  β”‚ GET /ner/entities   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow for File Access ​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         FILE ACCESS FLOW                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  User Request                    MCP Server                    Response
       β”‚                              β”‚                             β”‚
       β”‚  1. "Get quarterly report"   β”‚                             β”‚
       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ίβ”‚                             β”‚
       β”‚                              β”‚                             β”‚
       β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”‚
       β”‚                    β”‚ 2. Validate OAuth β”‚                   β”‚
       β”‚                    β”‚    Bearer Token   β”‚                   β”‚
       β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β”‚
       β”‚                              β”‚                             β”‚
       β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”‚
       β”‚                    β”‚ 3. Extract User   β”‚                   β”‚
       β”‚                    β”‚    Object ID &    β”‚                   β”‚
       β”‚                    β”‚    Group Members  β”‚                   β”‚
       β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β”‚
       β”‚                              β”‚                             β”‚
       β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”‚
       β”‚                    β”‚ 4. Search Files   β”‚                   β”‚
       β”‚                    β”‚    in Database    β”‚                   β”‚
       β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β”‚
       β”‚                              β”‚                             β”‚
       β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”‚
       β”‚                    β”‚ 5. ACL Filter:    β”‚                   β”‚
       β”‚                    β”‚    Check each fileβ”‚                   β”‚
       β”‚                    β”‚    resolved_      β”‚                   β”‚
       β”‚                    β”‚    principals     β”‚                   β”‚
       β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β”‚
       β”‚                              β”‚                             β”‚
       β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”‚
       β”‚                    β”‚ 6. Return only    β”‚                   β”‚
       β”‚                    β”‚    accessible     β”‚                   β”‚
       β”‚                    β”‚    files          β”‚                   β”‚
       β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   β”‚
       β”‚                              β”‚                             β”‚
       │◄──────────────────────────────                             β”‚
       β”‚  7. Filtered results         β”‚                             β”‚

Prerequisites ​

Before configuring MCP, ensure you have:

  1. NetApp Connector Running: The connector API must be accessible (default: http://localhost:8080)
  2. Microsoft Entra ID App Registration: Required for OAuth authentication
  3. Indexed File Shares: At least one share must be configured and crawled
  4. ACL Resolution Enabled: Files should have resolved_principals for proper access control

Microsoft Entra ID Requirements ​

Your Entra ID app registration needs:

PermissionTypePurpose
User.ReadDelegatedRead user profile
openidDelegatedOpenID Connect sign-in
profileDelegatedRead user's basic profile
emailDelegatedRead user's email address

Configuration ​

Step 1: Configure Environment Variables ​

Add these to your .env file or container environment:

bash
# OAuth Configuration (Required for MCP)
MCP_OAUTH_ENABLED=true
MCP_OAUTH_TENANT_ID=your-tenant-id          # Microsoft Entra tenant ID
MCP_OAUTH_CLIENT_ID=your-client-id          # App registration client ID
MCP_OAUTH_CLIENT_SECRET=your-client-secret  # App registration secret

# Optional: Rate Limiting Configuration
MCP_RATE_LIMIT_SEARCH=30        # search_files requests per minute
MCP_RATE_LIMIT_FULL_TEXT=20     # full_text_search requests per minute
MCP_RATE_LIMIT_CONTENT=60       # get_file_content requests per minute
MCP_RATE_LIMIT_SHARES=10        # list_shares requests per minute
MCP_RATE_LIMIT_ENTITIES=20      # search_entities requests per minute
MCP_RATE_LIMIT_TOTAL=100        # Total requests per minute per user
MCP_RATE_LIMIT_BYTES=10485760   # Content bytes per minute (10MB)

# Optional: Content Windowing
MCP_DEFAULT_WINDOW_SIZE=50000   # Default content window (50KB)
MCP_MAX_WINDOW_SIZE=100000      # Maximum content window (100KB)

# Optional: Default ACL Mode (when no resolved_principals)
MCP_DEFAULT_ACL_MODE=deny       # "deny" (secure) or "allow"

Step 2: Verify MCP Endpoint ​

Once configured, verify the MCP endpoint is available:

bash
# Check OAuth metadata endpoint
curl http://localhost:8080/.well-known/oauth-protected-resource

# Expected response:
{
  "resource": "http://localhost:8080/mcp",
  "authorization_servers": ["http://localhost:8080"],
  "scopes_supported": ["openid", "profile", "email", "offline_access"],
  "bearer_methods_supported": ["header"]
}

Claude Desktop Setup ​

This method allows Claude Desktop to handle OAuth automatically. Edit your Claude Desktop configuration file:

Location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json

Configuration:

json
{
  "mcpServers": {
    "netapp-files": {
      "url": "http://localhost:8080/mcp",
      "oauth": {
        "client_id": "your-client-id",
        "client_secret": "your-client-secret",
        "authorization_url": "http://localhost:8080/authorize",
        "token_url": "http://localhost:8080/token",
        "scopes": ["openid", "profile", "email"]
      }
    }
  }
}

How it works:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    AUTOMATIC OAUTH FLOW                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  Claude Desktop              NetApp Connector              Microsoft Entra
       β”‚                            β”‚                             β”‚
       β”‚  1. First MCP request      β”‚                             β”‚
       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ίβ”‚                             β”‚
       β”‚                            β”‚                             β”‚
       β”‚  2. 401 + WWW-Authenticate β”‚                             β”‚
       │◄────────────────────────────                             β”‚
       β”‚                            β”‚                             β”‚
       β”‚  3. Open browser for login β”‚                             β”‚
       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ίβ”‚
       β”‚                            β”‚                             β”‚
       β”‚                            β”‚  4. User signs in           β”‚
       β”‚                            │◄─────────────────────────────
       β”‚                            β”‚                             β”‚
       β”‚  5. Receive auth code      β”‚                             β”‚
       │◄───────────────────────────┼──────────────────────────────
       β”‚                            β”‚                             β”‚
       β”‚  6. Exchange for token     β”‚                             β”‚
       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ίβ”‚                             β”‚
       β”‚                            β”‚                             β”‚
       β”‚  7. Access token           β”‚                             β”‚
       │◄────────────────────────────                             β”‚
       β”‚                            β”‚                             β”‚
       β”‚  8. MCP request + Bearer   β”‚                             β”‚
       β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ίβ”‚                             β”‚
       β”‚                            β”‚                             β”‚
       β”‚  9. Results (ACL filtered) β”‚                             β”‚
       │◄────────────────────────────                             β”‚

Option B: stdio Transport with Manual Token ​

For development or when HTTP transport isn't available:

json
{
  "mcpServers": {
    "netapp-files": {
      "command": "python",
      "args": ["-m", "app.mcp"],
      "cwd": "/path/to/netapp-copilot-connector-gen-2",
      "env": {
        "NETAPP_API_URL": "http://localhost:8080",
        "MCP_OAUTH_ENABLED": "true",
        "MCP_OAUTH_TENANT_ID": "your-tenant-id",
        "MCP_OAUTH_CLIENT_ID": "your-client-id",
        "MCP_OAUTH_CLIENT_SECRET": "your-client-secret",
        "MCP_OAUTH_TOKEN": "your-user-oauth-token"
      }
    }
  }
}

Note: With Option B, you must manually obtain and update the OAuth token.

Getting a Manual OAuth Token ​

If using stdio transport, obtain a token using one of these methods:

Method 1: Browser Login ​

  1. Visit http://localhost:8080/auth/login
  2. Sign in with your Microsoft account
  3. Copy the access token from the success page

Method 2: Device Code Flow ​

bash
# 1. Initiate device code flow
curl -X POST "http://localhost:8080/auth/device"

# Response:
# {
#   "user_code": "ABCD1234",
#   "verification_uri": "https://microsoft.com/devicelogin",
#   "device_code": "..."
# }

# 2. Visit the URL and enter the code

# 3. Poll for the token
curl -X POST "http://localhost:8080/auth/device/poll?device_code=YOUR_DEVICE_CODE"

Method 3: Azure CLI ​

bash
az login
az account get-access-token --resource api://your-client-id --query accessToken -o tsv

Available Tools ​

The MCP server exposes five tools for AI agents:

1. search_files ​

Search for files by name, type, date, or size across all accessible shares.

Parameters:

ParameterTypeDescription
querystringText to search in filename (case-insensitive)
file_typestringFilter by extension: pdf, docx, xlsx, etc.
pathstringFilter by path pattern (e.g., /reports/)
modified_afterstringISO datetime - files modified after this date
modified_beforestringISO datetime - files modified before this date
size_minintegerMinimum file size in bytes
size_maxintegerMaximum file size in bytes
limitintegerMax results (default: 20, max: 100)

Example Usage:

"Find all PDF files modified in the last month"
β†’ search_files(file_type="pdf", modified_after="2024-11-01")

Search file content using natural language queries with boolean operators.

Parameters:

ParameterTypeDescription
querystringRequired. Search query with optional operators
file_typesarrayFilter by file types: ["pdf", "docx"]
limitintegerMax results (default: 20, max: 100)

Query Syntax:

  • Simple: quarterly report
  • AND: budget AND 2024
  • OR: invoice OR receipt
  • Phrase: "project alpha"
  • Exclude: report -draft

Example Usage:

"Search for documents mentioning Project Alpha"
β†’ full_text_search(query="\"Project Alpha\"")

3. get_file_content ​

Retrieve extracted text content from a file with windowing for large documents.

Parameters:

ParameterTypeDescription
file_idstringRequired. File ID from search results
share_idstringShare ID (optional, improves performance)
window_startintegerCharacter offset to start from (default: 0)
window_sizeintegerCharacters to return (default: 50000, max: 100000)
include_metadatabooleanInclude file metadata (default: true)

Response includes navigation hints:

json
{
  "file_id": "abc123",
  "filename": "annual_report.pdf",
  "content": "... extracted text ...",
  "window": {
    "start": 0,
    "size": 50000,
    "total_length": 250000,
    "has_more": true,
    "next_start": 50000,
    "progress_percent": 20
  }
}

Scrolling through large documents:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    CONTENT WINDOWING                                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  Document (250KB total)
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚                                                                         β”‚
  β”‚  Window 1: 0-50KB        Window 2: 50-100KB      Window 3: 100-150KB    β”‚
  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
  β”‚  β”‚ Introduction β”‚   β†’    β”‚ Chapter 1    β”‚   β†’    β”‚ Chapter 2    β”‚  ...  β”‚
  β”‚  β”‚ Executive    β”‚        β”‚ Analysis     β”‚        β”‚ Results      β”‚       β”‚
  β”‚  β”‚ Summary      β”‚        β”‚              β”‚        β”‚              β”‚       β”‚
  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
  β”‚                                                                         β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  Request 1: get_file_content(file_id="abc", window_start=0)
  Request 2: get_file_content(file_id="abc", window_start=50000)
  Request 3: get_file_content(file_id="abc", window_start=100000)

4. list_shares ​

List available file shares in the system.

Parameters: None

Response:

json
{
  "shares": [
    {
      "id": "share-uuid",
      "name": "Finance",
      "path": "\\\\server\\finance",
      "status": "READY",
      "file_count": 1250
    }
  ]
}

5. search_entities ​

Find files containing specific named entities (people, organizations, etc.) extracted via NER.

Parameters:

ParameterTypeDescription
entity_valuestringRequired. Entity to search for
entity_typestringType filter: person, organization, location, date, money, email, phone
limitintegerMax results (default: 20, max: 100)

Example Usage:

"Find documents mentioning Acme Corporation"
β†’ search_entities(entity_value="Acme Corporation", entity_type="organization")

Security & Access Control ​

ACL Filtering Flow ​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         ACL ACCESS DECISION FLOW                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

                              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                              β”‚  File Request   β”‚
                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                       β”‚
                                       β–Ό
                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                         β”‚ File has resolved_      β”‚
                         β”‚ principals?             β”‚
                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚ YES                               β”‚ NO
                    β–Ό                                   β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ User Object ID in   β”‚           β”‚ Share has           β”‚
         β”‚ resolved_principals?β”‚           β”‚ acl_override_mode?  β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚                                  β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ YES          β”‚ NO   β”‚           β”‚ YES          β”‚ NO   β”‚
         β–Ό              β–Ό      β”‚           β–Ό              β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ ALLOW  β”‚   β”‚ User in   β”‚ β”‚    β”‚ Check     β”‚   β”‚ DENY   β”‚
    β”‚        β”‚   β”‚ group in  β”‚ β”‚    β”‚ override  β”‚   β”‚        β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚ resolved_ β”‚ β”‚    β”‚ rules     β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚ principalsβ”‚ β”‚    β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
                 β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚          β”‚
                       β”‚       β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”   β”‚             β”‚
              β”‚ YES      β”‚ NO  β”‚   β–Ό             β–Ό
              β–Ό          β–Ό     β”‚  "everyone"   "specified"
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ ALLOW  β”‚  β”‚ DENY   β”‚β”‚  β”‚ ALLOW  β”‚   β”‚ User in   β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚ specified β”‚
                               β”‚               β”‚ principalsβ”‚
                               β”‚               β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
                               β”‚                     β”‚
                               β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
                               β”‚              β”‚ YES    β”‚ NO β”‚
                               β”‚              β–Ό        β–Ό
                               β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
                               β”‚         β”‚ ALLOW  β”‚ β”‚ DENY   β”‚
                               β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Share-Level ACL Override ​

When files don't have resolved ACL principals, you can configure share-level fallback:

json
{
  "rules": {
    "acl_override_mode": "everyone"
  }
}

Options:

  • "everyone" - All authenticated users can access files without resolved ACLs
  • "specified" - Only specified users/groups can access:
json
{
  "rules": {
    "acl_override_mode": "specified",
    "acl_override_principals": [
      { "type": "group", "id": "group-object-id" },
      { "type": "user", "id": "user-object-id" }
    ]
  }
}

Security Best Practices ​

  1. Keep MCP_DEFAULT_ACL_MODE=deny - This ensures files without resolved ACLs are not accessible
  2. Use HTTPS in production - Configure SSL/TLS for the connector API
  3. Rotate client secrets regularly - Update your Entra ID app registration secrets
  4. Monitor MCP operations - All MCP tool calls are logged to the operations log
  5. Configure appropriate rate limits - Prevent abuse with per-user limits

Rate Limiting ​

Rate limits protect the system from abuse and ensure fair usage across users.

Default Limits (per minute per user) ​

Limit TypeDefaultEnvironment Variable
search_files30MCP_RATE_LIMIT_SEARCH
full_text_search20MCP_RATE_LIMIT_FULL_TEXT
get_file_content60MCP_RATE_LIMIT_CONTENT
list_shares10MCP_RATE_LIMIT_SHARES
search_entities20MCP_RATE_LIMIT_ENTITIES
Total requests100MCP_RATE_LIMIT_TOTAL
Content bytes10MBMCP_RATE_LIMIT_BYTES

Rate Limit Response ​

When rate limited, tools return:

json
{
  "error": "rate_limited",
  "message": "Rate limit exceeded for search_files",
  "retry_after": 45,
  "rate_limit": {
    "allowed": false,
    "remaining": 0,
    "limit": 30,
    "reset_at": 1702732800.0
  }
}

Troubleshooting ​

Common Issues ​

1. "OAuth provider not configured" ​

Cause: Missing OAuth environment variables

Solution: Ensure these are set:

bash
MCP_OAUTH_ENABLED=true
MCP_OAUTH_TENANT_ID=your-tenant-id
MCP_OAUTH_CLIENT_ID=your-client-id
MCP_OAUTH_CLIENT_SECRET=your-client-secret

2. "Token validation failed" ​

Cause: Invalid or expired OAuth token

Solutions:

  • Refresh your OAuth token
  • Check that the token audience matches your app registration
  • Verify the token hasn't expired

3. "Access denied" for files you should have access to ​

Cause: ACL resolution issues

Solutions:

  • Verify the file has resolved_principals in the database
  • Check that your Entra Object ID matches a principal
  • Verify your group memberships are being fetched correctly
  • Consider configuring acl_override_mode on the share

4. "Rate limit exceeded" ​

Cause: Too many requests in a short period

Solutions:

  • Wait for the retry_after period
  • Reduce request frequency
  • Increase rate limits via environment variables

5. Files not appearing in search results ​

Causes:

  • Files haven't been crawled yet
  • Files don't match your ACL permissions
  • Search filters are too restrictive

Solutions:

  • Verify the share has been crawled (check share status)
  • Check file ACLs and your permissions
  • Broaden search parameters

Viewing MCP Logs ​

MCP operations are logged to the connector's operations log:

bash
# View recent MCP operations
curl -H "Authorization: Bearer $TOKEN" \
  "http://localhost:8080/operations?operation_type=MCP_SEARCH_FILES&limit=10"

Log entries include:

  • Tool name and arguments
  • User identity (Object ID, email)
  • Operation status (SUCCESS/ERROR)
  • Result counts

Environment Variables Reference ​

OAuth Configuration ​

VariableRequiredDefaultDescription
MCP_OAUTH_ENABLEDYesfalseEnable OAuth authentication
MCP_OAUTH_TENANT_IDYes-Microsoft Entra tenant ID
MCP_OAUTH_CLIENT_IDYes-App registration client ID
MCP_OAUTH_CLIENT_SECRETYes-App registration client secret
MCP_OAUTH_TOKENNo-Pre-configured OAuth token (stdio mode)

Rate Limiting ​

VariableRequiredDefaultDescription
MCP_RATE_LIMIT_SEARCHNo30search_files requests/min
MCP_RATE_LIMIT_FULL_TEXTNo20full_text_search requests/min
MCP_RATE_LIMIT_CONTENTNo60get_file_content requests/min
MCP_RATE_LIMIT_SHARESNo10list_shares requests/min
MCP_RATE_LIMIT_ENTITIESNo20search_entities requests/min
MCP_RATE_LIMIT_TOTALNo100Total requests/min per user
MCP_RATE_LIMIT_BYTESNo10485760Content bytes/min (10MB)

Content Windowing ​

VariableRequiredDefaultDescription
MCP_DEFAULT_WINDOW_SIZENo50000Default window size (chars)
MCP_MAX_WINDOW_SIZENo100000Maximum window size (chars)

Access Control ​

VariableRequiredDefaultDescription
MCP_DEFAULT_ACL_MODENodenyDefault ACL mode when no resolved_principals

Server Configuration ​

VariableRequiredDefaultDescription
NETAPP_API_URLNohttp://localhost:8080NetApp Connector API URL
MCP_LOG_LEVELNoINFOLogging level

Additional Resources ​


Last updated: January 2026